techne-sdk 0.3.8 → 0.5.0

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.
Files changed (56) hide show
  1. package/CHANGELOG.md +97 -0
  2. package/README.md +3 -1
  3. package/dist/auth/account.d.ts +67 -0
  4. package/dist/auth/account.js +136 -0
  5. package/dist/auth/hosts.d.ts +4 -0
  6. package/dist/auth/hosts.js +4 -0
  7. package/dist/auth/index.d.ts +30 -5
  8. package/dist/auth/index.js +80 -12
  9. package/dist/catalog/catalog.gen.js +1332 -205
  10. package/dist/generated/index.d.ts +9 -0
  11. package/dist/generated/index.js +27 -0
  12. package/dist/generated/lexicons.d.ts +1797 -227
  13. package/dist/generated/lexicons.js +1147 -224
  14. package/dist/generated/nsid.d.ts +16 -0
  15. package/dist/generated/nsid.js +16 -0
  16. package/dist/generated/nsid.json +16 -0
  17. package/dist/generated/types/pub/techne/draft/commons/moveAccountHandle.d.ts +3 -0
  18. package/dist/generated/types/pub/techne/draft/commons/moveAccountHandle.js +7 -0
  19. package/dist/generated/types/pub/techne/draft/identity/attest.d.ts +5 -0
  20. package/dist/generated/types/pub/techne/draft/identity/attest.js +7 -0
  21. package/dist/generated/types/pub/techne/draft/identity/beginAddMethod.d.ts +3 -0
  22. package/dist/generated/types/pub/techne/draft/identity/beginAddMethod.js +7 -0
  23. package/dist/generated/types/pub/techne/draft/identity/cancelPendingChange.d.ts +29 -0
  24. package/dist/generated/types/pub/techne/draft/identity/cancelPendingChange.js +27 -0
  25. package/dist/generated/types/pub/techne/draft/identity/defs.d.ts +41 -7
  26. package/dist/generated/types/pub/techne/draft/identity/defs.js +14 -0
  27. package/dist/generated/types/pub/techne/draft/identity/finishAddMethod.d.ts +9 -0
  28. package/dist/generated/types/pub/techne/draft/identity/finishAddMethod.js +14 -0
  29. package/dist/generated/types/pub/techne/draft/identity/fold.d.ts +3 -0
  30. package/dist/generated/types/pub/techne/draft/identity/fold.js +7 -0
  31. package/dist/generated/types/pub/techne/draft/identity/holdForPhone.d.ts +1 -1
  32. package/dist/generated/types/pub/techne/draft/identity/link.d.ts +3 -0
  33. package/dist/generated/types/pub/techne/draft/identity/link.js +7 -0
  34. package/dist/generated/types/pub/techne/draft/identity/listMethods.d.ts +7 -1
  35. package/dist/generated/types/pub/techne/draft/identity/manageMethods.d.ts +267 -0
  36. package/dist/generated/types/pub/techne/draft/identity/manageMethods.js +265 -0
  37. package/dist/generated/types/pub/techne/draft/identity/openAccountPage.d.ts +40 -0
  38. package/dist/generated/types/pub/techne/draft/identity/openAccountPage.js +55 -0
  39. package/dist/generated/types/pub/techne/draft/identity/resolve.d.ts +4 -0
  40. package/dist/generated/types/pub/techne/draft/identity/unlinkMethod.d.ts +6 -0
  41. package/dist/generated/types/pub/techne/draft/identity/unlinkMethod.js +7 -0
  42. package/dist/generated/types/pub/techne/draft/permissioned/putRecords.d.ts +2 -2
  43. package/dist/generated/types/pub/techne/draft/query/getRecords.d.ts +11 -0
  44. package/dist/generated/types/pub/techne/draft/query/getRecords.js +7 -0
  45. package/dist/generated/types/pub/techne/draft/registry/blockIndex.d.ts +7 -1
  46. package/dist/generated/types/pub/techne/draft/registry/blockIndex.js +17 -3
  47. package/dist/generated/types/pub/techne/draft/registry/purgeType.d.ts +7 -1
  48. package/dist/generated/types/pub/techne/draft/registry/purgeType.js +17 -3
  49. package/dist/query/compose.d.ts +1 -1
  50. package/dist/query/compose.js +1 -1
  51. package/dist/query/index.d.ts +7 -0
  52. package/dist/query/index.js +28 -1
  53. package/dist/versions/react.js +19 -6
  54. package/dist/wasm/techne-wasm.gen.js +1 -1
  55. package/dist/wasm/techne-wasm2js.gen.js +8361 -8359
  56. package/package.json +2 -1
@@ -1082,7 +1082,7 @@ export declare const schemaDict: {
1082
1082
  readonly PubTechneDraftAppAccess: {
1083
1083
  readonly lexicon: 1;
1084
1084
  readonly id: "pub.techne.draft.appAccess";
1085
- readonly description: "A space's authority lets one app (an OAuth client) read one space: our published form of atproto 0016's simplespace `appAccess`. 0016 ANDs two axes for a read: the reader passes the space's read policy, and the app has appAccess for the space. Authored by the space's AUTHORITY, in its own repo, placed IN the space it names (as a `share` is), so the space's readers see which apps may read it. Approved by whoever passes the space type's published `manage` leg (the owner of a personal space; Facilitator and up for a collective's), written with the authority's pen. Approval is per space. `criteria` is a stated rule for future spaces, stored and shown in social.scenius.listAppAccess; nothing evaluates it yet: future-space coverage is evaluated when `space:` grant enforcement exists. Deleting it withdraws the approval for future reads. Nothing stores a denial. Enforcement arrives with `space:` OAuth grants: before Spaces a proxied read carries no client identity.";
1085
+ readonly description: "A space's authority lets one app (an OAuth client) read one space: our published form of atproto 0016's simplespace `appAccess`. 0016 ANDs two axes for a read: the reader passes the space's read policy, and the app has appAccess for the space. Authored by the space's AUTHORITY, in its own repo, placed IN the space it names (as a `share` is), so the space's readers see which apps may read it. Approved by whoever passes the space type's published `manage` leg (the owner of a personal space itself, never another account linked to it; Facilitator and up for a collective's, a role held by any of the caller's linked accounts included), written with the authority's pen. Approval is per space. `criteria` is a stated rule for future spaces, stored and shown in social.scenius.listAppAccess; nothing evaluates it yet: future-space coverage is evaluated when `space:` grant enforcement exists. Deleting it withdraws the approval for future reads. Nothing stores a denial. Enforcement arrives with `space:` OAuth grants: before Spaces a proxied read carries no client identity.";
1086
1086
  readonly defs: {
1087
1087
  readonly main: {
1088
1088
  readonly type: "record";
@@ -1135,7 +1135,7 @@ export declare const schemaDict: {
1135
1135
  readonly PubTechneDraftAppAccessRequest: {
1136
1136
  readonly lexicon: 1;
1137
1137
  readonly id: "pub.techne.draft.appAccessRequest";
1138
- readonly description: "A member asks a space's authority to let one app read the space: the member is using the app and the space has not approved it. Authored by the member (the requester is the author), in their own repo, placed in their own `pub.techne.draft.space.personal/self`: it is the member's own intent, it names a space that may be private, and a member below the space's write policy could not place it in the space itself. When the requester can read the space and is not an approver, every holder of the space type's `manage` leg is notified and can approve (writing a `pub.techne.draft.appAccess`) or let it be; a requester who is an approver is notified of nothing and approves in one tap. Status is derived: approved when an appAccess exists, pending while a request counts without one, none otherwise; nothing stores a denial. A request counts only while its requester can read the space, and a caller who is not an approver sees only their own request. Deleting it withdraws the request.";
1138
+ readonly description: "A member asks a space's authority to let one app read the space: the member is using the app and the space has not approved it. Authored by the member (the requester is the author), in their own repo, placed in their own `pub.techne.draft.space.personal/self`: it is the member's own intent, it names a space that may be private, and a member below the space's write policy could not place it in the space itself. When the requester can read the space and is not an approver, every approver social.scenius.getAppAccess lists (the owner of a personal space itself, never an account linked to it; a collective's members who pass the space type's `manage` leg) is notified and can approve (writing a `pub.techne.draft.appAccess`) or let it be; a requester who is an approver is notified of nothing and approves in one tap. Status is derived: approved when an appAccess exists, pending while a request counts without one, none otherwise; nothing stores a denial. A request counts only while its requester can read the space, and a caller who is not an approver sees only requests by their own accounts (their person). Deleting it withdraws the request.";
1139
1139
  readonly defs: {
1140
1140
  readonly main: {
1141
1141
  readonly type: "record";
@@ -1254,7 +1254,7 @@ export declare const schemaDict: {
1254
1254
  readonly main: {
1255
1255
  readonly type: "record";
1256
1256
  readonly key: "any";
1257
- readonly description: "Publishers use sidecar_rkey(subject AT-URI + '#' + questionSet name) so a new question bank replaces the assessment in place. `any` permits that convention but cannot enforce it.";
1257
+ readonly description: "Publishers use sidecar_rkey(subject AT-URI + '#' + questionSet name) so a new question bank replaces the assessment in place. Readers do not depend on the key: the AppView finds assessments by `subject` and its cid and uses the newest.";
1258
1258
  readonly record: {
1259
1259
  readonly type: "object";
1260
1260
  readonly required: ["subject", "questionSet", "answers", "complete", "createdAt"];
@@ -1843,7 +1843,7 @@ export declare const schemaDict: {
1843
1843
  readonly defs: {
1844
1844
  readonly main: {
1845
1845
  readonly type: "procedure";
1846
- readonly description: "Move a custodial account's handle to the deployment's current handle domain (handles move from *.scenius.social to the settled domain). Served by the AppView, operator-only (the caller's DID is one of OPERATOR_DIDS). Keeps the account's label unless `label` is given; updates the handle on the PDS and in the AppView. An account has one valid handle at a time: the previous one is retired, never issued again, and links that carry it redirect to the account's DID route. Everything else already refers to the account by DID and does not change.";
1846
+ readonly description: "Move a custodial account's handle to the deployment's current handle domain (handles move from *.scenius.social to the settled domain). Served by the AppView, operator-only: the caller's DID is one of OPERATOR_DIDS and the call carries the moderate scope. Keeps the account's label unless `label` is given; updates the handle on the PDS and in the AppView. An account has one valid handle at a time: the previous one is retired, never issued again, and links that carry it redirect to the account's DID route. Everything else already refers to the account by DID and does not change.";
1847
1847
  readonly input: {
1848
1848
  readonly encoding: "application/json";
1849
1849
  readonly schema: {
@@ -1891,7 +1891,10 @@ export declare const schemaDict: {
1891
1891
  readonly description: "No signed-in caller.";
1892
1892
  }, {
1893
1893
  readonly name: "NotAuthorized";
1894
- readonly description: "The caller is not an operator.";
1894
+ readonly description: "The caller is not an operator, or the call does not carry the moderate scope (HTTP 403).";
1895
+ }, {
1896
+ readonly name: "ProgramRefused";
1897
+ readonly description: "The caller is a program's token: a program never reaches an operator method (HTTP 403).";
1895
1898
  }, {
1896
1899
  readonly name: "InvalidRequest";
1897
1900
  readonly description: "`did` is not a DID; the account's keys are not held here (a BYOD account moves its own handle); the account has no handle and no `label` was given; the label is reserved or not a valid handle label; or the account has no claimed handle yet.";
@@ -2142,7 +2145,7 @@ export declare const schemaDict: {
2142
2145
  readonly main: {
2143
2146
  readonly type: "record";
2144
2147
  readonly key: "any";
2145
- readonly description: "Publishers use sidecar_rkey(subject AT-URI), one per place per writer. `any` permits that convention but cannot enforce it.";
2148
+ readonly description: "Publishers use sidecar_rkey(subject AT-URI), one per place per writer. Readers do not depend on the key: they read every containedIn about a place.";
2146
2149
  readonly record: {
2147
2150
  readonly type: "object";
2148
2151
  readonly required: ["subject", "container", "createdAt"];
@@ -2299,7 +2302,7 @@ export declare const schemaDict: {
2299
2302
  readonly main: {
2300
2303
  readonly type: "record";
2301
2304
  readonly key: "any";
2302
- readonly description: "Publishers use sidecar_rkey(claim AT-URI), one derivation per claim per writer. `any` permits that convention but cannot enforce it.";
2305
+ readonly description: "Publishers use sidecar_rkey(claim AT-URI), one derivation per claim per writer. Readers do not depend on the key: they find a derivation by the claim it names.";
2303
2306
  readonly record: {
2304
2307
  readonly type: "object";
2305
2308
  readonly required: ["subject", "method", "createdAt"];
@@ -2435,7 +2438,7 @@ export declare const schemaDict: {
2435
2438
  readonly main: {
2436
2439
  readonly type: "record";
2437
2440
  readonly key: "any";
2438
- readonly description: "The rkey is sidecar_rkey(subject.uri) (regenos-lexicons `sidecar`): lowercase base32 of the sha256 of the subject's AT-URI, so a rewrite updates this record in place and a subject has at most one description per author. `any` permits that convention but cannot enforce it.";
2441
+ readonly description: "The rkey is sidecar_rkey(subject.uri) (regenos-lexicons `sidecar`): lowercase base32 of the sha256 of the subject's AT-URI, so a rewrite updates this record in place and a subject has at most one description per author. Enforced by its readers: the commons rules fetch only the record at sidecar_rkey(subject), so a description at any other key is not read.";
2439
2442
  readonly record: {
2440
2443
  readonly type: "object";
2441
2444
  readonly required: ["subject", "text", "createdAt"];
@@ -2469,7 +2472,7 @@ export declare const schemaDict: {
2469
2472
  readonly main: {
2470
2473
  readonly type: "record";
2471
2474
  readonly key: "any";
2472
- readonly description: "One record per pair: publishers put the lower AT-URI in `subject` and use pair_rkey(subject, other) (regenos_lexicons::sidecar), so the reversed pair cannot get a second record. `any` permits that convention but cannot enforce it. A pair asserted both sameAs and distinctFrom by writers a reader trusts is a conflict that reader resolves.";
2475
+ readonly description: "One record per pair: publishers put the lower AT-URI in `subject` and use pair_rkey(subject, other) (regenos_lexicons::sidecar), so the reversed pair cannot get a second record. Readers do not depend on the key: the commons curator reads a pair from both ends, so a reversed or repeated pair is the same wall. A pair asserted both sameAs and distinctFrom by writers a reader trusts is a conflict that reader resolves.";
2473
2476
  readonly record: {
2474
2477
  readonly type: "object";
2475
2478
  readonly required: ["subject", "other", "createdAt"];
@@ -2759,7 +2762,7 @@ export declare const schemaDict: {
2759
2762
  readonly main: {
2760
2763
  readonly type: "record";
2761
2764
  readonly key: "any";
2762
- readonly description: "Publishers use sidecar_rkey(subject AT-URI) (regenos_lexicons::sidecar), so a rewrite for the same subject updates this record. `any` permits that convention but cannot enforce it.";
2765
+ readonly description: "Publishers use sidecar_rkey(subject AT-URI) (regenos_lexicons::sidecar), so a rewrite for the same subject updates this record. Readers do not depend on the key: they take a trusted geo about the subject at any key.";
2763
2766
  readonly record: {
2764
2767
  readonly type: "object";
2765
2768
  readonly required: ["subject", "location", "createdAt"];
@@ -2797,7 +2800,7 @@ export declare const schemaDict: {
2797
2800
  readonly main: {
2798
2801
  readonly type: "record";
2799
2802
  readonly key: "any";
2800
- readonly description: "Publishers use sidecar_rkey(subject AT-URI), one per event per writer. `any` permits that convention but cannot enforce it.";
2803
+ readonly description: "Publishers use sidecar_rkey(subject AT-URI), one per event per writer. Readers do not depend on the key: the AppView reads every trusted heldAt about an event.";
2801
2804
  readonly record: {
2802
2805
  readonly type: "object";
2803
2806
  readonly required: ["subject", "place", "createdAt"];
@@ -2903,7 +2906,7 @@ export declare const schemaDict: {
2903
2906
  readonly defs: {
2904
2907
  readonly main: {
2905
2908
  readonly type: "procedure";
2906
- readonly description: "A PDS's issuer hook: the PDS verified a one-time code for `channel` and signed `did` in (or created it). The issuer binds an unbound channel to the account and issues a pub.techne.draft.credential, or re-issues when it is already bound to that account. It never moves a bound channel, never binds a phone number back to the account that removed it (`ChannelReleased`), and binds only accounts whose DID document names the calling PDS (`#atproto_pds`). Authenticated and signed exactly as identity.resolve. Delivered at least once; idempotent per (channel, did).";
2909
+ readonly description: "A PDS's issuer hook: the PDS verified a one-time code for `channel` and signed `did` in (or created it). The issuer binds an unbound channel to the account and issues a pub.techne.draft.credential, or re-issues when it is already bound to that account. A phone it binds or re-binds releases the invitations and holds waiting on that number to the account (as a sign-in on the platform does). It never moves a bound channel, never signs in a frozen method (`MethodFrozen`), never binds a phone number back to the account that removed it (`ChannelReleased`), and binds only accounts whose DID document names the calling PDS (`#atproto_pds`). Authenticated and signed exactly as identity.resolve. Delivered at least once; idempotent per (channel, did).";
2907
2910
  readonly input: {
2908
2911
  readonly encoding: "application/json";
2909
2912
  readonly schema: {
@@ -2933,6 +2936,10 @@ export declare const schemaDict: {
2933
2936
  readonly type: "boolean";
2934
2937
  readonly description: "The PDS created the account in this sign-in.";
2935
2938
  };
2939
+ readonly termsShown: {
2940
+ readonly type: "boolean";
2941
+ readonly description: "Optional; sent only as true, and only with `newAccount`. The PDS's sign-in page named its Terms of Use and Privacy Policy when this account was made there, so the issuer records the person's assent. Absent: nothing to record (a returning sign-in, a page without the line, an older PDS, or a first-party app that shows its own terms).";
2942
+ };
2936
2943
  };
2937
2944
  };
2938
2945
  };
@@ -2970,6 +2977,9 @@ export declare const schemaDict: {
2970
2977
  }, {
2971
2978
  readonly name: "ChannelReleased";
2972
2979
  readonly description: "The account named by `did` removed this phone number (identity.unlinkMethod) and nobody has bound it since (HTTP 409). Never retried: the account gets the number back only by adding it again (identity.finishAddMethod).";
2980
+ }, {
2981
+ readonly name: "MethodFrozen";
2982
+ readonly description: "This channel is a frozen method of the account (identity.manageMethods `freeze`; HTTP 403): it does not sign in until the freeze ends. Not retried.";
2973
2983
  }, {
2974
2984
  readonly name: "RateLimitExceeded";
2975
2985
  readonly description: "As identity.resolve (HTTP 429).";
@@ -3024,6 +3034,9 @@ export declare const schemaDict: {
3024
3034
  }, {
3025
3035
  readonly name: "RateLimitExceeded";
3026
3036
  readonly description: "Too many codes sent to this address (HTTP 429).";
3037
+ }, {
3038
+ readonly name: "MethodFrozen";
3039
+ readonly description: "The channel is a frozen sign-in method of an account (HTTP 403); it can't be proved anywhere until the freeze ends.";
3027
3040
  }, {
3028
3041
  readonly name: "SendFailed";
3029
3042
  readonly description: "The code could not be texted to that phone number (HTTP 502). Try again.";
@@ -3031,6 +3044,48 @@ export declare const schemaDict: {
3031
3044
  };
3032
3045
  };
3033
3046
  };
3047
+ readonly PubTechneDraftIdentityCancelPendingChange: {
3048
+ readonly lexicon: 1;
3049
+ readonly id: "pub.techne.draft.identity.cancelPendingChange";
3050
+ readonly defs: {
3051
+ readonly main: {
3052
+ readonly type: "procedure";
3053
+ readonly description: "Cancel one of the caller's pending sign-in changes (a method removal, an account deletion or a first recovery mark that waits; its `id` is the `pending` identity.listMethods, identity.unlinkMethod or deleteAccount answered), by the sign-in method rules: any of the account's methods may cancel a wait, so a signed-in session may, with no step-up. For an account whose PDS has no account page of its own; the identity PDS cancels through identity.manageMethods `cancel`. A frozen method may cancel too, its own removal included. Nothing else changes.";
3054
+ readonly input: {
3055
+ readonly encoding: "application/json";
3056
+ readonly schema: {
3057
+ readonly type: "object";
3058
+ readonly required: ["id"];
3059
+ readonly properties: {
3060
+ readonly id: {
3061
+ readonly type: "string";
3062
+ readonly maxLength: 64;
3063
+ };
3064
+ };
3065
+ };
3066
+ };
3067
+ readonly output: {
3068
+ readonly encoding: "application/json";
3069
+ readonly schema: {
3070
+ readonly type: "object";
3071
+ readonly required: ["ok"];
3072
+ readonly properties: {
3073
+ readonly ok: {
3074
+ readonly type: "boolean";
3075
+ };
3076
+ };
3077
+ };
3078
+ };
3079
+ readonly errors: [{
3080
+ readonly name: "AuthenticationRequired";
3081
+ readonly description: "No signed-in caller.";
3082
+ }, {
3083
+ readonly name: "NotFound";
3084
+ readonly description: "No such pending change on the caller's account, or it already completed or was cancelled.";
3085
+ }];
3086
+ };
3087
+ };
3088
+ };
3034
3089
  readonly PubTechneDraftIdentityCheckLinkToken: {
3035
3090
  readonly lexicon: 1;
3036
3091
  readonly id: "pub.techne.draft.identity.checkLinkToken";
@@ -3146,7 +3201,7 @@ export declare const schemaDict: {
3146
3201
  readonly defs: {
3147
3202
  readonly main: {
3148
3203
  readonly type: "procedure";
3149
- readonly description: "Make a link token on the caller's identity PDS: a secret anyone can redeem (redeemLinkToken) once (one-time, the default) or any number of times by different accounts (`reusable`). With `grant`, the platform keeps a write it makes for each account that redeems it: when the identity PDS reports a redemption, the platform writes the redeemer's own pub.techne.draft.identity.linkRedemption record in their personal space and then writes `grant.write` as `grant.actAs` with the redeemer's DID in every \"$subject\" slot, exactly as identity.holdForPhone releases a hold: the caller must be able to write as `actAs` now and when the link is redeemed, a block either way between the redeemer and the caller or `actAs` writes nothing, and the record must be one permissioned.putRecord would take with the caller's DID in the slot. A one-time link's grant goes after its one write; a reusable link's is written once for each redeemer, under its own record key. A release never writes over a record already at its key: one there stays, and that redeemer's write is not made. Only an account hosted on the platform's identity PDS can make links. One call spends one of the caller's writes.";
3204
+ readonly description: "Make a link token on the caller's identity PDS: a secret anyone can redeem (redeemLinkToken) once (one-time, the default) or any number of times by different accounts (`reusable`). With `grant`, the platform keeps a write it makes for each account that redeems it: when the identity PDS reports a redemption, the platform writes the redeemer's own pub.techne.draft.identity.linkRedemption record in their personal space and then writes `grant.write` as `grant.actAs` with the redeemer's DID in every \"$subject\" slot (and their name in every \"$name\" slot), exactly as identity.holdForPhone releases a hold: the caller must be able to write as `actAs` now and when the link is redeemed, a block either way between the redeemer and the caller or `actAs` writes nothing, and the record must be one permissioned.putRecord would take with the caller's DID in the slot. A one-time link's grant goes after its one write; a reusable link's is written once for each redeemer, under its own record key. A release never writes over a record already at its key: one there stays, and that redeemer's write is not made. A pub.techne.draft.contact grant is likewise not made when any active contact of `actAs` already names the redeemer, by its `did` or by a saved number that resolves to them (an archived one does not count), so a grant like {name: \"$name\", did: \"$subject\"} adds each person to the owner's People once. Only an account hosted on the platform's identity PDS can make links. One call spends one of the caller's writes.";
3150
3205
  readonly input: {
3151
3206
  readonly encoding: "application/json";
3152
3207
  readonly schema: {
@@ -3237,33 +3292,84 @@ export declare const schemaDict: {
3237
3292
  };
3238
3293
  readonly methodView: {
3239
3294
  readonly type: "object";
3240
- readonly description: "One sign-in method bound to the caller's account, masked.";
3295
+ readonly description: "One sign-in method of an account. `masked` is always masked. Only identity.manageMethods `list` (the identity PDS's signed hook, for the signed-in owner's own account page) adds `value`; identity.listMethods never does.";
3241
3296
  readonly required: ["bid", "type", "masked", "boundAt"];
3242
3297
  readonly properties: {
3243
3298
  readonly bid: {
3244
3299
  readonly type: "string";
3245
3300
  readonly maxLength: 64;
3246
- readonly description: "The binding id (the credential's record key). Names the method in unlinkMethod.";
3301
+ readonly description: "The method's id: the binding id (the credential's record key) of an email or phone, else the platform's id for it. Names the method in unlinkMethod and manageMethods.";
3247
3302
  };
3248
3303
  readonly type: {
3249
3304
  readonly type: "string";
3250
- readonly knownValues: ["email", "phone"];
3305
+ readonly knownValues: ["email", "phone", "passkey", "nostr", "recoveryCodes"];
3251
3306
  };
3252
3307
  readonly masked: {
3253
3308
  readonly type: "string";
3254
3309
  readonly maxLength: 320;
3255
- readonly description: "The channel with most of it hidden, e.g. `j•••@example.com`, `+1 ••• ••• 4567`.";
3310
+ readonly description: "The channel with most of it hidden, e.g. `j•••@example.com`, `+1 ••• ••• 4567`; a passkey's or Nostr key's label; `Recovery codes (n left)`.";
3311
+ };
3312
+ readonly value: {
3313
+ readonly type: "string";
3314
+ readonly maxLength: 320;
3315
+ readonly description: "An email's full address or a phone's full number (E.164). Sent only by identity.manageMethods `list`, to the identity PDS, for the owner's own account page; never in identity.listMethods, signInMethods or a notice. Absent on a passkey, Nostr key or recovery codes.";
3256
3316
  };
3257
3317
  readonly boundAt: {
3258
3318
  readonly type: "string";
3259
3319
  readonly format: "datetime";
3260
3320
  };
3321
+ readonly recovery: {
3322
+ readonly type: "boolean";
3323
+ readonly description: "A recovery method of this account. Private: only the account sees it.";
3324
+ };
3325
+ readonly frozenUntil: {
3326
+ readonly type: "string";
3327
+ readonly format: "datetime";
3328
+ readonly description: "Frozen: it signs in nowhere until then, or until a recovery method lifts it.";
3329
+ };
3330
+ readonly programs: {
3331
+ readonly type: "boolean";
3332
+ readonly description: "\"Programs can sign in with this key\" (identity.manageMethods setPrograms). Present on the types that support it (a Nostr key), off by default. Never on for a recovery method.";
3333
+ };
3334
+ };
3335
+ };
3336
+ readonly pendingChange: {
3337
+ readonly type: "object";
3338
+ readonly description: "A change that waits for its time (a method's removal, the account's deletion, or a method's move onto another account (identity.manageMethods moveMethod), 7 days, or none for a move a recovery method proved; the account's first recovery mark, 24 hours). A move is completed by the platform once due, tried again after a failed write, and may be dropped instead (identity.manageMethods moveMethod says when). Any of the account's methods, a frozen one too, can cancel it until then; a wait during which one of the account's methods was frozen (even if a recovery method lifted the freeze early) is dropped when it runs out, not completed.";
3339
+ readonly required: ["id", "kind", "createdAt", "dueAt"];
3340
+ readonly properties: {
3341
+ readonly id: {
3342
+ readonly type: "string";
3343
+ readonly maxLength: 64;
3344
+ };
3345
+ readonly kind: {
3346
+ readonly type: "string";
3347
+ readonly knownValues: ["removeMethod", "deleteAccount", "markRecovery", "moveMethod"];
3348
+ };
3349
+ readonly method: {
3350
+ readonly type: "string";
3351
+ readonly maxLength: 64;
3352
+ readonly description: "The method it removes, marks or moves (for an incoming move, the other account's method).";
3353
+ };
3354
+ readonly other: {
3355
+ readonly type: "string";
3356
+ readonly format: "did";
3357
+ readonly description: "moveMethod: the other account. On the account the method leaves, where it goes; on the account it joins (identity.manageMethods `list` shows the move there too, and either account can cancel it), where it comes from.";
3358
+ };
3359
+ readonly createdAt: {
3360
+ readonly type: "string";
3361
+ readonly format: "datetime";
3362
+ };
3363
+ readonly dueAt: {
3364
+ readonly type: "string";
3365
+ readonly format: "datetime";
3366
+ };
3261
3367
  };
3262
3368
  };
3263
3369
  readonly linkView: {
3264
3370
  readonly type: "object";
3265
- readonly description: "An alias link between the caller's account and another.";
3266
- readonly required: ["did", "primary", "mutual"];
3371
+ readonly description: "Another account of the caller's person: the two are linked (identity.manageMethods moveMethod), every DID of the person naming every other in `alsoKnownAs`. Linked accounts have no primary, and a link is always mutual: identity.listMethods sends `mutual` as true.";
3372
+ readonly required: ["did", "mutual"];
3267
3373
  readonly properties: {
3268
3374
  readonly did: {
3269
3375
  readonly type: "string";
@@ -3274,13 +3380,35 @@ export declare const schemaDict: {
3274
3380
  readonly type: "string";
3275
3381
  readonly format: "handle";
3276
3382
  };
3277
- readonly primary: {
3383
+ readonly mutual: {
3384
+ readonly type: "boolean";
3385
+ readonly description: "Retired: a link is always mutual, and identity.listMethods sends `true` (it was: both accounts hold a matching pub.techne.draft.accountLink).";
3386
+ };
3387
+ readonly since: {
3388
+ readonly type: "string";
3389
+ readonly format: "datetime";
3390
+ readonly description: "When the two accounts became one person.";
3391
+ };
3392
+ };
3393
+ };
3394
+ readonly personMember: {
3395
+ readonly type: "object";
3396
+ readonly description: "Another account of an account's person (identity.manageMethods `list` and moveMethod).";
3397
+ readonly required: ["did"];
3398
+ readonly properties: {
3399
+ readonly did: {
3278
3400
  readonly type: "string";
3279
3401
  readonly format: "did";
3280
3402
  };
3281
- readonly mutual: {
3282
- readonly type: "boolean";
3283
- readonly description: "Both accounts hold a matching pub.techne.draft.accountLink; a link counts only when true.";
3403
+ readonly since: {
3404
+ readonly type: "string";
3405
+ readonly format: "datetime";
3406
+ readonly description: "When it joined the person. Sent by `list`.";
3407
+ };
3408
+ readonly handle: {
3409
+ readonly type: "string";
3410
+ readonly format: "handle";
3411
+ readonly description: "Its handle, when the platform knows one. Sent in addChannel's `otherPerson`.";
3284
3412
  };
3285
3413
  };
3286
3414
  };
@@ -3371,7 +3499,7 @@ export declare const schemaDict: {
3371
3499
  readonly defs: {
3372
3500
  readonly main: {
3373
3501
  readonly type: "procedure";
3374
- readonly description: "Finish adding a sign-in method with the code identity.beginAddMethod sent. `added`: the method is now bound to the caller's account. `alreadyYours`: it already was (re-issued). `boundElsewhere`: it signs in to another account; `offer` says what the caller can do: `fold` (one of the two accounts is empty and new, so it can be folded into the other with identity.fold) or `link` (both have history; identity.link records that they are the same person). The offer's token is single-use, bound to both accounts, the channel and this session, and lasts 10 minutes. `unavailable`: the method cannot be added right now.";
3502
+ readonly description: "Finish adding a sign-in method with the code identity.beginAddMethod sent. `added`: the method is now bound to the caller's account. `alreadyYours`: it already was (re-issued). `boundElsewhere`: it signs in to another account. When one of the two accounts is empty and new, `offer` (`fold`) says it can be folded into the other with identity.fold; when both hold something, `other` names that account and no offer is made: the two are linked by moving the method (identity.manageMethods moveMethod, on the identity PDS's account page). The `link` offer is retired. The offer's token is single-use, bound to both accounts, the channel and this session, and lasts 10 minutes. `unavailable`: the method cannot be added right now.";
3375
3503
  readonly input: {
3376
3504
  readonly encoding: "application/json";
3377
3505
  readonly schema: {
@@ -3402,11 +3530,17 @@ export declare const schemaDict: {
3402
3530
  readonly method: {
3403
3531
  readonly type: "ref";
3404
3532
  readonly ref: "lex:pub.techne.draft.identity.defs#methodView";
3533
+ readonly description: "`added` / `alreadyYours`: the method. Absent on `boundElsewhere`: the other account's method is named only to the identity PDS (identity.manageMethods addChannel).";
3405
3534
  };
3406
3535
  readonly offer: {
3407
3536
  readonly type: "ref";
3408
3537
  readonly ref: "lex:pub.techne.draft.identity.finishAddMethod#offer";
3409
3538
  };
3539
+ readonly other: {
3540
+ readonly type: "string";
3541
+ readonly format: "did";
3542
+ readonly description: "`boundElsewhere` when both accounts hold something: the account the method signs in to (no `offer`).";
3543
+ };
3410
3544
  };
3411
3545
  };
3412
3546
  };
@@ -3419,6 +3553,12 @@ export declare const schemaDict: {
3419
3553
  }, {
3420
3554
  readonly name: "RateLimitExceeded";
3421
3555
  readonly description: "A phone code: the provider that sent it is refusing more checks for this number for now (HTTP 429). Wait a few minutes.";
3556
+ }, {
3557
+ readonly name: "MethodFrozen";
3558
+ readonly description: "The channel was frozen on its account since the code was sent, or it would be new to the caller's account while one of its methods is frozen (HTTP 403).";
3559
+ }, {
3560
+ readonly name: "ProtectedAccount";
3561
+ readonly description: "The channel signs in to another account, and one of the two has a recovery mark, a live freeze, a pending change, or a passkey, Nostr key or recovery codes (HTTP 409): no fold or link is offered, and the other account is not named (no `boundElsewhere`).";
3422
3562
  }, {
3423
3563
  readonly name: "UpstreamFailure";
3424
3564
  readonly description: "A phone code: the provider that sent it could not be asked whether it matches (HTTP 502). The code is not spent; try again.";
@@ -3431,6 +3571,7 @@ export declare const schemaDict: {
3431
3571
  readonly action: {
3432
3572
  readonly type: "string";
3433
3573
  readonly knownValues: ["fold", "link"];
3574
+ readonly description: "`fold`. (`link` is retired and no longer offered.)";
3434
3575
  };
3435
3576
  readonly token: {
3436
3577
  readonly type: "string";
@@ -3507,6 +3648,9 @@ export declare const schemaDict: {
3507
3648
  }, {
3508
3649
  readonly name: "InvalidToken";
3509
3650
  readonly description: "The token is unknown, used, expired, or was issued to another session.";
3651
+ }, {
3652
+ readonly name: "ProtectedAccount";
3653
+ readonly description: "One of the two accounts has a recovery mark, a live freeze, a pending change, or a passkey, Nostr key or recovery codes since the offer (HTTP 409).";
3510
3654
  }, {
3511
3655
  readonly name: "NotEmpty";
3512
3656
  readonly description: "The account to fold gained a record or is 7 days old or more; link instead.";
@@ -3520,7 +3664,7 @@ export declare const schemaDict: {
3520
3664
  readonly defs: {
3521
3665
  readonly main: {
3522
3666
  readonly type: "procedure";
3523
- readonly description: "Hold a write until someone proves a phone number: when an account proves `phone`, the platform fills every string value exactly \"$subject\" in `write.record` (and \"$subject\" in `write.rkey`) with that account's DID and every value exactly \"$now\" in the record with the time, and writes the record as `actAs` in `write.space` with what it holds for that account. Only the number's keyed hash is kept; the template may not contain the number. Every hold is answered alike, whether or not the number already has an account: one that has is released the next time it is proved (each phone sign-in proves it), never at once, so nothing here says whether a number has an account or whose it is. The caller must be able to write as `actAs` (its own DID, a collective or circle whose own member space (`space.collective.member/self`) it manages, or a collective it made that has nothing placed yet), now and again when the number is proved; a hold whose caller no longer may, or with a block either way between the new account and the caller or `actAs`, is dropped unwritten, as is one whose record the space does not admit. The record must be one permissioned.putRecord would take with the caller's DID in the slot, and must carry the slot. The nightly sweep deletes a hold 180 days after it was made. Holding again with the same number, `actAs`, `collection`, `space`, `rkey` and record `space` answers the existing hold unchanged (the first template wins; withdraw it with releasePhoneHold and hold again to change it). The template is shown to everyone who may write as `actAs` and read `space` (listPhoneHolds). Identity knows nothing about what the record means. Any signed-in DID; one call spends one of the caller's writes.";
3667
+ readonly description: "Hold a write until someone proves a phone number: when an account proves `phone`, the platform fills every string value exactly \"$subject\" in `write.record` (and \"$subject\" in `write.rkey`) with that account's DID, every value exactly \"$now\" in the record with the time and every value exactly \"$name\" with that account's name (its public pub.techne.draft.actor.profile displayName, trimmed, at most 64 graphemes, else its handle; a write waits until one is known), and writes the record as `actAs` in `write.space` with what it holds for that account. Only the number's keyed hash is kept; the template may not contain the number. Every hold is answered alike, whether or not the number already has an account: one that has is released the next time it is proved (each phone sign-in proves it), never at once, so nothing here says whether a number has an account or whose it is. The caller must be able to write as `actAs` (its own DID, a collective or circle whose own member space (`space.collective.member/self`) it manages, or a collective it made that has nothing placed yet), now and again when the number is proved; a hold whose caller no longer may, or with a block either way between the new account and the caller or `actAs`, is dropped unwritten, as is one whose record the space does not admit. The record must be one permissioned.putRecord would take with the caller's DID in the slot, and must carry the slot. The nightly sweep deletes a hold 180 days after it was made. Holding again with the same number, `actAs`, `collection`, `space`, `rkey` and record `space` answers the existing hold unchanged (the first template wins; withdraw it with releasePhoneHold and hold again to change it). The template is shown to everyone who may write as `actAs` and read `space` (listPhoneHolds). Identity knows nothing about what the record means. Any signed-in DID; one call spends one of the caller's writes.";
3524
3668
  readonly input: {
3525
3669
  readonly encoding: "application/json";
3526
3670
  readonly schema: {
@@ -3591,7 +3735,7 @@ export declare const schemaDict: {
3591
3735
  };
3592
3736
  readonly record: {
3593
3737
  readonly type: "unknown";
3594
- readonly description: "The record, with the \"$subject\" (and optionally \"$now\") slots as string values.";
3738
+ readonly description: "The record, with the \"$subject\" (and optionally \"$now\" and \"$name\") slots as string values.";
3595
3739
  };
3596
3740
  };
3597
3741
  };
@@ -3603,7 +3747,7 @@ export declare const schemaDict: {
3603
3747
  readonly defs: {
3604
3748
  readonly main: {
3605
3749
  readonly type: "procedure";
3606
- readonly description: "Link the caller's account with the other account named by the token identity.finishAddMethod offered: both accounts get a pub.techne.draft.accountLink in their space.personal naming the other and the primary, and, where this host holds the account's PLC rotation key, `alsoKnownAs` gains `at://{other}` after the handle. Nothing moves. v1 links only accounts whose keys this host holds.";
3750
+ readonly description: "Retired (Linking v2): the platform no longer serves it, and no client should call it. Two accounts are linked with identity.manageMethods `moveMethod` now, which makes them one person (no accountLink records, no primary). Kept so the name and its shapes stay published. It was: link the caller's account with the other account named by the token identity.finishAddMethod offered: both accounts get a pub.techne.draft.accountLink in their space.personal naming the other and the primary, and each account's `alsoKnownAs` gains `at://{other}` after the handle: signed here where this host holds the account's PLC rotation key, else by the identity PDS that made and hosts it. Nothing moves. v1 links only accounts this host or its identity PDS holds.";
3607
3751
  readonly input: {
3608
3752
  readonly encoding: "application/json";
3609
3753
  readonly schema: {
@@ -3641,9 +3785,12 @@ export declare const schemaDict: {
3641
3785
  }, {
3642
3786
  readonly name: "InvalidToken";
3643
3787
  readonly description: "The token is unknown, used, expired, or was issued to another session.";
3788
+ }, {
3789
+ readonly name: "ProtectedAccount";
3790
+ readonly description: "One of the two accounts has a recovery mark, a live freeze, a pending change, or a passkey, Nostr key or recovery codes since the offer (HTTP 409).";
3644
3791
  }, {
3645
3792
  readonly name: "InvalidRequest";
3646
- readonly description: "`primary` names neither account, or the other account's keys are not held here (sign in to it and link from there).";
3793
+ readonly description: "`primary` names neither account, or the other account is held neither here nor by the identity PDS (sign in to it and link from there).";
3647
3794
  }];
3648
3795
  };
3649
3796
  };
@@ -3889,7 +4036,16 @@ export declare const schemaDict: {
3889
4036
  readonly defs: {
3890
4037
  readonly main: {
3891
4038
  readonly type: "query";
3892
- readonly description: "The caller's sign-in methods (masked) and the account's alias links. Signed-in members only.";
4039
+ readonly description: "The caller's sign-in methods (masked, with their recovery mark and freeze), its pending changes, and the other accounts of its person (`links`, each `did`, `since` and `mutual`, always true; linked accounts have no primary). Emails and phones only unless `allTypes` (shipped clients label every row as an email). Signed-in members only.";
4040
+ readonly parameters: {
4041
+ readonly type: "params";
4042
+ readonly properties: {
4043
+ readonly allTypes: {
4044
+ readonly type: "boolean";
4045
+ readonly description: "Also list passkeys, Nostr keys and the recovery-code set.";
4046
+ };
4047
+ };
4048
+ };
3893
4049
  readonly output: {
3894
4050
  readonly encoding: "application/json";
3895
4051
  readonly schema: {
@@ -3905,11 +4061,20 @@ export declare const schemaDict: {
3905
4061
  };
3906
4062
  readonly links: {
3907
4063
  readonly type: "array";
4064
+ readonly description: "The other accounts of the caller's person (linked with identity.manageMethods moveMethod), each with `did`, `since` and `mutual` (always true); linked accounts have no primary. Empty when it is alone.";
3908
4065
  readonly items: {
3909
4066
  readonly type: "ref";
3910
4067
  readonly ref: "lex:pub.techne.draft.identity.defs#linkView";
3911
4068
  };
3912
4069
  };
4070
+ readonly pending: {
4071
+ readonly type: "array";
4072
+ readonly description: "The account's pending changes, soonest first (the account page shows them at the top, with Cancel), a move of one of its methods onto another account included.";
4073
+ readonly items: {
4074
+ readonly type: "ref";
4075
+ readonly ref: "lex:pub.techne.draft.identity.defs#pendingChange";
4076
+ };
4077
+ };
3913
4078
  };
3914
4079
  };
3915
4080
  };
@@ -4016,95 +4181,132 @@ export declare const schemaDict: {
4016
4181
  };
4017
4182
  };
4018
4183
  };
4019
- readonly PubTechneDraftIdentityRedeemLinkToken: {
4184
+ readonly PubTechneDraftIdentityManageMethods: {
4020
4185
  readonly lexicon: 1;
4021
- readonly id: "pub.techne.draft.identity.redeemLinkToken";
4186
+ readonly id: "pub.techne.draft.identity.manageMethods";
4022
4187
  readonly defs: {
4023
4188
  readonly main: {
4024
4189
  readonly type: "procedure";
4025
- readonly description: "Redeem a link token as the caller. The identity PDS records it and reports it to the platform, which writes the caller's linkRedemption record and the link's grant, usually before this answers. Redeeming again a link the caller already redeemed answers `repeat` and changes nothing. One call spends one of the caller's writes. An older link (one the served app made before link tokens) writes no linkRedemption record.";
4190
+ readonly description: "The identity PDS's signed hook for the sign-in method rules (the account page and sign-in page call it; the rules live on the platform so every client obeys the same ones). Authenticated only by the epds-signature MAC with the identity hook secret; no session, OAuth or service-JWT caller reaches it, and every answer is signed. The PDS vouches for the signed-in account (`did`, which must be hosted on the calling PDS, else 404 UnknownAccount) and for the step-up it just checked (`stepUp`: which method, when; it counts for 10 minutes). Rules: a recovery method acting with a fresh step-up acts at once; anything else removes a method or deletes the account after a 7-day wait with an email notice, if it has any email method, cancellable by any of the account's methods, a frozen one too (`cancel`); a wait re-checks these rules when it runs out (a method marked for recovery meanwhile is not removed; a first mark is dropped once another method is marked; a wait during which any of the account's methods was frozen, even if a recovery method lifted the freeze early or removed the method, is dropped, not completed, since a frozen method can't sign in to cancel it, and every email method gets a `waitDropped` notice naming the change); a freeze is immediate, from a different method with a fresh step-up, and lasts 7 days or until a recovery method lifts it (`unfreeze`); a recovery method is never frozen, removed or unmarked by an unmarked one; the last way to sign in is never removed; marking a recovery method needs a fresh step-up of one, except the account's first, which needs a fresh step-up of any of its methods (else StepUpRequired) and waits 24 hours with an email notice, if the account has any email method. Notices are email only: the platform sends every one itself, wherever the account is hosted, to each of the account's email methods (never by phone or Nostr); the PDS sends none. Ops: `list` (the account's methods, each email and phone also with its full `value` for the owner's own account page, pending changes (an open `moveMethod` onto the account included), `hasRecovery`, and `person`, the other accounts of its person), `signInMethods` (for a sign-in page that knows only the account, \"Sign in as @handle\": the methods that can sign in now, each a `display` only, never its full value; no step-up, recovery marks or pending changes), `sendTo` (the full email or phone of one of them, for the PDS to send a sign-in code to; never shown), `remove`, `cancel`, `freeze` (with `signOut`), `unfreeze`, `mark`, `unmark`, `signOut` (sign out everywhere the platform holds a session; the PDS revokes its own), `delete`, `addExternal` (a passkey or Nostr key the PDS proved; always a fresh step-up of one of the account's methods, StepUpRequired without one, and never a program's, ProgramRefused), `newRecoveryCodes` (returned once; a new set ends the old; always a fresh step-up, and on an account with no recovery method the set is its first mark, which waits 24 hours; a first set is refused, MethodFrozen, while one of the account's methods is frozen), `redeemCode`, `setPrograms` (\"Programs can sign in with this key\" on or off, `on`, for a Nostr key, the only type that supports it: on and off both need a fresh step-up of one of the account's methods that is not a program, not frozen (a step-up by a key with programs on is ProgramRefused, so that key never switches itself off); on is also refused from the key itself, SameMethod, for a recovery method or one whose first mark is waiting, IsRecovery, and while a method of the account is frozen, MethodFrozen), `addChannel` (a `channel` the PDS just proved for `did`, as identity.finishAddMethod does for a session: `added`, `alreadyYours`, or `boundElsewhere`: when both accounts hold something, with the `other` account and its `method` (the account page offers `moveMethod`), else with a fold `offer` (identity.finishAddMethod#offer), single use, 10 minutes, bound to `did` on this hook and to no session; MethodFrozen when the channel is frozen on any account, MethodFrozen when `did` itself has a frozen method and the channel would be new to it (no method is added past a freeze; `addExternal` likewise), and, on the fold path only (one of the two accounts holds nothing, so an `offer` would be made), ProtectedAccount when either account has a recovery mark, a freeze, a pending change, or a passkey, Nostr key or recovery codes; when both hold something the answer names `other` and `method` and moveMethod's own refusals apply), `fold` (take that offer: `token`; needs a fresh step-up of `did`; ProtectedAccount (a live freeze included) and NotEmpty, checked again; `folded` with the kept `did` and the `emptied` one, which is deleted (on the identity PDS too, by `dueDeletes`)), `moveMethod` (link two accounts: move an email or phone method of account `from` onto `did` and make the two accounts one person, every DID of each linked to every other in `alsoKnownAs`; needs a fresh step-up of `did` and one of `from` (`fromStepUp`, else FromStepUpRequired); refused, nothing scheduled, when a method of either person is frozen (Frozen), either has a pending change (PendingChange), the person would hold more than 4 accounts (TooMany), the two are already one person or the same account (Same), or no key can write `alsoKnownAs` for one of their DIDs (NoKey); a method marked for recovery on `from` moves only with a `fromStepUp` of a recovery method of `from` (RecoveryProtected); it is never done inside the call: the answer is `pending` (the change, a pending change of `from`, as a defs#pendingChange as `did`'s `list` shows it) with `due`, its `dueAt`: now for a move such a step-up proved, else 7 days on, a wait `from` is told about by email (a recovery-proven move is told only when it completes), which any method of either account can `cancel`, and which a freeze of either person's methods drops (`waitDropped` to `from`); the platform completes it once due: a move whose key check or `alsoKnownAs` writes fail is tried again after a backoff (2^tries minutes, at most an hour), one refused for good (no key we can ask holds it, or the identity PDS refuses the account) is dropped with a `moveDropped` email to both accounts, one still failing 24 hours past `due` is dropped with `moveTimedOut`, one whose accounts changed meanwhile (the method gone, or marked for recovery since unless a recovery method proved the move; a refusal above other than a freeze; or a recovery-proven requester no longer a recovery method) is dropped with `moveCancelled` to both, and a completed one sends every account of the person a `linked` email), `unlink` (account `other` leaves `did`'s person at once; the removal of the `alsoKnownAs` entries between it and the rest is queued, tried again after a failure, and given up after about a day, or at once when refused for good, with an `akaLeft` email to both accounts of the entry; needs a fresh step-up of `did`; when `other` would be left with no way to sign in, `method`, one of `did`'s email or phone methods, is required (else NeedsMethod) and moves to `other`, which needs a step-up of a recovery method of `did` or of that method itself (NeedsRecoveryMethod), a recovery method's step-up for a method marked for recovery (RecoveryProtected), a method that is not frozen (MethodFrozen) and not `did`'s last way to sign in (LastMethod); NotLinked when `other` is not in `did`'s person; an email handed to `other` is released from `did`'s identity-PDS account, tried again after a failure and given up after about a day with an `emailLeft` email to `did`; both accounts get an `unlinked` email), `link` (retired, answers 400 InvalidRequest: a link is `moveMethod` now), `importBackupEmails` (once per account, recorded: a second call answers `alreadyImported` even after every mark is taken off; the move of the PDS's verified backup emails, `backupEmails`, each with when the PDS verified it: one verified before 2026-11-13T00:00:00Z becomes an email method marked for recovery at once, without step-up or wait, and one verified at or after it is skipped, `afterCutoff`, since only the holder could have added one before these rules; only an account with no recovery method takes one, all of its addresses in one call (each address once, else 400 InvalidRequest), else `hasRecovery`, nothing changes and the import is spent; a call that marks none of them spends it too; MethodFrozen while one of the account's methods is frozen, not spent; `indexOff` while the identity index is off), `notices` and `noticesSent` (no `did`; unused, kept for older clients: `notices` always answers an empty list and `noticesSent` `count: 0`, since the platform sends every notice itself), for a login service that just checked a signature by a Nostr key and knows no account yet (no `did`) `findKey` (`external`, type `nostr` and the 64-character lowercase hex key: `none` when no account the calling PDS hosts has it, else `done` with the account's `did`, the key's `method`, whether that method is `frozen` now, and whether `programs` may sign in with it), and for scheduled account deletions that came due (no `did`; only the accounts the calling PDS hosts) `dueDeletes` (up to 100 accounts the platform has deleted on its side, which the PDS deletes too; one taken and not confirmed is offered again after 5 minutes, without limit) and `dueDeletesDone` (`dids` the PDS deleted), and for a consent screen after sign-in `operator` (`operator`: whether `did` is one of the platform's operators, so the PDS offers the moderate scope, `include:pub.techne.draft.authModerate`, to operators only and drops it from everyone else's grant). Programs: a key with programs on can't be marked (ProgramsOn), and a program never touches account security: when the PDS says a program made the request (`program`), or the step-up names a key with programs on, every op but `list`, `signInMethods` and `sendTo` is 403 ProgramRefused (`operator` included: a program never moderates), `setPrograms` included: such a key's programs are turned off by a step-up of another of the account's methods.";
4026
4191
  readonly input: {
4027
4192
  readonly encoding: "application/json";
4028
4193
  readonly schema: {
4029
4194
  readonly type: "object";
4030
- readonly required: ["token"];
4195
+ readonly required: ["v", "op"];
4031
4196
  readonly properties: {
4032
- readonly token: {
4197
+ readonly v: {
4198
+ readonly type: "integer";
4199
+ readonly const: 1;
4200
+ };
4201
+ readonly op: {
4033
4202
  readonly type: "string";
4034
- readonly maxLength: 512;
4203
+ readonly knownValues: ["list", "signInMethods", "sendTo", "remove", "cancel", "freeze", "unfreeze", "mark", "unmark", "signOut", "delete", "addExternal", "newRecoveryCodes", "redeemCode", "setPrograms", "importBackupEmails", "findKey", "notices", "noticesSent", "dueDeletes", "dueDeletesDone", "addChannel", "fold", "link", "moveMethod", "unlink", "operator"];
4204
+ readonly description: "The op. `link` is retired: it answers 400 InvalidRequest; `moveMethod` links two accounts now.";
4035
4205
  };
4036
- };
4037
- };
4038
- };
4039
- readonly output: {
4040
- readonly encoding: "application/json";
4041
- readonly schema: {
4042
- readonly type: "object";
4043
- readonly required: ["id", "app", "target", "owner", "reusable", "redeemedAt", "repeat"];
4044
- readonly properties: {
4045
- readonly id: {
4206
+ readonly did: {
4046
4207
  readonly type: "string";
4208
+ readonly format: "did";
4209
+ readonly description: "The signed-in account. Required for every op but `notices`, `noticesSent`, `dueDeletes` and `dueDeletesDone`.";
4047
4210
  };
4048
- readonly app: {
4211
+ readonly stepUp: {
4212
+ readonly type: "ref";
4213
+ readonly ref: "lex:pub.techne.draft.identity.manageMethods#stepUp";
4214
+ };
4215
+ readonly method: {
4049
4216
  readonly type: "string";
4217
+ readonly maxLength: 64;
4218
+ readonly description: "The method acted on (its `id` in `list` or `signInMethods`). moveMethod: the method of `from` that moves onto `did`. unlink: the method of `did` handed to `other` when `other` would have none left.";
4050
4219
  };
4051
- readonly target: {
4220
+ readonly pending: {
4052
4221
  readonly type: "string";
4222
+ readonly maxLength: 64;
4223
+ readonly description: "The pending change `cancel` cancels.";
4053
4224
  };
4054
- readonly owner: {
4225
+ readonly signOut: {
4226
+ readonly type: "boolean";
4227
+ readonly description: "With `freeze`: also sign out everywhere.";
4228
+ };
4229
+ readonly external: {
4230
+ readonly type: "ref";
4231
+ readonly ref: "lex:pub.techne.draft.identity.manageMethods#external";
4232
+ };
4233
+ readonly code: {
4234
+ readonly type: "string";
4235
+ readonly maxLength: 64;
4236
+ readonly description: "A recovery code, for `redeemCode`.";
4237
+ };
4238
+ readonly ids: {
4239
+ readonly type: "array";
4240
+ readonly maxLength: 100;
4241
+ readonly items: {
4242
+ readonly type: "integer";
4243
+ };
4244
+ readonly description: "Unused, kept for older clients: notice ids for `noticesSent`, which confirms none.";
4245
+ };
4246
+ readonly emails: {
4247
+ readonly type: "array";
4248
+ readonly maxLength: 10;
4249
+ readonly items: {
4250
+ readonly type: "string";
4251
+ readonly maxLength: 320;
4252
+ };
4253
+ readonly description: "Retired, not read: a bare list has no verification dates, so the cutoff can't hold. importBackupEmails without `backupEmails` is 400 InvalidRequest.";
4254
+ };
4255
+ readonly backupEmails: {
4256
+ readonly type: "array";
4257
+ readonly maxLength: 10;
4258
+ readonly items: {
4259
+ readonly type: "ref";
4260
+ readonly ref: "lex:pub.techne.draft.identity.manageMethods#backupEmail";
4261
+ };
4262
+ readonly description: "importBackupEmails: the account's verified backup email addresses, all of them, each with when the PDS verified it.";
4263
+ };
4264
+ readonly dids: {
4265
+ readonly type: "array";
4266
+ readonly maxLength: 100;
4267
+ readonly items: {
4268
+ readonly type: "string";
4269
+ readonly format: "did";
4270
+ };
4271
+ readonly description: "dueDeletesDone: the accounts whose PDS account was deleted.";
4272
+ };
4273
+ readonly channel: {
4274
+ readonly type: "ref";
4275
+ readonly ref: "lex:pub.techne.draft.identity.defs#channel";
4276
+ readonly description: "addChannel: the email or phone the PDS just proved (a code it sent and checked).";
4277
+ };
4278
+ readonly token: {
4279
+ readonly type: "string";
4280
+ readonly maxLength: 128;
4281
+ readonly description: "fold: the offer's token from addChannel. (link, retired, took one too.)";
4282
+ };
4283
+ readonly from: {
4055
4284
  readonly type: "string";
4056
4285
  readonly format: "did";
4286
+ readonly description: "moveMethod: the account the method leaves.";
4057
4287
  };
4058
- readonly reusable: {
4059
- readonly type: "boolean";
4288
+ readonly fromStepUp: {
4289
+ readonly type: "ref";
4290
+ readonly ref: "lex:pub.techne.draft.identity.manageMethods#stepUp";
4291
+ readonly description: "moveMethod: what the PDS's step-up of `from` proved (fresh, one of `from`'s methods).";
4060
4292
  };
4061
- readonly redeemedAt: {
4293
+ readonly other: {
4062
4294
  readonly type: "string";
4063
- readonly format: "datetime";
4295
+ readonly format: "did";
4296
+ readonly description: "unlink: the account that leaves `did`'s person.";
4064
4297
  };
4065
- readonly repeat: {
4298
+ readonly primary: {
4299
+ readonly type: "string";
4300
+ readonly format: "did";
4301
+ readonly description: "Retired, not read: it was the retired `link` op's primary account. Linked accounts have no primary.";
4302
+ };
4303
+ readonly on: {
4066
4304
  readonly type: "boolean";
4305
+ readonly description: "setPrograms: on or off.";
4067
4306
  };
4068
- };
4069
- };
4070
- };
4071
- readonly errors: [{
4072
- readonly name: "InvalidRequest";
4073
- readonly description: "HTTP 400: a field out of bounds, or a body that is not JSON; 415: not application/json; 422: not the input's shape.";
4074
- }, {
4075
- readonly name: "LinkNotUsable";
4076
- readonly description: "HTTP 400: the link is unknown, revoked, expired or already used by another account (\"this link no longer works\").";
4077
- }, {
4078
- readonly name: "OwnLink";
4079
- readonly description: "HTTP 400: the caller made this link.";
4080
- }, {
4081
- readonly name: "NotSupported";
4082
- readonly description: "HTTP 400: link tokens are not available to this caller (its account is not hosted on the platform's identity PDS, or the platform has no identity PDS configured), and the token names none of the served app's older links that still open for it.";
4083
- }, {
4084
- readonly name: "RateLimitExceeded";
4085
- readonly description: "HTTP 429: too many writes, or too many short codes that named no link, from this DID.";
4086
- }, {
4087
- readonly name: "UpstreamFailure";
4088
- readonly description: "HTTP 502: the identity PDS could not be reached, refused the credential the platform holds for the caller, or answered with a failure; try again.";
4089
- }];
4090
- };
4091
- };
4092
- };
4093
- readonly PubTechneDraftIdentityReleasePhoneHold: {
4094
- readonly lexicon: 1;
4095
- readonly id: "pub.techne.draft.identity.releasePhoneHold";
4096
- readonly defs: {
4097
- readonly main: {
4098
- readonly type: "procedure";
4099
- readonly description: "Withdraw a hold (identity.holdForPhone) unwritten. Its asker may, and so may anyone who may write as its account; to anyone else, as for an id that is not a hold, it is HoldNotFound. A release writing the hold at that moment finishes first, and then the hold is gone (HoldNotFound). An expired hold the nightly sweep has not reached yet may still be withdrawn. One call spends one of the caller's writes.";
4100
- readonly input: {
4101
- readonly encoding: "application/json";
4102
- readonly schema: {
4103
- readonly type: "object";
4104
- readonly required: ["id"];
4105
- readonly properties: {
4106
- readonly id: {
4107
- readonly type: "string";
4307
+ readonly program: {
4308
+ readonly type: "boolean";
4309
+ readonly description: "A program made this request: a session or token the PDS's programmatic sign-in opened. Account security is refused (ProgramRefused).";
4108
4310
  };
4109
4311
  };
4110
4312
  };
@@ -4113,16 +4315,541 @@ export declare const schemaDict: {
4113
4315
  readonly encoding: "application/json";
4114
4316
  readonly schema: {
4115
4317
  readonly type: "object";
4116
- readonly required: ["ok"];
4318
+ readonly required: ["v"];
4117
4319
  readonly properties: {
4118
- readonly ok: {
4119
- readonly type: "boolean";
4320
+ readonly v: {
4321
+ readonly type: "integer";
4322
+ readonly const: 1;
4120
4323
  };
4121
- };
4122
- };
4123
- };
4124
- readonly errors: [{
4125
- readonly name: "InvalidRequest";
4324
+ readonly status: {
4325
+ readonly type: "string";
4326
+ readonly knownValues: ["done", "pending", "deleted", "deleting", "bound", "invalid", "hasRecovery", "indexOff", "alreadyImported", "added", "alreadyYours", "boundElsewhere", "unavailable", "folded", "linked", "none"];
4327
+ readonly description: "`done`: it happened now. `pending`: it waits (`pending`). `deleted` / `deleting` (`delete` done now): the account is gone / its local half is gone and a sweep finishes the rest (deleteAccount's `deleted` / `pending`; a deletion that could not start answers 503 Unavailable, try again). `bound`: addExternal's key is on another account. `invalid`: redeemCode's code is wrong, used, or the set is not a recovery method or is frozen. `hasRecovery`: importBackupEmails found a recovery method on the account; nothing changed. `indexOff`: importBackupEmails can't mark anything while the identity index is off; nothing changed. `alreadyImported`: importBackupEmails ran for this account before; nothing changed. `added` / `alreadyYours` / `boundElsewhere` / `unavailable`: addChannel, as identity.finishAddMethod. `folded`: fold done. `linked`: retired (the retired `link` op's answer). moveMethod answers `pending` only, with `pending` (the change, a defs#pendingChange) and `due`. `none`: findKey's key is no method of an account the calling PDS hosts.";
4328
+ };
4329
+ readonly pending: {
4330
+ readonly type: "ref";
4331
+ readonly ref: "lex:pub.techne.draft.identity.defs#pendingChange";
4332
+ readonly description: "The change that waits. moveMethod's `pending` answer carries the change here, as `did`'s `list` shows it (`other` and `method`: the account the method comes from and that method), with `due`; `list` answers every pending change of the account as an array.";
4333
+ };
4334
+ readonly due: {
4335
+ readonly type: "string";
4336
+ readonly format: "datetime";
4337
+ readonly description: "moveMethod `pending`: when the move is due (now for one a recovery method of `from` proved, else 7 days on). The platform completes it then or after a failed try, unless it is cancelled or dropped.";
4338
+ };
4339
+ readonly method: {
4340
+ readonly type: "string";
4341
+ readonly description: "addExternal's new method id, the recovery-code set redeemCode used, or addChannel's method id when `added` or `alreadyYours` (empty while the identity index is off); findKey's method id of the key. addChannel `boundElsewhere` when both accounts hold something: the other account's method id, for `moveMethod` (identity.finishAddMethod's session answer leaves it out).";
4342
+ };
4343
+ readonly codes: {
4344
+ readonly type: "array";
4345
+ readonly items: {
4346
+ readonly type: "string";
4347
+ };
4348
+ readonly description: "newRecoveryCodes: the codes, shown once.";
4349
+ };
4350
+ readonly methods: {
4351
+ readonly type: "array";
4352
+ readonly items: {
4353
+ readonly type: "ref";
4354
+ readonly ref: "lex:pub.techne.draft.identity.defs#methodView";
4355
+ };
4356
+ readonly description: "list: the account's methods (`value` on emails and phones; see defs#methodView).";
4357
+ };
4358
+ readonly hasRecovery: {
4359
+ readonly type: "boolean";
4360
+ };
4361
+ readonly notices: {
4362
+ readonly type: "array";
4363
+ readonly items: {
4364
+ readonly type: "ref";
4365
+ readonly ref: "lex:pub.techne.draft.identity.manageMethods#notice";
4366
+ };
4367
+ readonly description: "Unused, kept for older clients: always empty. The platform emails every notice itself.";
4368
+ };
4369
+ readonly count: {
4370
+ readonly type: "integer";
4371
+ readonly description: "dueDeletesDone: how many were confirmed. noticesSent (unused, kept for older clients): always 0.";
4372
+ };
4373
+ readonly signInMethods: {
4374
+ readonly type: "array";
4375
+ readonly items: {
4376
+ readonly type: "ref";
4377
+ readonly ref: "lex:pub.techne.draft.identity.manageMethods#signInMethod";
4378
+ };
4379
+ readonly description: "signInMethods: the account's methods that can sign in now (not frozen), oldest first.";
4380
+ };
4381
+ readonly to: {
4382
+ readonly type: "ref";
4383
+ readonly ref: "lex:pub.techne.draft.identity.manageMethods#noticeTo";
4384
+ readonly description: "sendTo: where the code goes, in full.";
4385
+ };
4386
+ readonly imported: {
4387
+ readonly type: "array";
4388
+ readonly items: {
4389
+ readonly type: "ref";
4390
+ readonly ref: "lex:pub.techne.draft.identity.manageMethods#importedEmail";
4391
+ };
4392
+ readonly description: "importBackupEmails: each address sent, with what happened to it.";
4393
+ };
4394
+ readonly dueDeletes: {
4395
+ readonly type: "array";
4396
+ readonly items: {
4397
+ readonly type: "ref";
4398
+ readonly ref: "lex:pub.techne.draft.identity.manageMethods#dueDelete";
4399
+ };
4400
+ readonly description: "dueDeletes: accounts to delete on the PDS, oldest first.";
4401
+ };
4402
+ readonly offer: {
4403
+ readonly type: "ref";
4404
+ readonly ref: "lex:pub.techne.draft.identity.finishAddMethod#offer";
4405
+ readonly description: "addChannel `boundElsewhere`: what `did` can do, with `fold` or `link`.";
4406
+ };
4407
+ readonly did: {
4408
+ readonly type: "string";
4409
+ readonly format: "did";
4410
+ readonly description: "fold: the kept account. findKey: the account the key signs in to.";
4411
+ };
4412
+ readonly other: {
4413
+ readonly type: "string";
4414
+ readonly format: "did";
4415
+ readonly description: "addChannel `boundElsewhere` when both accounts hold something: the account the channel signs in to (for `moveMethod`'s `from`).";
4416
+ };
4417
+ readonly otherPerson: {
4418
+ readonly type: "array";
4419
+ readonly items: {
4420
+ readonly type: "ref";
4421
+ readonly ref: "lex:pub.techne.draft.identity.defs#personMember";
4422
+ };
4423
+ readonly description: "addChannel `boundElsewhere` (either form): the other accounts of the person of the account the channel signs in to, now (`did`, `handle` when known), that account itself left out; empty when it is alone.";
4424
+ };
4425
+ readonly emptied: {
4426
+ readonly type: "string";
4427
+ readonly format: "did";
4428
+ readonly description: "fold: the account folded in and deleted.";
4429
+ };
4430
+ readonly person: {
4431
+ readonly type: "array";
4432
+ readonly items: {
4433
+ readonly type: "ref";
4434
+ readonly ref: "lex:pub.techne.draft.identity.defs#personMember";
4435
+ };
4436
+ readonly description: "list: the other accounts of `did`'s person (empty when it is alone). moveMethod no longer answers `done`, which carried the person's accounts here.";
4437
+ };
4438
+ readonly link: {
4439
+ readonly type: "ref";
4440
+ readonly ref: "lex:pub.techne.draft.identity.defs#linkView";
4441
+ readonly description: "Retired: the retired `link` op's answer.";
4442
+ };
4443
+ readonly frozen: {
4444
+ readonly type: "boolean";
4445
+ readonly description: "findKey: the key's method is frozen now and can't sign in.";
4446
+ };
4447
+ readonly programs: {
4448
+ readonly type: "boolean";
4449
+ readonly description: "findKey: \"Programs can sign in with this key\" is on.";
4450
+ };
4451
+ readonly operator: {
4452
+ readonly type: "boolean";
4453
+ readonly description: "operator: whether `did` is one of the platform's operators.";
4454
+ };
4455
+ };
4456
+ };
4457
+ };
4458
+ readonly errors: [{
4459
+ readonly name: "BadSignature";
4460
+ }, {
4461
+ readonly name: "InvalidRequest";
4462
+ }, {
4463
+ readonly name: "UnknownAccount";
4464
+ }, {
4465
+ readonly name: "RateLimitExceeded";
4466
+ }, {
4467
+ readonly name: "Unavailable";
4468
+ readonly description: "Try again (`redeemCode` and `newRecoveryCodes` also while the platform's identity keys are not loaded).";
4469
+ }, {
4470
+ readonly name: "NotFound";
4471
+ readonly description: "No such method or pending change on the account (moveMethod: `from` has no such method).";
4472
+ }, {
4473
+ readonly name: "NotYourMethod";
4474
+ readonly description: "The step-up names a method that is not the account's.";
4475
+ }, {
4476
+ readonly name: "LastMethod";
4477
+ readonly description: "It would leave no way to sign in (unlink: the method handed to `other` is `did`'s only one).";
4478
+ }, {
4479
+ readonly name: "RecoveryProtected";
4480
+ readonly description: "Only a recovery method can do this to a recovery method (moveMethod: of `from`; unlink: of `did`).";
4481
+ }, {
4482
+ readonly name: "NeedsRecoveryMethod";
4483
+ readonly description: "Needs a fresh step-up of a recovery method (unlink: or of the method handed to `other` itself).";
4484
+ }, {
4485
+ readonly name: "StepUpRequired";
4486
+ readonly description: "Needs a fresh step-up (an account's first recovery mark, `newRecoveryCodes`, `fold`, `moveMethod` and `unlink` included).";
4487
+ }, {
4488
+ readonly name: "SameMethod";
4489
+ readonly description: "A method cannot freeze itself.";
4490
+ }, {
4491
+ readonly name: "MethodFrozen";
4492
+ readonly description: "The acting method is frozen (for `sendTo`: the method named is; for `addChannel`: the channel is, on whichever account, or the channel would be new to `did` while one of its methods is frozen; for `addExternal`, a first `newRecoveryCodes` set and `importBackupEmails`: one of `did`'s methods is frozen, and the message says so; for `unlink`: the method handed to `other` is).";
4493
+ }, {
4494
+ readonly name: "InvalidToken";
4495
+ readonly description: "fold: the offer is unknown, used, expired, for the other action, or not made to `did` on this hook.";
4496
+ }, {
4497
+ readonly name: "ProtectedAccount";
4498
+ readonly description: "addChannel / fold: one of the two accounts has a recovery mark, a live freeze, a pending change, or a passkey, Nostr key or recovery codes; it is never folded, and addChannel answers this before any `boundElsewhere`, so nothing about the other account is sent (HTTP 409).";
4499
+ }, {
4500
+ readonly name: "NotEmpty";
4501
+ readonly description: "fold: the account to fold gained a record or is 7 days old or more; link it with `moveMethod` instead (HTTP 409).";
4502
+ }, {
4503
+ readonly name: "ProgramRefused";
4504
+ readonly description: "A program asked (`program`, or a step-up by a key with programs on): account security needs a person on a method no program holds.";
4505
+ }, {
4506
+ readonly name: "ProgramsOn";
4507
+ readonly description: "mark: the key has programs on; turn that off first (HTTP 409).";
4508
+ }, {
4509
+ readonly name: "IsRecovery";
4510
+ readonly description: "setPrograms on: the method is a recovery method, or its first mark is waiting (HTTP 409).";
4511
+ }, {
4512
+ readonly name: "FromStepUpRequired";
4513
+ readonly description: "moveMethod: `fromStepUp` is missing, malformed, not fresh, or names none of `from`'s methods (HTTP 403).";
4514
+ }, {
4515
+ readonly name: "Frozen";
4516
+ readonly description: "moveMethod: a method of an account of either person is frozen; nothing is scheduled (HTTP 409).";
4517
+ }, {
4518
+ readonly name: "PendingChange";
4519
+ readonly description: "moveMethod: an account of either person has a pending change, a move included; nothing is scheduled (HTTP 409).";
4520
+ }, {
4521
+ readonly name: "TooMany";
4522
+ readonly description: "moveMethod: the person would hold more than 4 accounts (HTTP 409).";
4523
+ }, {
4524
+ readonly name: "Same";
4525
+ readonly description: "moveMethod: the two accounts are already one person, or the same account (HTTP 409).";
4526
+ }, {
4527
+ readonly name: "NoKey";
4528
+ readonly description: "moveMethod: no key this platform or the identity PDS holds can write `alsoKnownAs` for an account of either person; nothing is scheduled (HTTP 409).";
4529
+ }, {
4530
+ readonly name: "NeedsMethod";
4531
+ readonly description: "unlink: `other` would be left with no way to sign in; name one of `did`'s email or phone methods to hand it (`method`) (HTTP 409).";
4532
+ }, {
4533
+ readonly name: "NotLinked";
4534
+ readonly description: "unlink: `other` is not in `did`'s person, or is `did` (HTTP 404).";
4535
+ }];
4536
+ };
4537
+ readonly stepUp: {
4538
+ readonly type: "object";
4539
+ readonly description: "What the PDS's step-up proved.";
4540
+ readonly required: ["method", "provedAt"];
4541
+ readonly properties: {
4542
+ readonly method: {
4543
+ readonly type: "ref";
4544
+ readonly ref: "lex:pub.techne.draft.identity.manageMethods#provedMethod";
4545
+ };
4546
+ readonly provedAt: {
4547
+ readonly type: "string";
4548
+ readonly format: "datetime";
4549
+ };
4550
+ };
4551
+ };
4552
+ readonly external: {
4553
+ readonly type: "object";
4554
+ readonly required: ["type", "ref"];
4555
+ readonly properties: {
4556
+ readonly type: {
4557
+ readonly type: "string";
4558
+ readonly knownValues: ["passkey", "nostr"];
4559
+ };
4560
+ readonly ref: {
4561
+ readonly type: "string";
4562
+ readonly maxLength: 512;
4563
+ readonly description: "The passkey credential id, or the Nostr key (hex).";
4564
+ };
4565
+ readonly label: {
4566
+ readonly type: "string";
4567
+ readonly maxLength: 128;
4568
+ };
4569
+ };
4570
+ };
4571
+ readonly notice: {
4572
+ readonly type: "object";
4573
+ readonly description: "Unused, kept for older clients: `notices` always answers an empty list. The platform emails every notice itself, to the account's email methods only.";
4574
+ readonly required: ["id", "did", "event", "to", "createdAt"];
4575
+ readonly properties: {
4576
+ readonly id: {
4577
+ readonly type: "integer";
4578
+ };
4579
+ readonly did: {
4580
+ readonly type: "string";
4581
+ readonly format: "did";
4582
+ };
4583
+ readonly event: {
4584
+ readonly type: "string";
4585
+ readonly knownValues: ["removeMethod", "deleteAccount", "markRecovery", "freeze", "waitDropped", "programsOn", "moveMethod", "linked", "unlinked", "moveDropped", "moveTimedOut", "moveCancelled", "akaLeft", "emailLeft"];
4586
+ readonly description: "What the notice is about: a change that started to wait (`removeMethod`, `deleteAccount`, `markRecovery`, `moveMethod`), a `freeze`, `waitDropped`: the change in `pending` was not completed because one of the account's methods was frozen during its wait, `programsOn`: programs can now sign in with one of the account's Nostr keys (`setPrograms` on; no `pending`), `linked` / `unlinked`: a link (moveMethod completed) or an unlink changed the account's person, `moveDropped` / `moveTimedOut` / `moveCancelled`: a move was dropped because a key can't be used or the identity PDS refused it for good, because it still could not be written 24 hours past due, or because something changed on one of its accounts, or `akaLeft` / `emailLeft`: an `alsoKnownAs` entry or an identity-PDS account email the platform owed removing was given up and is left.";
4587
+ };
4588
+ readonly to: {
4589
+ readonly type: "ref";
4590
+ readonly ref: "lex:pub.techne.draft.identity.manageMethods#noticeTo";
4591
+ };
4592
+ readonly pending: {
4593
+ readonly type: "ref";
4594
+ readonly ref: "lex:pub.techne.draft.identity.defs#pendingChange";
4595
+ };
4596
+ readonly createdAt: {
4597
+ readonly type: "string";
4598
+ readonly format: "datetime";
4599
+ };
4600
+ };
4601
+ };
4602
+ readonly provedMethod: {
4603
+ readonly type: "object";
4604
+ readonly required: ["type"];
4605
+ readonly properties: {
4606
+ readonly type: {
4607
+ readonly type: "string";
4608
+ readonly knownValues: ["email", "phone", "passkey", "nostr", "recoveryCodes"];
4609
+ };
4610
+ readonly value: {
4611
+ readonly type: "string";
4612
+ readonly maxLength: 512;
4613
+ readonly description: "The email or E.164 phone, the passkey credential id, or the Nostr key (hex). None for recoveryCodes.";
4614
+ };
4615
+ };
4616
+ };
4617
+ readonly noticeTo: {
4618
+ readonly type: "object";
4619
+ readonly description: "An email or phone number in full: `sendTo`'s `to`. Also the shape of #notice's `to`, which is unused and kept for older clients (notices go to email methods only).";
4620
+ readonly required: ["type", "value"];
4621
+ readonly properties: {
4622
+ readonly type: {
4623
+ readonly type: "string";
4624
+ readonly knownValues: ["email", "phone", "nostr"];
4625
+ };
4626
+ readonly value: {
4627
+ readonly type: "string";
4628
+ };
4629
+ };
4630
+ };
4631
+ readonly signInMethod: {
4632
+ readonly type: "object";
4633
+ readonly description: "One way to sign in, as a page may show it before anyone has signed in: an email as `***a@***e.***m` (the last character of each dot-separated part), a phone as `•••• 97` (its last two digits), a passkey or Nostr key by its label.";
4634
+ readonly required: ["id", "type", "display"];
4635
+ readonly properties: {
4636
+ readonly id: {
4637
+ readonly type: "string";
4638
+ readonly description: "The method id (for `sendTo`, and the PDS's own passkey or Nostr challenge).";
4639
+ };
4640
+ readonly type: {
4641
+ readonly type: "string";
4642
+ readonly knownValues: ["email", "phone", "passkey", "nostr"];
4643
+ };
4644
+ readonly display: {
4645
+ readonly type: "string";
4646
+ };
4647
+ };
4648
+ };
4649
+ readonly importedEmail: {
4650
+ readonly type: "object";
4651
+ readonly required: ["email", "status"];
4652
+ readonly properties: {
4653
+ readonly email: {
4654
+ readonly type: "string";
4655
+ };
4656
+ readonly status: {
4657
+ readonly type: "string";
4658
+ readonly knownValues: ["marked", "boundElsewhere", "released", "invalid", "afterCutoff"];
4659
+ readonly description: "`marked`: an email method of the account now, marked for recovery. `boundElsewhere`: on another account, left there. `released`: the account removed it; only adding it again binds it back. `invalid`: not an email address. `afterCutoff`: verified at or after 2026-11-13T00:00:00Z, not imported (add it and mark it under the rules).";
4660
+ };
4661
+ };
4662
+ readonly description: "One address importBackupEmails was sent, with what happened to it.";
4663
+ };
4664
+ readonly backupEmail: {
4665
+ readonly type: "object";
4666
+ readonly description: "One backup email importBackupEmails moves, with when the PDS verified it.";
4667
+ readonly required: ["email", "verifiedAt"];
4668
+ readonly properties: {
4669
+ readonly email: {
4670
+ readonly type: "string";
4671
+ readonly maxLength: 320;
4672
+ };
4673
+ readonly verifiedAt: {
4674
+ readonly type: "string";
4675
+ readonly format: "datetime";
4676
+ readonly description: "When the PDS verified the address. Only one verified before 2026-11-13T00:00:00Z is imported.";
4677
+ };
4678
+ };
4679
+ };
4680
+ readonly dueDelete: {
4681
+ readonly type: "object";
4682
+ readonly description: "An account whose scheduled deletion ran on the platform: the PDS deletes its PDS account, then confirms (`dueDeletesDone`). An account already gone from the PDS counts as deleted.";
4683
+ readonly required: ["did", "deletedAt"];
4684
+ readonly properties: {
4685
+ readonly did: {
4686
+ readonly type: "string";
4687
+ readonly format: "did";
4688
+ };
4689
+ readonly deletedAt: {
4690
+ readonly type: "string";
4691
+ readonly format: "datetime";
4692
+ readonly description: "When the platform deleted its side.";
4693
+ };
4694
+ };
4695
+ };
4696
+ };
4697
+ };
4698
+ readonly PubTechneDraftIdentityOpenAccountPage: {
4699
+ readonly lexicon: 1;
4700
+ readonly id: "pub.techne.draft.identity.openAccountPage";
4701
+ readonly defs: {
4702
+ readonly main: {
4703
+ readonly type: "procedure";
4704
+ readonly description: "A link that opens the caller's account page on their PDS already signed in, for an app to open in the system browser. The link works once, until `expiresAt` (60 seconds today). It signs in to view the page only: changing a sign-in method or deleting the account there still asks for a code or a passkey. Signed-in members only, from a browser or device session: any other bearer token (an agent token, an app's OAuth token, a program's token) is refused.";
4705
+ readonly output: {
4706
+ readonly encoding: "application/json";
4707
+ readonly schema: {
4708
+ readonly type: "object";
4709
+ readonly required: ["url", "expiresAt"];
4710
+ readonly properties: {
4711
+ readonly url: {
4712
+ readonly type: "string";
4713
+ readonly format: "uri";
4714
+ readonly maxLength: 2048;
4715
+ readonly description: "Open it once, before expiresAt.";
4716
+ };
4717
+ readonly expiresAt: {
4718
+ readonly type: "string";
4719
+ readonly format: "datetime";
4720
+ };
4721
+ };
4722
+ };
4723
+ };
4724
+ readonly errors: [{
4725
+ readonly name: "AuthenticationRequired";
4726
+ readonly description: "No signed-in caller.";
4727
+ }, {
4728
+ readonly name: "NotAuthorized";
4729
+ readonly description: "The caller's bearer token is neither a device session nor an agent token, such as an app's OAuth token (HTTP 403).";
4730
+ }, {
4731
+ readonly name: "ProgramRefused";
4732
+ readonly description: "The caller is an agent token or a program's token: neither opens the account page (HTTP 403).";
4733
+ }, {
4734
+ readonly name: "NotFound";
4735
+ readonly description: "This server has no account page for the caller: its PDS is not ours, or none is set up (HTTP 404). Open the account page without a link.";
4736
+ }, {
4737
+ readonly name: "RateLimitExceeded";
4738
+ readonly description: "Too many links for this account (HTTP 429).";
4739
+ }, {
4740
+ readonly name: "Unavailable";
4741
+ readonly description: "The PDS did not answer (HTTP 502). Open the account page without a link.";
4742
+ }];
4743
+ };
4744
+ };
4745
+ };
4746
+ readonly PubTechneDraftIdentityRedeemLinkToken: {
4747
+ readonly lexicon: 1;
4748
+ readonly id: "pub.techne.draft.identity.redeemLinkToken";
4749
+ readonly defs: {
4750
+ readonly main: {
4751
+ readonly type: "procedure";
4752
+ readonly description: "Redeem a link token as the caller. The identity PDS records it and reports it to the platform, which writes the caller's linkRedemption record and the link's grant, usually before this answers. Redeeming again a link the caller already redeemed answers `repeat` and changes nothing. One call spends one of the caller's writes. An older link (one the served app made before link tokens) writes no linkRedemption record.";
4753
+ readonly input: {
4754
+ readonly encoding: "application/json";
4755
+ readonly schema: {
4756
+ readonly type: "object";
4757
+ readonly required: ["token"];
4758
+ readonly properties: {
4759
+ readonly token: {
4760
+ readonly type: "string";
4761
+ readonly maxLength: 512;
4762
+ };
4763
+ };
4764
+ };
4765
+ };
4766
+ readonly output: {
4767
+ readonly encoding: "application/json";
4768
+ readonly schema: {
4769
+ readonly type: "object";
4770
+ readonly required: ["id", "app", "target", "owner", "reusable", "redeemedAt", "repeat"];
4771
+ readonly properties: {
4772
+ readonly id: {
4773
+ readonly type: "string";
4774
+ };
4775
+ readonly app: {
4776
+ readonly type: "string";
4777
+ };
4778
+ readonly target: {
4779
+ readonly type: "string";
4780
+ };
4781
+ readonly owner: {
4782
+ readonly type: "string";
4783
+ readonly format: "did";
4784
+ };
4785
+ readonly reusable: {
4786
+ readonly type: "boolean";
4787
+ };
4788
+ readonly redeemedAt: {
4789
+ readonly type: "string";
4790
+ readonly format: "datetime";
4791
+ };
4792
+ readonly repeat: {
4793
+ readonly type: "boolean";
4794
+ };
4795
+ };
4796
+ };
4797
+ };
4798
+ readonly errors: [{
4799
+ readonly name: "InvalidRequest";
4800
+ readonly description: "HTTP 400: a field out of bounds, or a body that is not JSON; 415: not application/json; 422: not the input's shape.";
4801
+ }, {
4802
+ readonly name: "LinkNotUsable";
4803
+ readonly description: "HTTP 400: the link is unknown, revoked, expired or already used by another account (\"this link no longer works\").";
4804
+ }, {
4805
+ readonly name: "OwnLink";
4806
+ readonly description: "HTTP 400: the caller made this link.";
4807
+ }, {
4808
+ readonly name: "NotSupported";
4809
+ readonly description: "HTTP 400: link tokens are not available to this caller (its account is not hosted on the platform's identity PDS, or the platform has no identity PDS configured), and the token names none of the served app's older links that still open for it.";
4810
+ }, {
4811
+ readonly name: "RateLimitExceeded";
4812
+ readonly description: "HTTP 429: too many writes, or too many short codes that named no link, from this DID.";
4813
+ }, {
4814
+ readonly name: "UpstreamFailure";
4815
+ readonly description: "HTTP 502: the identity PDS could not be reached, refused the credential the platform holds for the caller, or answered with a failure; try again.";
4816
+ }];
4817
+ };
4818
+ };
4819
+ };
4820
+ readonly PubTechneDraftIdentityReleasePhoneHold: {
4821
+ readonly lexicon: 1;
4822
+ readonly id: "pub.techne.draft.identity.releasePhoneHold";
4823
+ readonly defs: {
4824
+ readonly main: {
4825
+ readonly type: "procedure";
4826
+ readonly description: "Withdraw a hold (identity.holdForPhone) unwritten. Its asker may, and so may anyone who may write as its account; to anyone else, as for an id that is not a hold, it is HoldNotFound. A release writing the hold at that moment finishes first, and then the hold is gone (HoldNotFound). An expired hold the nightly sweep has not reached yet may still be withdrawn. One call spends one of the caller's writes.";
4827
+ readonly input: {
4828
+ readonly encoding: "application/json";
4829
+ readonly schema: {
4830
+ readonly type: "object";
4831
+ readonly required: ["id"];
4832
+ readonly properties: {
4833
+ readonly id: {
4834
+ readonly type: "string";
4835
+ };
4836
+ };
4837
+ };
4838
+ };
4839
+ readonly output: {
4840
+ readonly encoding: "application/json";
4841
+ readonly schema: {
4842
+ readonly type: "object";
4843
+ readonly required: ["ok"];
4844
+ readonly properties: {
4845
+ readonly ok: {
4846
+ readonly type: "boolean";
4847
+ };
4848
+ };
4849
+ };
4850
+ };
4851
+ readonly errors: [{
4852
+ readonly name: "InvalidRequest";
4126
4853
  readonly description: "HTTP 400: `id` is not a hold id, or a body that is not JSON; 415: not application/json; 422: not the input's shape.";
4127
4854
  }, {
4128
4855
  readonly name: "HoldNotFound";
@@ -4258,6 +4985,15 @@ export declare const schemaDict: {
4258
4985
  readonly format: "did";
4259
4986
  readonly description: "Present only with `released`, and only when the calling PDS hosts the account that removed the number: that account's DID. A PDS that keeps an account per phone number (a placeholder) uses it to tell two placeholders apart: the old account's, which must not sign in with this number again, and the one it started for the number's new holder after the removal, which it finds by this DID and `releaseId` and signs in until the number is bound to it. Binding the number back to this account through identity.attest is refused (`ChannelReleased`).";
4260
4987
  };
4988
+ readonly frozen: {
4989
+ readonly type: "boolean";
4990
+ readonly description: "Present (true) only with `did`: this method of the account is frozen (identity.manageMethods `freeze`). The PDS refuses the sign-in and creates nothing; the account's other methods still sign in.";
4991
+ };
4992
+ readonly frozenUntil: {
4993
+ readonly type: "string";
4994
+ readonly format: "datetime";
4995
+ readonly description: "Present only with `frozen`: when the freeze ends, unless a recovery method lifts it sooner.";
4996
+ };
4261
4997
  readonly releaseId: {
4262
4998
  readonly type: "string";
4263
4999
  readonly minLength: 1;
@@ -4335,7 +5071,7 @@ export declare const schemaDict: {
4335
5071
  readonly defs: {
4336
5072
  readonly main: {
4337
5073
  readonly type: "procedure";
4338
- readonly description: "End an alias link: deletes the caller's pub.techne.draft.accountLink naming `other`, and the other account's too when this host holds it, and removes the `alsoKnownAs` entries this host added.";
5074
+ readonly description: "Retired (Linking v2): the platform no longer serves it, and no client should call it. An account leaves its person with identity.manageMethods `unlink` now. Kept so the name and its shapes stay published. It was: end an alias link: deletes the caller's pub.techne.draft.accountLink naming `other`, and the other account's too when this host holds it, and removes the `alsoKnownAs` entries the link added (signed here, or by the identity PDS for accounts it made).";
4339
5075
  readonly input: {
4340
5076
  readonly encoding: "application/json";
4341
5077
  readonly schema: {
@@ -4377,7 +5113,7 @@ export declare const schemaDict: {
4377
5113
  readonly defs: {
4378
5114
  readonly main: {
4379
5115
  readonly type: "procedure";
4380
- readonly description: "Remove a sign-in method from the caller's account: its credential is revoked (`unlinked`), the channel stops signing in to this account, and its attested pub.techne.draft.contactChannel is deleted. Its next sign-in is treated as new. A removed phone number is marked released: identity.resolve answers `unbound` with `released` and `releasedFrom` (this account) until someone binds it, so a PDS never signs it in to this account again through a placeholder it kept, and identity.attest refuses binding it back here (`ChannelReleased`); only adding it again (identity.finishAddMethod) does. Refused for the account's last method.";
5116
+ readonly description: "Remove a sign-in method from the caller's account, by the sign-in method rules (identity.manageMethods): this method carries no step-up, so the removal always waits 7 days, with an email notice to each of the account's email methods, and any of its methods can cancel it (`status: pending`, `pending`); a recovery method is not removed this way (`RecoveryProtected`), and the last way to sign in never is. When it completes: its credential is revoked (`unlinked`), the channel stops signing in to this account, and its attested pub.techne.draft.contactChannel is deleted. Its next sign-in is treated as new. A removed phone number is marked released: identity.resolve answers `unbound` with `released` and `releasedFrom` (this account) until someone binds it, so a PDS never signs it in to this account again through a placeholder it kept, and identity.attest refuses binding it back here (`ChannelReleased`); only adding it again (identity.finishAddMethod) does. Refused for the account's last method.";
4381
5117
  readonly input: {
4382
5118
  readonly encoding: "application/json";
4383
5119
  readonly schema: {
@@ -4400,6 +5136,14 @@ export declare const schemaDict: {
4400
5136
  readonly ok: {
4401
5137
  readonly type: "boolean";
4402
5138
  };
5139
+ readonly status: {
5140
+ readonly type: "string";
5141
+ readonly knownValues: ["pending"];
5142
+ };
5143
+ readonly pending: {
5144
+ readonly type: "ref";
5145
+ readonly ref: "lex:pub.techne.draft.identity.defs#pendingChange";
5146
+ };
4403
5147
  };
4404
5148
  };
4405
5149
  };
@@ -4411,7 +5155,10 @@ export declare const schemaDict: {
4411
5155
  readonly description: "No such method on the caller's account.";
4412
5156
  }, {
4413
5157
  readonly name: "LastMethod";
4414
- readonly description: "It is the account's only sign-in method.";
5158
+ readonly description: "It is the account's only sign-in method (counting those already waiting to be removed).";
5159
+ }, {
5160
+ readonly name: "RecoveryProtected";
5161
+ readonly description: "It is a recovery method; only a recovery method removes it (identity.manageMethods).";
4415
5162
  }];
4416
5163
  };
4417
5164
  };
@@ -4694,7 +5441,7 @@ export declare const schemaDict: {
4694
5441
  readonly main: {
4695
5442
  readonly type: "record";
4696
5443
  readonly key: "any";
4697
- readonly description: "The rkey is the operator's DID, or `{did}-{millis}` for a later period after one has ended, so each period keeps its own record. Readers count a record only at one of those rkeys and only with `subject` = that DID. `any` permits the convention but cannot enforce it.";
5444
+ readonly description: "The rkey is the operator's DID, or `{did}-{millis}` for a later period after one has ended, so each period keeps its own record. Enforced by the AppView on read: a record counts only at one of those rkeys and only with `subject` = that DID.";
4698
5445
  readonly record: {
4699
5446
  readonly type: "object";
4700
5447
  readonly required: ["subject", "createdAt"];
@@ -5425,11 +6172,11 @@ export declare const schemaDict: {
5425
6172
  readonly PubTechneDraftPermissionedPutRecords: {
5426
6173
  readonly lexicon: 1;
5427
6174
  readonly id: "pub.techne.draft.permissioned.putRecords";
5428
- readonly description: "Write up to 200 records into the caller's own repo in one call: each write is applied in order, exactly as putRecord applies it (the same admission, receipts, no-op re-put and swapCid), each in its own transaction. NOT atomic: a write that is refused does not undo the writes before it or stop the ones after it, and each write's result says what happened to it. That is why this is not called applyWrites: atproto's com.atproto.repo.applyWrites commits all of its writes or none, and this does not (each write keeps putRecord's own per-record locking, so a batch never holds more than one record's locks). The caller authenticates with its own credential: a session from any sign-in lane (OAuth included), or an atproto service-auth JWT (iss = the caller, aud = the AppView's service DID, lxm = this method). repo must be the caller, or a collective or circle the platform holds the credential of whose own member space (`space.collective.member/self`) the caller manages (that space's manage leg alone hands over the authority's pen; managing another of its spaces does not); in a circle (a collective whose descriptor names a circle type) a caller holding only that space's write leg (role 20-29) holds the pen for pub.techne.draft.membership writes alone: an add (a new claim at a key that holds none now, not ending, whose addedBy is the caller or absent) or the caller's own claim (its leave, or a re-put keeping its subject and addedBy); anything else as the circle is Forbidden, or a collective the caller made that has nothing placed yet (for at most a day), else Forbidden and nothing is written. A write refused for itself (a malformed or invalid record, a swapCid that does not match, a conflict) is reported in its result as the error putRecord would have answered, and the next write is applied. A refusal that holds for the whole call stops it with that error, and no later write is applied: the caller's account is being deleted, or is deleted (AccountDeleting; what it wrote goes with the account), or a failure inside the AppView (HTTP 500; the writes applied before it stay written, so read them back or send the batch again: writing the current version again for the same space is a no-op). Callers should treat a failed batch as all-or-nothing and send it again whole: re-putting the records that landed is a no-op (in an app's space only for its app or under `space:` scopes covering it; anyone else's re-put there is Forbidden), and at the move to atproto's permissioned data this method becomes the owner's own PDS com.atproto.repo.applyWrites, which is atomic. One call spends one of the caller's writes (RateLimitExceeded), whatever the number of writes it carries. A request body that is not this method's input is refused as InvalidRequest, with an XRPC error body ({\"error\":\"InvalidRequest\",\"message\":...}): HTTP 413 for a body over 8 MiB (8,388,608 bytes; it is not read past that); 415 for one not sent as application/json; 400 for one that is not JSON or carries no writes or more than 200; 422 for JSON that is not the input (a field missing or of the wrong type). Such a refused call still spends one of the caller's writes. Each write is checked against the token's space scopes as putRecord checks it, and a write that replaces a record already written for an app's space (a pub.techne.draft.space.private space) by a caller that is neither the app its key names nor holds `space:` scopes covering a put there is refused as putRecord refuses it; either refusal is that write's result (Forbidden), and the next write is applied. A first write is never refused for its space. `space` is required: a write that names no space is refused as InvalidRequest (HTTP 400; for putRecords the whole call, and nothing is written), since public records are written with com.atproto.repo.putRecord and a record only the caller reads goes in its own pub.techne.draft.space.personal. Records written before this rule with no space stay stored and readable by their writer. Draft tier.";
6175
+ readonly description: "Write up to 200 records into the caller's own repo in one call: each write is applied in order, exactly as putRecord applies it (the same admission, receipts, no-op re-put and swapCid), each in its own transaction. NOT atomic: a write that is refused does not undo the writes before it or stop the ones after it, and each write's result says what happened to it. That is why this is not called applyWrites: atproto's com.atproto.repo.applyWrites commits all of its writes or none, and this does not (each write keeps putRecord's own per-record locking, so a batch never holds more than one record's locks). The caller authenticates with its own credential: a session from any sign-in lane (OAuth included), or an atproto service-auth JWT (iss = the caller, aud = the AppView's service DID, lxm = this method). repo must be the caller, or a collective or circle the platform holds the credential of whose own member space (`space.collective.member/self`) the caller manages (that space's manage leg alone hands over the authority's pen; managing another of its spaces does not); in a circle (a collective whose descriptor names a circle type) a caller holding only that space's write leg (role 20-29) holds the pen for pub.techne.draft.membership writes alone: an add (a new claim at a key that holds none now, not ending, whose addedBy is the caller or absent) or the caller's own claim (its leave, or a re-put keeping its subject and addedBy); anything else as the circle is Forbidden, or a collective the caller made that has nothing placed yet (for at most a day), else Forbidden and nothing is written. A write refused for itself (a malformed or invalid record, a swapCid that does not match, a conflict) is reported in its result as the error putRecord would have answered, and the next write is applied, except in a roster batch: one with any pub.techne.draft.membership write, in whatever repo. A roster batch of more than one write is first checked whole, and a write in it that putRecord would refuse before reading anything (malformed, over 2 MiB, failing its lexicon, or naming a space it cannot be written into) refuses the call as InvalidRequest (HTTP 400) with nothing written; it then stops at its first refused write, and every write after that one is reported as Conflict and not written. Since any prefix of a roster batch may be what is left written, a batch written as a circle that has a manager must keep one after every prefix of its membership writes (see LastManager), not only after the whole batch: to make someone else manager, put their membership at role 30 or above before the caller's own lower one. A refusal that holds for the whole call stops it with that error, and no later write is applied: the caller's account is being deleted, or is deleted (AccountDeleting; what it wrote goes with the account), or a failure inside the AppView (HTTP 500; the writes applied before it stay written, so read them back or send the batch again: writing the current version again for the same space is a no-op). Callers should treat a failed batch as all-or-nothing and send it again whole: re-putting the records that landed is a no-op (in an app's space only for its app or under `space:` scopes covering it; anyone else's re-put there is Forbidden), and at the move to atproto's permissioned data this method becomes the owner's own PDS com.atproto.repo.applyWrites, which is atomic. One call spends one of the caller's writes (RateLimitExceeded), whatever the number of writes it carries. A request body that is not this method's input is refused as InvalidRequest, with an XRPC error body ({\"error\":\"InvalidRequest\",\"message\":...}): HTTP 413 for a body over 8 MiB (8,388,608 bytes; it is not read past that); 415 for one not sent as application/json; 400 for one that is not JSON or carries no writes or more than 200; 422 for JSON that is not the input (a field missing or of the wrong type). Such a refused call still spends one of the caller's writes. Each write is checked against the token's space scopes as putRecord checks it, and a write that replaces a record already written for an app's space (a pub.techne.draft.space.private space) by a caller that is neither the app its key names nor holds `space:` scopes covering a put there is refused as putRecord refuses it; either refusal is that write's result (Forbidden), and the next write is applied (in a roster batch, the writes after it are Conflict, not written). A first write is never refused for its space. `space` is required: a write that names no space is refused as InvalidRequest (HTTP 400; for putRecords the whole call, and nothing is written), since public records are written with com.atproto.repo.putRecord and a record only the caller reads goes in its own pub.techne.draft.space.personal. Records written before this rule with no space stay stored and readable by their writer. Draft tier.";
5429
6176
  readonly defs: {
5430
6177
  readonly main: {
5431
6178
  readonly type: "procedure";
5432
- readonly description: "Up to 200 putRecord writes, applied in order, each in its own transaction, for one write of your rate. Not atomic: each write's result says what happened to it, and a write refused for itself does not stop the others (AccountDeleting or an HTTP 500 stops the rest). Send a failed batch again whole: re-putting what landed is a no-op (in an app's space, only for its app or under covering scopes). Space scopes and space.private apply to each write as in putRecord: a first write is never refused for its space, but replacing a record already written for an app's space needs the app its key names or `space:` scopes covering it, and that write's result is Forbidden. Every write names its `space` (a write with none refuses the whole call, InvalidRequest; public records go through com.atproto.repo.putRecord). Draft tier.";
6179
+ readonly description: "Up to 200 putRecord writes, applied in order, each in its own transaction, for one write of your rate. Not atomic: each write's result says what happened to it, and a write refused for itself does not stop the others (AccountDeleting or an HTTP 500 stops the rest), except in a roster batch (one with any pub.techne.draft.membership write), which stops at its first refused write and reports each later one as Conflict, not written; as a circle, every prefix of its membership writes must keep the circle a manager. Send a failed batch again whole: re-putting what landed is a no-op (in an app's space, only for its app or under covering scopes). Space scopes and space.private apply to each write as in putRecord: a first write is never refused for its space, but replacing a record already written for an app's space needs the app its key names or `space:` scopes covering it, and that write's result is Forbidden. Every write names its `space` (a write with none refuses the whole call, InvalidRequest; public records go through com.atproto.repo.putRecord). Draft tier.";
5433
6180
  readonly input: {
5434
6181
  readonly encoding: "application/json";
5435
6182
  readonly schema: {
@@ -5480,7 +6227,7 @@ export declare const schemaDict: {
5480
6227
  readonly description: "HTTP 403. repo is not the caller's own (or a collective's or circle's the caller may write as, see the description). Nothing is written.";
5481
6228
  }, {
5482
6229
  readonly name: "LastManager";
5483
- readonly description: "HTTP 409. The write, as a circle, would leave it with members and nobody at role >= 30. Make someone else manager first. Nothing is written.";
6230
+ readonly description: "HTTP 409. The write, as a circle, would leave it with members and nobody at role >= 30, after the whole batch or after any prefix of its membership writes (a roster batch stops at its first refused write, so any prefix may be what is left written). Make someone else manager first. Nothing is written.";
5484
6231
  }, {
5485
6232
  readonly name: "AccountDeleting";
5486
6233
  readonly description: "HTTP 403. The caller's account is being deleted, or is deleted. Nothing more is written; writes applied before the deletion began go with the account.";
@@ -5563,8 +6310,8 @@ export declare const schemaDict: {
5563
6310
  readonly properties: {
5564
6311
  readonly error: {
5565
6312
  readonly type: "string";
5566
- readonly description: "InvalidRequest (malformed, a body that fails its collection's published lexicon, or a record over 2 MiB, more than a putRecord body may be), InvalidSwap (swapCid did not match the current version), Conflict (the same key holds a public record in the caller's repo, or a concurrent write replaced this version before it was recorded), IdentityConflict (the write would change a contact's identity, which writing again never fixes; see putRecord), DuplicatePhone (a contact write introduces a number another of the caller's active contacts carries; see putRecord) or Forbidden (the call's `space:` scopes do not cover the write, or it replaces a record already written for an app's space and the caller is neither the app its key names nor holds `space:` scopes covering it; see putRecord).";
5567
- readonly knownValues: ["InvalidRequest", "InvalidSwap", "Conflict", "IdentityConflict", "DuplicatePhone"];
6313
+ readonly description: "InvalidRequest (malformed, a body that fails its collection's published lexicon, or a record over 2 MiB, more than a putRecord body may be), InvalidSwap (swapCid did not match the current version), Conflict (the same key holds a public record in the caller's repo, or a concurrent write replaced this version before it was recorded), IdentityConflict (the write would change a contact's identity, which writing again never fixes; see putRecord), DuplicatePhone (a contact write introduces a number another of the caller's active contacts carries; see putRecord), RateLimitExceeded (a contact write that binds a number to an account found the caller's phone lookups spent; retry it in a minute) or Forbidden (the call's `space:` scopes do not cover the write, or it replaces a record already written for an app's space and the caller is neither the app its key names nor holds `space:` scopes covering it; see putRecord).";
6314
+ readonly knownValues: ["InvalidRequest", "InvalidSwap", "Conflict", "IdentityConflict", "DuplicatePhone", "RateLimitExceeded", "Forbidden"];
5568
6315
  };
5569
6316
  readonly message: {
5570
6317
  readonly type: "string";
@@ -5659,7 +6406,7 @@ export declare const schemaDict: {
5659
6406
  readonly main: {
5660
6407
  readonly type: "record";
5661
6408
  readonly key: "any";
5662
- readonly description: "Publishers use sidecar_rkey(subject AT-URI), one research record per place per writer. `any` permits that convention but cannot enforce it.";
6409
+ readonly description: "Publishers use sidecar_rkey(subject AT-URI), one research record per place per writer. Readers do not depend on the key: the AppView uses the newest research record about a place from a trusted writer.";
5663
6410
  readonly record: {
5664
6411
  readonly type: "object";
5665
6412
  readonly required: ["subject", "createdAt"];
@@ -6032,7 +6779,7 @@ export declare const schemaDict: {
6032
6779
  readonly main: {
6033
6780
  readonly type: "record";
6034
6781
  readonly key: "any";
6035
- readonly description: "Publishers use sidecar_rkey(curated record AT-URI), so each curated record has one provenance per curator. `any` permits that convention but cannot enforce it.";
6782
+ readonly description: "Publishers use sidecar_rkey(curated record AT-URI), so each curated record has one provenance per curator. Readers do not depend on the key: the AppView finds a curated record's provenance by `subject` in the curator's repo.";
6036
6783
  readonly record: {
6037
6784
  readonly type: "object";
6038
6785
  readonly required: ["subject", "sources", "readiness", "createdAt"];
@@ -6759,6 +7506,32 @@ export declare const schemaDict: {
6759
7506
  readonly type: "string";
6760
7507
  readonly format: "handle";
6761
7508
  };
7509
+ readonly linked: {
7510
+ readonly type: "array";
7511
+ readonly items: {
7512
+ readonly type: "ref";
7513
+ readonly ref: "lex:pub.techne.draft.query.getRecords#linkedHandle";
7514
+ };
7515
+ readonly description: "The other accounts linked to this one now (the same person; links are public, alsoKnownAs on both DIDs). Absent when none, and while a sign-in method of any account of the person is frozen (a freeze pauses the link). A linked account that is not active or is suspended is left out.";
7516
+ };
7517
+ };
7518
+ };
7519
+ readonly linkedHandle: {
7520
+ readonly type: "object";
7521
+ readonly required: ["did"];
7522
+ readonly properties: {
7523
+ readonly did: {
7524
+ readonly type: "string";
7525
+ readonly format: "did";
7526
+ };
7527
+ readonly handle: {
7528
+ readonly type: "string";
7529
+ readonly format: "handle";
7530
+ };
7531
+ readonly displayName: {
7532
+ readonly type: "string";
7533
+ readonly description: "The linked account's public profile name, when it has one.";
7534
+ };
6762
7535
  };
6763
7536
  };
6764
7537
  readonly resolved: {
@@ -7159,7 +7932,7 @@ export declare const schemaDict: {
7159
7932
  readonly main: {
7160
7933
  readonly type: "record";
7161
7934
  readonly key: "any";
7162
- readonly description: "Publishers use sidecar_rkey(subject AT-URI), so a rule holds one receipt per record, updated when it reprocesses. `any` permits that convention but cannot enforce it.";
7935
+ readonly description: "Publishers use sidecar_rkey(subject AT-URI), so a rule holds one receipt per record, updated when it reprocesses. Readers do not depend on the key: the AppView counts a receipt from the rule's account about the record's current cid.";
7163
7936
  readonly record: {
7164
7937
  readonly type: "object";
7165
7938
  readonly required: ["subject", "createdAt"];
@@ -7234,7 +8007,7 @@ export declare const schemaDict: {
7234
8007
  readonly defs: {
7235
8008
  readonly main: {
7236
8009
  readonly type: "procedure";
7237
- readonly description: "Operator only. Stop indexing one author's records of a community or requested type, and remove the ones this platform indexed. The block outlives the author's account here, so neither the firehose nor a backfill brings the records back. Other authors' records of the type are untouched. The records stay in the author's repo; this platform stops serving them.";
8010
+ readonly description: "Operator only, with the moderate scope. Stop indexing one author's records of a community or requested type, and remove the ones this platform indexed. The block outlives the author's account here, so neither the firehose nor a backfill brings the records back. Other authors' records of the type are untouched. The records stay in the author's repo; this platform stops serving them.";
7238
8011
  readonly input: {
7239
8012
  readonly encoding: "application/json";
7240
8013
  readonly schema: {
@@ -7291,11 +8064,17 @@ export declare const schemaDict: {
7291
8064
  readonly name: "AuthenticationRequired";
7292
8065
  readonly description: "Blocking is a signed-in act.";
7293
8066
  }, {
7294
- readonly name: "Forbidden";
7295
- readonly description: "The caller is not an operator of this platform.";
8067
+ readonly name: "NotAuthorized";
8068
+ readonly description: "The caller is not an operator of this platform, or the call does not carry the moderate scope (HTTP 403).";
8069
+ }, {
8070
+ readonly name: "ProgramRefused";
8071
+ readonly description: "The caller is a program's token: a program never reaches an operator method (HTTP 403).";
7296
8072
  }, {
7297
8073
  readonly name: "UnknownType";
7298
8074
  readonly description: "`nsid` names no community or requested type (our own types are not limited).";
8075
+ }, {
8076
+ readonly name: "InvalidRequest";
8077
+ readonly description: "`reason` is blank or over 1000 characters, or `author` is not a DID (HTTP 400).";
7299
8078
  }];
7300
8079
  };
7301
8080
  };
@@ -7884,7 +8663,7 @@ export declare const schemaDict: {
7884
8663
  readonly defs: {
7885
8664
  readonly main: {
7886
8665
  readonly type: "procedure";
7887
- readonly description: "Operator only. Stop indexing a community or requested type and remove every record of it this platform indexed. The type is marked blocked (it is no longer loaded, searched or listed, except in listTypes filtered to its creator (`creator`) and in getType, which still answer it as blocked) and put on the block list, so neither the firehose nor a backfill brings its records back. The records stay in their authors' repos; this platform stops serving them. Our own platform types cannot be purged.";
8666
+ readonly description: "Operator only, with the moderate scope. Stop indexing a community or requested type and remove every record of it this platform indexed. The type is marked blocked (it is no longer loaded, searched or listed, except in listTypes filtered to its creator (`creator`) and in getType, which still answer it as blocked) and put on the block list, so neither the firehose nor a backfill brings its records back. The records stay in their authors' repos; this platform stops serving them. Our own platform types cannot be purged.";
7888
8667
  readonly input: {
7889
8668
  readonly encoding: "application/json";
7890
8669
  readonly schema: {
@@ -7932,11 +8711,17 @@ export declare const schemaDict: {
7932
8711
  readonly name: "AuthenticationRequired";
7933
8712
  readonly description: "Purging is a signed-in act.";
7934
8713
  }, {
7935
- readonly name: "Forbidden";
7936
- readonly description: "The caller is not an operator of this platform.";
8714
+ readonly name: "NotAuthorized";
8715
+ readonly description: "The caller is not an operator of this platform, or the call does not carry the moderate scope (HTTP 403).";
8716
+ }, {
8717
+ readonly name: "ProgramRefused";
8718
+ readonly description: "The caller is a program's token: a program never reaches an operator method (HTTP 403).";
7937
8719
  }, {
7938
8720
  readonly name: "UnknownType";
7939
8721
  readonly description: "`nsid` names no community or requested type (our own types cannot be purged).";
8722
+ }, {
8723
+ readonly name: "InvalidRequest";
8724
+ readonly description: "`reason` is blank or over 1000 characters (HTTP 400).";
7940
8725
  }];
7941
8726
  };
7942
8727
  };
@@ -8051,7 +8836,7 @@ export declare const schemaDict: {
8051
8836
  readonly main: {
8052
8837
  readonly type: "record";
8053
8838
  readonly key: "any";
8054
- readonly description: "Writers use the retired identity's DID as the rkey, so each writer holds at most one per identity. `any` permits that convention but cannot enforce it, so readers count a retirement only at rkey = its subject.";
8839
+ readonly description: "Writers use the retired identity's DID as the rkey, so each writer holds at most one per identity. Enforced by the AppView on read: a retirement at any other key is not counted.";
8055
8840
  readonly record: {
8056
8841
  readonly type: "object";
8057
8842
  readonly required: ["subject", "createdAt"];
@@ -8115,7 +8900,7 @@ export declare const schemaDict: {
8115
8900
  readonly main: {
8116
8901
  readonly type: "record";
8117
8902
  readonly key: "any";
8118
- readonly description: "One record per pair: publishers put the lower AT-URI in `subject` and use pair_rkey(subject, other) (regenos_lexicons::sidecar), so the reversed pair cannot get a second record. `any` permits that convention but cannot enforce it. A pair asserted both sameAs and distinctFrom by writers a reader trusts is a conflict that reader resolves.";
8903
+ readonly description: "One record per pair: publishers put the lower AT-URI in `subject` and use pair_rkey(subject, other) (regenos_lexicons::sidecar), so the reversed pair cannot get a second record. Readers do not depend on the key: the AppView walks pairs from both ends, so a reversed or repeated pair is the same link. A pair asserted both sameAs and distinctFrom by writers a reader trusts is a conflict that reader resolves.";
8119
8904
  readonly record: {
8120
8905
  readonly type: "object";
8121
8906
  readonly required: ["subject", "other", "createdAt"];
@@ -8273,7 +9058,7 @@ export declare const schemaDict: {
8273
9058
  readonly main: {
8274
9059
  readonly type: "record";
8275
9060
  readonly key: "any";
8276
- readonly description: "Publishers use sidecar_rkey(subject AT-URI), one per record. `any` permits that convention but cannot enforce it.";
9061
+ readonly description: "Publishers use sidecar_rkey(subject AT-URI), one per record. Readers mostly find source sidecars by `subject` at any key; the commons curator reads only this key to tell whether a source item is gone upstream.";
8277
9062
  readonly record: {
8278
9063
  readonly type: "object";
8279
9064
  readonly required: ["subject", "sourceStatus", "lastSeenAt", "createdAt"];
@@ -8374,7 +9159,7 @@ export declare const schemaDict: {
8374
9159
  };
8375
9160
  };
8376
9161
  };
8377
- readonly description: "Publishers use an immutable content-derived rkey: changed credit or license content creates a new record and CID; existing content keys are never rewritten. The key:any schema permits this convention but cannot enforce immutability.";
9162
+ readonly description: "Publishers use an immutable content-derived rkey: changed credit or license content creates a new record and CID; existing content keys are never rewritten. Readers do not depend on the key: a sourceAttribution is read only through a strongRef (uri and cid) that names it.";
8378
9163
  };
8379
9164
  };
8380
9165
  };
@@ -8470,7 +9255,7 @@ export declare const schemaDict: {
8470
9255
  readonly main: {
8471
9256
  readonly type: "record";
8472
9257
  readonly key: "any";
8473
- readonly description: "Publishers use sidecar_rkey(subject AT-URI), one summary per record per writer. `any` permits that convention but cannot enforce it.";
9258
+ readonly description: "Publishers use sidecar_rkey(subject AT-URI), so a writer's rewrite replaces its one summary. Readers do not depend on the key: the AppView finds summaries by `subject` and its cid and uses the newest from a trusted writer.";
8474
9259
  readonly record: {
8475
9260
  readonly type: "object";
8476
9261
  readonly required: ["subject", "text", "createdAt"];
@@ -8579,7 +9364,7 @@ export declare const schemaDict: {
8579
9364
  readonly main: {
8580
9365
  readonly type: "record";
8581
9366
  readonly key: "any";
8582
- readonly description: "Publishers use sidecar_rkey(subject AT-URI), so a writer holds one verdict per record, updated when a new version is judged. `any` permits that convention but cannot enforce it.";
9367
+ readonly description: "Publishers use sidecar_rkey(subject AT-URI), so a writer holds one verdict per record, updated when a new version is judged. Readers do not depend on the key: any trusted verdict naming the subject counts.";
8583
9368
  readonly record: {
8584
9369
  readonly type: "object";
8585
9370
  readonly required: ["subject", "values", "createdAt"];
@@ -8617,7 +9402,7 @@ export declare const schemaDict: {
8617
9402
  readonly main: {
8618
9403
  readonly type: "record";
8619
9404
  readonly key: "any";
8620
- readonly description: "The record key is the subject DID, so an issuer holds at most one per account. `any` permits that convention but cannot enforce it, so readers count a verification only at rkey = its subject DID.";
9405
+ readonly description: "The record key is the subject DID, so an issuer holds at most one per account. Enforced by the AppView on read: a verification at any other key is not counted.";
8621
9406
  readonly record: {
8622
9407
  readonly type: "object";
8623
9408
  readonly required: ["subject", "createdAt"];
@@ -8690,7 +9475,7 @@ export declare const schemaDict: {
8690
9475
  readonly defs: {
8691
9476
  readonly main: {
8692
9477
  readonly type: "procedure";
8693
- readonly description: "Let an app read a space: writes the space authority's pub.techne.draft.appAccess for the space and the app, placed in the space. Whoever passes the space type's published manage leg may call it (the owner of a personal space; Facilitator and up for a collective's): the record is written with the authority's pen, which is what the manage leg grants. Approving again is a no-op. A member's request (pub.techne.draft.appAccessRequest) for the same space and app becomes approved. Its only other effect is clearing the request from the approvers' inboxes.";
9478
+ readonly description: "Let an app read a space: writes the space authority's pub.techne.draft.appAccess for the space and the app, placed in the space. Whoever passes the space type's published manage leg may call it (the owner of a personal space itself, never another account linked to it; Facilitator and up for a collective's, a role held by any of the caller's linked accounts included): the record is written into the authority's repo with the authority's pen, which is what the manage leg grants. Approving again is a no-op. A member's request (pub.techne.draft.appAccessRequest) for the same space and app becomes approved. Its only other effect is clearing the request from the approvers' inboxes.";
8694
9479
  readonly input: {
8695
9480
  readonly encoding: "application/json";
8696
9481
  readonly schema: {
@@ -8738,7 +9523,7 @@ export declare const schemaDict: {
8738
9523
  readonly description: "Malformed input, or a space type that takes no app approvals yet.";
8739
9524
  }, {
8740
9525
  readonly name: "NotAuthorized";
8741
- readonly description: "The caller does not pass the space type's manage leg.";
9526
+ readonly description: "The caller does not pass the space type's manage leg: for a personal space, the caller is not its owner (an account linked to the owner is refused too).";
8742
9527
  }];
8743
9528
  };
8744
9529
  };
@@ -8960,7 +9745,7 @@ export declare const schemaDict: {
8960
9745
  readonly defs: {
8961
9746
  readonly main: {
8962
9747
  readonly type: "query";
8963
- readonly description: "Whether an app may read a space, derived and never stored: `approved` when the authority's pub.techne.draft.appAccess exists, `pending` when a pub.techne.draft.appAccessRequest counts without one, `none` otherwise. A request counts only while its requester can read the space, and for a caller who is not an approver only the caller's own request counts (an approver sees every request). Nothing stores a denial. `approvers` are who can approve it: the manage-leg holders, or the owner of a personal space. `requesterIsApprover` says the caller is one of them, so approving is one tap and sends no notification. Approvers are notified of a request only when its requester can read the space and is not an approver. Only a reader of the space may ask.";
9748
+ readonly description: "Whether an app may read a space, derived and never stored: `approved` when the authority's pub.techne.draft.appAccess exists, `pending` when a pub.techne.draft.appAccessRequest counts without one, `none` otherwise. A request counts only while its requester can read the space, and for a caller who is not an approver only requests by the caller's own accounts (its person) count (an approver sees every request). Nothing stores a denial. `approvers` are who can approve it, each an account social.scenius.approveAppAccess accepts: the manage-leg holders, or the owner of a personal space itself (never another account linked to it). `requesterIsApprover` says the caller's own account is one of them, so approving is one tap and sends no notification. Approvers are notified of a request only when its requester can read the space and is not an approver. Only a reader of the space may ask.";
8964
9749
  readonly parameters: {
8965
9750
  readonly type: "params";
8966
9751
  readonly properties: {
@@ -9206,7 +9991,7 @@ export declare const schemaDict: {
9206
9991
  readonly defs: {
9207
9992
  readonly main: {
9208
9993
  readonly type: "query";
9209
- readonly description: "What an app gets from the caller, for its sign-in to list: every space the caller passes the manage leg of (their own included) whose authority has approved the app, each with the criteria that approval states for future spaces.";
9994
+ readonly description: "What an app gets from the caller, for its sign-in to list: every space the caller's person passes the manage leg of (the caller's own, and its linked accounts' spaces, included) whose authority has approved the app, each with the criteria that approval states for future spaces.";
9210
9995
  readonly parameters: {
9211
9996
  readonly type: "params";
9212
9997
  readonly properties: {
@@ -11020,7 +11805,7 @@ export declare const schemas: ({
11020
11805
  } | {
11021
11806
  readonly lexicon: 1;
11022
11807
  readonly id: "pub.techne.draft.appAccess";
11023
- readonly description: "A space's authority lets one app (an OAuth client) read one space: our published form of atproto 0016's simplespace `appAccess`. 0016 ANDs two axes for a read: the reader passes the space's read policy, and the app has appAccess for the space. Authored by the space's AUTHORITY, in its own repo, placed IN the space it names (as a `share` is), so the space's readers see which apps may read it. Approved by whoever passes the space type's published `manage` leg (the owner of a personal space; Facilitator and up for a collective's), written with the authority's pen. Approval is per space. `criteria` is a stated rule for future spaces, stored and shown in social.scenius.listAppAccess; nothing evaluates it yet: future-space coverage is evaluated when `space:` grant enforcement exists. Deleting it withdraws the approval for future reads. Nothing stores a denial. Enforcement arrives with `space:` OAuth grants: before Spaces a proxied read carries no client identity.";
11808
+ readonly description: "A space's authority lets one app (an OAuth client) read one space: our published form of atproto 0016's simplespace `appAccess`. 0016 ANDs two axes for a read: the reader passes the space's read policy, and the app has appAccess for the space. Authored by the space's AUTHORITY, in its own repo, placed IN the space it names (as a `share` is), so the space's readers see which apps may read it. Approved by whoever passes the space type's published `manage` leg (the owner of a personal space itself, never another account linked to it; Facilitator and up for a collective's, a role held by any of the caller's linked accounts included), written with the authority's pen. Approval is per space. `criteria` is a stated rule for future spaces, stored and shown in social.scenius.listAppAccess; nothing evaluates it yet: future-space coverage is evaluated when `space:` grant enforcement exists. Deleting it withdraws the approval for future reads. Nothing stores a denial. Enforcement arrives with `space:` OAuth grants: before Spaces a proxied read carries no client identity.";
11024
11809
  readonly defs: {
11025
11810
  readonly main: {
11026
11811
  readonly type: "record";
@@ -11072,7 +11857,7 @@ export declare const schemas: ({
11072
11857
  } | {
11073
11858
  readonly lexicon: 1;
11074
11859
  readonly id: "pub.techne.draft.appAccessRequest";
11075
- readonly description: "A member asks a space's authority to let one app read the space: the member is using the app and the space has not approved it. Authored by the member (the requester is the author), in their own repo, placed in their own `pub.techne.draft.space.personal/self`: it is the member's own intent, it names a space that may be private, and a member below the space's write policy could not place it in the space itself. When the requester can read the space and is not an approver, every holder of the space type's `manage` leg is notified and can approve (writing a `pub.techne.draft.appAccess`) or let it be; a requester who is an approver is notified of nothing and approves in one tap. Status is derived: approved when an appAccess exists, pending while a request counts without one, none otherwise; nothing stores a denial. A request counts only while its requester can read the space, and a caller who is not an approver sees only their own request. Deleting it withdraws the request.";
11860
+ readonly description: "A member asks a space's authority to let one app read the space: the member is using the app and the space has not approved it. Authored by the member (the requester is the author), in their own repo, placed in their own `pub.techne.draft.space.personal/self`: it is the member's own intent, it names a space that may be private, and a member below the space's write policy could not place it in the space itself. When the requester can read the space and is not an approver, every approver social.scenius.getAppAccess lists (the owner of a personal space itself, never an account linked to it; a collective's members who pass the space type's `manage` leg) is notified and can approve (writing a `pub.techne.draft.appAccess`) or let it be; a requester who is an approver is notified of nothing and approves in one tap. Status is derived: approved when an appAccess exists, pending while a request counts without one, none otherwise; nothing stores a denial. A request counts only while its requester can read the space, and a caller who is not an approver sees only requests by their own accounts (their person). Deleting it withdraws the request.";
11076
11861
  readonly defs: {
11077
11862
  readonly main: {
11078
11863
  readonly type: "record";
@@ -11188,7 +11973,7 @@ export declare const schemas: ({
11188
11973
  readonly main: {
11189
11974
  readonly type: "record";
11190
11975
  readonly key: "any";
11191
- readonly description: "Publishers use sidecar_rkey(subject AT-URI + '#' + questionSet name) so a new question bank replaces the assessment in place. `any` permits that convention but cannot enforce it.";
11976
+ readonly description: "Publishers use sidecar_rkey(subject AT-URI + '#' + questionSet name) so a new question bank replaces the assessment in place. Readers do not depend on the key: the AppView finds assessments by `subject` and its cid and uses the newest.";
11192
11977
  readonly record: {
11193
11978
  readonly type: "object";
11194
11979
  readonly required: ["subject", "questionSet", "answers", "complete", "createdAt"];
@@ -11766,7 +12551,7 @@ export declare const schemas: ({
11766
12551
  readonly defs: {
11767
12552
  readonly main: {
11768
12553
  readonly type: "procedure";
11769
- readonly description: "Move a custodial account's handle to the deployment's current handle domain (handles move from *.scenius.social to the settled domain). Served by the AppView, operator-only (the caller's DID is one of OPERATOR_DIDS). Keeps the account's label unless `label` is given; updates the handle on the PDS and in the AppView. An account has one valid handle at a time: the previous one is retired, never issued again, and links that carry it redirect to the account's DID route. Everything else already refers to the account by DID and does not change.";
12554
+ readonly description: "Move a custodial account's handle to the deployment's current handle domain (handles move from *.scenius.social to the settled domain). Served by the AppView, operator-only: the caller's DID is one of OPERATOR_DIDS and the call carries the moderate scope. Keeps the account's label unless `label` is given; updates the handle on the PDS and in the AppView. An account has one valid handle at a time: the previous one is retired, never issued again, and links that carry it redirect to the account's DID route. Everything else already refers to the account by DID and does not change.";
11770
12555
  readonly input: {
11771
12556
  readonly encoding: "application/json";
11772
12557
  readonly schema: {
@@ -11814,7 +12599,10 @@ export declare const schemas: ({
11814
12599
  readonly description: "No signed-in caller.";
11815
12600
  }, {
11816
12601
  readonly name: "NotAuthorized";
11817
- readonly description: "The caller is not an operator.";
12602
+ readonly description: "The caller is not an operator, or the call does not carry the moderate scope (HTTP 403).";
12603
+ }, {
12604
+ readonly name: "ProgramRefused";
12605
+ readonly description: "The caller is a program's token: a program never reaches an operator method (HTTP 403).";
11818
12606
  }, {
11819
12607
  readonly name: "InvalidRequest";
11820
12608
  readonly description: "`did` is not a DID; the account's keys are not held here (a BYOD account moves its own handle); the account has no handle and no `label` was given; the label is reserved or not a valid handle label; or the account has no claimed handle yet.";
@@ -12059,7 +12847,7 @@ export declare const schemas: ({
12059
12847
  readonly main: {
12060
12848
  readonly type: "record";
12061
12849
  readonly key: "any";
12062
- readonly description: "Publishers use sidecar_rkey(subject AT-URI), one per place per writer. `any` permits that convention but cannot enforce it.";
12850
+ readonly description: "Publishers use sidecar_rkey(subject AT-URI), one per place per writer. Readers do not depend on the key: they read every containedIn about a place.";
12063
12851
  readonly record: {
12064
12852
  readonly type: "object";
12065
12853
  readonly required: ["subject", "container", "createdAt"];
@@ -12213,7 +13001,7 @@ export declare const schemas: ({
12213
13001
  readonly main: {
12214
13002
  readonly type: "record";
12215
13003
  readonly key: "any";
12216
- readonly description: "Publishers use sidecar_rkey(claim AT-URI), one derivation per claim per writer. `any` permits that convention but cannot enforce it.";
13004
+ readonly description: "Publishers use sidecar_rkey(claim AT-URI), one derivation per claim per writer. Readers do not depend on the key: they find a derivation by the claim it names.";
12217
13005
  readonly record: {
12218
13006
  readonly type: "object";
12219
13007
  readonly required: ["subject", "method", "createdAt"];
@@ -12348,7 +13136,7 @@ export declare const schemas: ({
12348
13136
  readonly main: {
12349
13137
  readonly type: "record";
12350
13138
  readonly key: "any";
12351
- readonly description: "The rkey is sidecar_rkey(subject.uri) (regenos-lexicons `sidecar`): lowercase base32 of the sha256 of the subject's AT-URI, so a rewrite updates this record in place and a subject has at most one description per author. `any` permits that convention but cannot enforce it.";
13139
+ readonly description: "The rkey is sidecar_rkey(subject.uri) (regenos-lexicons `sidecar`): lowercase base32 of the sha256 of the subject's AT-URI, so a rewrite updates this record in place and a subject has at most one description per author. Enforced by its readers: the commons rules fetch only the record at sidecar_rkey(subject), so a description at any other key is not read.";
12352
13140
  readonly record: {
12353
13141
  readonly type: "object";
12354
13142
  readonly required: ["subject", "text", "createdAt"];
@@ -12381,7 +13169,7 @@ export declare const schemas: ({
12381
13169
  readonly main: {
12382
13170
  readonly type: "record";
12383
13171
  readonly key: "any";
12384
- readonly description: "One record per pair: publishers put the lower AT-URI in `subject` and use pair_rkey(subject, other) (regenos_lexicons::sidecar), so the reversed pair cannot get a second record. `any` permits that convention but cannot enforce it. A pair asserted both sameAs and distinctFrom by writers a reader trusts is a conflict that reader resolves.";
13172
+ readonly description: "One record per pair: publishers put the lower AT-URI in `subject` and use pair_rkey(subject, other) (regenos_lexicons::sidecar), so the reversed pair cannot get a second record. Readers do not depend on the key: the commons curator reads a pair from both ends, so a reversed or repeated pair is the same wall. A pair asserted both sameAs and distinctFrom by writers a reader trusts is a conflict that reader resolves.";
12385
13173
  readonly record: {
12386
13174
  readonly type: "object";
12387
13175
  readonly required: ["subject", "other", "createdAt"];
@@ -12665,7 +13453,7 @@ export declare const schemas: ({
12665
13453
  readonly main: {
12666
13454
  readonly type: "record";
12667
13455
  readonly key: "any";
12668
- readonly description: "Publishers use sidecar_rkey(subject AT-URI) (regenos_lexicons::sidecar), so a rewrite for the same subject updates this record. `any` permits that convention but cannot enforce it.";
13456
+ readonly description: "Publishers use sidecar_rkey(subject AT-URI) (regenos_lexicons::sidecar), so a rewrite for the same subject updates this record. Readers do not depend on the key: they take a trusted geo about the subject at any key.";
12669
13457
  readonly record: {
12670
13458
  readonly type: "object";
12671
13459
  readonly required: ["subject", "location", "createdAt"];
@@ -12702,7 +13490,7 @@ export declare const schemas: ({
12702
13490
  readonly main: {
12703
13491
  readonly type: "record";
12704
13492
  readonly key: "any";
12705
- readonly description: "Publishers use sidecar_rkey(subject AT-URI), one per event per writer. `any` permits that convention but cannot enforce it.";
13493
+ readonly description: "Publishers use sidecar_rkey(subject AT-URI), one per event per writer. Readers do not depend on the key: the AppView reads every trusted heldAt about an event.";
12706
13494
  readonly record: {
12707
13495
  readonly type: "object";
12708
13496
  readonly required: ["subject", "place", "createdAt"];
@@ -12806,7 +13594,7 @@ export declare const schemas: ({
12806
13594
  readonly defs: {
12807
13595
  readonly main: {
12808
13596
  readonly type: "procedure";
12809
- readonly description: "A PDS's issuer hook: the PDS verified a one-time code for `channel` and signed `did` in (or created it). The issuer binds an unbound channel to the account and issues a pub.techne.draft.credential, or re-issues when it is already bound to that account. It never moves a bound channel, never binds a phone number back to the account that removed it (`ChannelReleased`), and binds only accounts whose DID document names the calling PDS (`#atproto_pds`). Authenticated and signed exactly as identity.resolve. Delivered at least once; idempotent per (channel, did).";
13597
+ readonly description: "A PDS's issuer hook: the PDS verified a one-time code for `channel` and signed `did` in (or created it). The issuer binds an unbound channel to the account and issues a pub.techne.draft.credential, or re-issues when it is already bound to that account. A phone it binds or re-binds releases the invitations and holds waiting on that number to the account (as a sign-in on the platform does). It never moves a bound channel, never signs in a frozen method (`MethodFrozen`), never binds a phone number back to the account that removed it (`ChannelReleased`), and binds only accounts whose DID document names the calling PDS (`#atproto_pds`). Authenticated and signed exactly as identity.resolve. Delivered at least once; idempotent per (channel, did).";
12810
13598
  readonly input: {
12811
13599
  readonly encoding: "application/json";
12812
13600
  readonly schema: {
@@ -12836,6 +13624,10 @@ export declare const schemas: ({
12836
13624
  readonly type: "boolean";
12837
13625
  readonly description: "The PDS created the account in this sign-in.";
12838
13626
  };
13627
+ readonly termsShown: {
13628
+ readonly type: "boolean";
13629
+ readonly description: "Optional; sent only as true, and only with `newAccount`. The PDS's sign-in page named its Terms of Use and Privacy Policy when this account was made there, so the issuer records the person's assent. Absent: nothing to record (a returning sign-in, a page without the line, an older PDS, or a first-party app that shows its own terms).";
13630
+ };
12839
13631
  };
12840
13632
  };
12841
13633
  };
@@ -12873,6 +13665,9 @@ export declare const schemas: ({
12873
13665
  }, {
12874
13666
  readonly name: "ChannelReleased";
12875
13667
  readonly description: "The account named by `did` removed this phone number (identity.unlinkMethod) and nobody has bound it since (HTTP 409). Never retried: the account gets the number back only by adding it again (identity.finishAddMethod).";
13668
+ }, {
13669
+ readonly name: "MethodFrozen";
13670
+ readonly description: "This channel is a frozen method of the account (identity.manageMethods `freeze`; HTTP 403): it does not sign in until the freeze ends. Not retried.";
12876
13671
  }, {
12877
13672
  readonly name: "RateLimitExceeded";
12878
13673
  readonly description: "As identity.resolve (HTTP 429).";
@@ -12926,12 +13721,56 @@ export declare const schemas: ({
12926
13721
  }, {
12927
13722
  readonly name: "RateLimitExceeded";
12928
13723
  readonly description: "Too many codes sent to this address (HTTP 429).";
13724
+ }, {
13725
+ readonly name: "MethodFrozen";
13726
+ readonly description: "The channel is a frozen sign-in method of an account (HTTP 403); it can't be proved anywhere until the freeze ends.";
12929
13727
  }, {
12930
13728
  readonly name: "SendFailed";
12931
13729
  readonly description: "The code could not be texted to that phone number (HTTP 502). Try again.";
12932
13730
  }];
12933
13731
  };
12934
13732
  };
13733
+ } | {
13734
+ readonly lexicon: 1;
13735
+ readonly id: "pub.techne.draft.identity.cancelPendingChange";
13736
+ readonly defs: {
13737
+ readonly main: {
13738
+ readonly type: "procedure";
13739
+ readonly description: "Cancel one of the caller's pending sign-in changes (a method removal, an account deletion or a first recovery mark that waits; its `id` is the `pending` identity.listMethods, identity.unlinkMethod or deleteAccount answered), by the sign-in method rules: any of the account's methods may cancel a wait, so a signed-in session may, with no step-up. For an account whose PDS has no account page of its own; the identity PDS cancels through identity.manageMethods `cancel`. A frozen method may cancel too, its own removal included. Nothing else changes.";
13740
+ readonly input: {
13741
+ readonly encoding: "application/json";
13742
+ readonly schema: {
13743
+ readonly type: "object";
13744
+ readonly required: ["id"];
13745
+ readonly properties: {
13746
+ readonly id: {
13747
+ readonly type: "string";
13748
+ readonly maxLength: 64;
13749
+ };
13750
+ };
13751
+ };
13752
+ };
13753
+ readonly output: {
13754
+ readonly encoding: "application/json";
13755
+ readonly schema: {
13756
+ readonly type: "object";
13757
+ readonly required: ["ok"];
13758
+ readonly properties: {
13759
+ readonly ok: {
13760
+ readonly type: "boolean";
13761
+ };
13762
+ };
13763
+ };
13764
+ };
13765
+ readonly errors: [{
13766
+ readonly name: "AuthenticationRequired";
13767
+ readonly description: "No signed-in caller.";
13768
+ }, {
13769
+ readonly name: "NotFound";
13770
+ readonly description: "No such pending change on the caller's account, or it already completed or was cancelled.";
13771
+ }];
13772
+ };
13773
+ };
12935
13774
  } | {
12936
13775
  readonly lexicon: 1;
12937
13776
  readonly id: "pub.techne.draft.identity.checkLinkToken";
@@ -13045,7 +13884,7 @@ export declare const schemas: ({
13045
13884
  readonly defs: {
13046
13885
  readonly main: {
13047
13886
  readonly type: "procedure";
13048
- readonly description: "Make a link token on the caller's identity PDS: a secret anyone can redeem (redeemLinkToken) once (one-time, the default) or any number of times by different accounts (`reusable`). With `grant`, the platform keeps a write it makes for each account that redeems it: when the identity PDS reports a redemption, the platform writes the redeemer's own pub.techne.draft.identity.linkRedemption record in their personal space and then writes `grant.write` as `grant.actAs` with the redeemer's DID in every \"$subject\" slot, exactly as identity.holdForPhone releases a hold: the caller must be able to write as `actAs` now and when the link is redeemed, a block either way between the redeemer and the caller or `actAs` writes nothing, and the record must be one permissioned.putRecord would take with the caller's DID in the slot. A one-time link's grant goes after its one write; a reusable link's is written once for each redeemer, under its own record key. A release never writes over a record already at its key: one there stays, and that redeemer's write is not made. Only an account hosted on the platform's identity PDS can make links. One call spends one of the caller's writes.";
13887
+ readonly description: "Make a link token on the caller's identity PDS: a secret anyone can redeem (redeemLinkToken) once (one-time, the default) or any number of times by different accounts (`reusable`). With `grant`, the platform keeps a write it makes for each account that redeems it: when the identity PDS reports a redemption, the platform writes the redeemer's own pub.techne.draft.identity.linkRedemption record in their personal space and then writes `grant.write` as `grant.actAs` with the redeemer's DID in every \"$subject\" slot (and their name in every \"$name\" slot), exactly as identity.holdForPhone releases a hold: the caller must be able to write as `actAs` now and when the link is redeemed, a block either way between the redeemer and the caller or `actAs` writes nothing, and the record must be one permissioned.putRecord would take with the caller's DID in the slot. A one-time link's grant goes after its one write; a reusable link's is written once for each redeemer, under its own record key. A release never writes over a record already at its key: one there stays, and that redeemer's write is not made. A pub.techne.draft.contact grant is likewise not made when any active contact of `actAs` already names the redeemer, by its `did` or by a saved number that resolves to them (an archived one does not count), so a grant like {name: \"$name\", did: \"$subject\"} adds each person to the owner's People once. Only an account hosted on the platform's identity PDS can make links. One call spends one of the caller's writes.";
13049
13888
  readonly input: {
13050
13889
  readonly encoding: "application/json";
13051
13890
  readonly schema: {
@@ -13135,50 +13974,123 @@ export declare const schemas: ({
13135
13974
  };
13136
13975
  readonly methodView: {
13137
13976
  readonly type: "object";
13138
- readonly description: "One sign-in method bound to the caller's account, masked.";
13977
+ readonly description: "One sign-in method of an account. `masked` is always masked. Only identity.manageMethods `list` (the identity PDS's signed hook, for the signed-in owner's own account page) adds `value`; identity.listMethods never does.";
13139
13978
  readonly required: ["bid", "type", "masked", "boundAt"];
13140
13979
  readonly properties: {
13141
13980
  readonly bid: {
13142
13981
  readonly type: "string";
13143
13982
  readonly maxLength: 64;
13144
- readonly description: "The binding id (the credential's record key). Names the method in unlinkMethod.";
13983
+ readonly description: "The method's id: the binding id (the credential's record key) of an email or phone, else the platform's id for it. Names the method in unlinkMethod and manageMethods.";
13145
13984
  };
13146
13985
  readonly type: {
13147
13986
  readonly type: "string";
13148
- readonly knownValues: ["email", "phone"];
13987
+ readonly knownValues: ["email", "phone", "passkey", "nostr", "recoveryCodes"];
13149
13988
  };
13150
13989
  readonly masked: {
13151
13990
  readonly type: "string";
13152
13991
  readonly maxLength: 320;
13153
- readonly description: "The channel with most of it hidden, e.g. `j•••@example.com`, `+1 ••• ••• 4567`.";
13992
+ readonly description: "The channel with most of it hidden, e.g. `j•••@example.com`, `+1 ••• ••• 4567`; a passkey's or Nostr key's label; `Recovery codes (n left)`.";
13993
+ };
13994
+ readonly value: {
13995
+ readonly type: "string";
13996
+ readonly maxLength: 320;
13997
+ readonly description: "An email's full address or a phone's full number (E.164). Sent only by identity.manageMethods `list`, to the identity PDS, for the owner's own account page; never in identity.listMethods, signInMethods or a notice. Absent on a passkey, Nostr key or recovery codes.";
13154
13998
  };
13155
13999
  readonly boundAt: {
13156
14000
  readonly type: "string";
13157
14001
  readonly format: "datetime";
13158
14002
  };
14003
+ readonly recovery: {
14004
+ readonly type: "boolean";
14005
+ readonly description: "A recovery method of this account. Private: only the account sees it.";
14006
+ };
14007
+ readonly frozenUntil: {
14008
+ readonly type: "string";
14009
+ readonly format: "datetime";
14010
+ readonly description: "Frozen: it signs in nowhere until then, or until a recovery method lifts it.";
14011
+ };
14012
+ readonly programs: {
14013
+ readonly type: "boolean";
14014
+ readonly description: "\"Programs can sign in with this key\" (identity.manageMethods setPrograms). Present on the types that support it (a Nostr key), off by default. Never on for a recovery method.";
14015
+ };
14016
+ };
14017
+ };
14018
+ readonly pendingChange: {
14019
+ readonly type: "object";
14020
+ readonly description: "A change that waits for its time (a method's removal, the account's deletion, or a method's move onto another account (identity.manageMethods moveMethod), 7 days, or none for a move a recovery method proved; the account's first recovery mark, 24 hours). A move is completed by the platform once due, tried again after a failed write, and may be dropped instead (identity.manageMethods moveMethod says when). Any of the account's methods, a frozen one too, can cancel it until then; a wait during which one of the account's methods was frozen (even if a recovery method lifted the freeze early) is dropped when it runs out, not completed.";
14021
+ readonly required: ["id", "kind", "createdAt", "dueAt"];
14022
+ readonly properties: {
14023
+ readonly id: {
14024
+ readonly type: "string";
14025
+ readonly maxLength: 64;
14026
+ };
14027
+ readonly kind: {
14028
+ readonly type: "string";
14029
+ readonly knownValues: ["removeMethod", "deleteAccount", "markRecovery", "moveMethod"];
14030
+ };
14031
+ readonly method: {
14032
+ readonly type: "string";
14033
+ readonly maxLength: 64;
14034
+ readonly description: "The method it removes, marks or moves (for an incoming move, the other account's method).";
14035
+ };
14036
+ readonly other: {
14037
+ readonly type: "string";
14038
+ readonly format: "did";
14039
+ readonly description: "moveMethod: the other account. On the account the method leaves, where it goes; on the account it joins (identity.manageMethods `list` shows the move there too, and either account can cancel it), where it comes from.";
14040
+ };
14041
+ readonly createdAt: {
14042
+ readonly type: "string";
14043
+ readonly format: "datetime";
14044
+ };
14045
+ readonly dueAt: {
14046
+ readonly type: "string";
14047
+ readonly format: "datetime";
14048
+ };
13159
14049
  };
13160
14050
  };
13161
14051
  readonly linkView: {
13162
14052
  readonly type: "object";
13163
- readonly description: "An alias link between the caller's account and another.";
13164
- readonly required: ["did", "primary", "mutual"];
14053
+ readonly description: "Another account of the caller's person: the two are linked (identity.manageMethods moveMethod), every DID of the person naming every other in `alsoKnownAs`. Linked accounts have no primary, and a link is always mutual: identity.listMethods sends `mutual` as true.";
14054
+ readonly required: ["did", "mutual"];
14055
+ readonly properties: {
14056
+ readonly did: {
14057
+ readonly type: "string";
14058
+ readonly format: "did";
14059
+ readonly description: "The other account.";
14060
+ };
14061
+ readonly handle: {
14062
+ readonly type: "string";
14063
+ readonly format: "handle";
14064
+ };
14065
+ readonly mutual: {
14066
+ readonly type: "boolean";
14067
+ readonly description: "Retired: a link is always mutual, and identity.listMethods sends `true` (it was: both accounts hold a matching pub.techne.draft.accountLink).";
14068
+ };
14069
+ readonly since: {
14070
+ readonly type: "string";
14071
+ readonly format: "datetime";
14072
+ readonly description: "When the two accounts became one person.";
14073
+ };
14074
+ };
14075
+ };
14076
+ readonly personMember: {
14077
+ readonly type: "object";
14078
+ readonly description: "Another account of an account's person (identity.manageMethods `list` and moveMethod).";
14079
+ readonly required: ["did"];
13165
14080
  readonly properties: {
13166
14081
  readonly did: {
13167
14082
  readonly type: "string";
13168
- readonly format: "did";
13169
- readonly description: "The other account.";
14083
+ readonly format: "did";
14084
+ };
14085
+ readonly since: {
14086
+ readonly type: "string";
14087
+ readonly format: "datetime";
14088
+ readonly description: "When it joined the person. Sent by `list`.";
13170
14089
  };
13171
14090
  readonly handle: {
13172
14091
  readonly type: "string";
13173
14092
  readonly format: "handle";
13174
- };
13175
- readonly primary: {
13176
- readonly type: "string";
13177
- readonly format: "did";
13178
- };
13179
- readonly mutual: {
13180
- readonly type: "boolean";
13181
- readonly description: "Both accounts hold a matching pub.techne.draft.accountLink; a link counts only when true.";
14093
+ readonly description: "Its handle, when the platform knows one. Sent in addChannel's `otherPerson`.";
13182
14094
  };
13183
14095
  };
13184
14096
  };
@@ -13268,7 +14180,7 @@ export declare const schemas: ({
13268
14180
  readonly defs: {
13269
14181
  readonly main: {
13270
14182
  readonly type: "procedure";
13271
- readonly description: "Finish adding a sign-in method with the code identity.beginAddMethod sent. `added`: the method is now bound to the caller's account. `alreadyYours`: it already was (re-issued). `boundElsewhere`: it signs in to another account; `offer` says what the caller can do: `fold` (one of the two accounts is empty and new, so it can be folded into the other with identity.fold) or `link` (both have history; identity.link records that they are the same person). The offer's token is single-use, bound to both accounts, the channel and this session, and lasts 10 minutes. `unavailable`: the method cannot be added right now.";
14183
+ readonly description: "Finish adding a sign-in method with the code identity.beginAddMethod sent. `added`: the method is now bound to the caller's account. `alreadyYours`: it already was (re-issued). `boundElsewhere`: it signs in to another account. When one of the two accounts is empty and new, `offer` (`fold`) says it can be folded into the other with identity.fold; when both hold something, `other` names that account and no offer is made: the two are linked by moving the method (identity.manageMethods moveMethod, on the identity PDS's account page). The `link` offer is retired. The offer's token is single-use, bound to both accounts, the channel and this session, and lasts 10 minutes. `unavailable`: the method cannot be added right now.";
13272
14184
  readonly input: {
13273
14185
  readonly encoding: "application/json";
13274
14186
  readonly schema: {
@@ -13299,11 +14211,17 @@ export declare const schemas: ({
13299
14211
  readonly method: {
13300
14212
  readonly type: "ref";
13301
14213
  readonly ref: "lex:pub.techne.draft.identity.defs#methodView";
14214
+ readonly description: "`added` / `alreadyYours`: the method. Absent on `boundElsewhere`: the other account's method is named only to the identity PDS (identity.manageMethods addChannel).";
13302
14215
  };
13303
14216
  readonly offer: {
13304
14217
  readonly type: "ref";
13305
14218
  readonly ref: "lex:pub.techne.draft.identity.finishAddMethod#offer";
13306
14219
  };
14220
+ readonly other: {
14221
+ readonly type: "string";
14222
+ readonly format: "did";
14223
+ readonly description: "`boundElsewhere` when both accounts hold something: the account the method signs in to (no `offer`).";
14224
+ };
13307
14225
  };
13308
14226
  };
13309
14227
  };
@@ -13316,6 +14234,12 @@ export declare const schemas: ({
13316
14234
  }, {
13317
14235
  readonly name: "RateLimitExceeded";
13318
14236
  readonly description: "A phone code: the provider that sent it is refusing more checks for this number for now (HTTP 429). Wait a few minutes.";
14237
+ }, {
14238
+ readonly name: "MethodFrozen";
14239
+ readonly description: "The channel was frozen on its account since the code was sent, or it would be new to the caller's account while one of its methods is frozen (HTTP 403).";
14240
+ }, {
14241
+ readonly name: "ProtectedAccount";
14242
+ readonly description: "The channel signs in to another account, and one of the two has a recovery mark, a live freeze, a pending change, or a passkey, Nostr key or recovery codes (HTTP 409): no fold or link is offered, and the other account is not named (no `boundElsewhere`).";
13319
14243
  }, {
13320
14244
  readonly name: "UpstreamFailure";
13321
14245
  readonly description: "A phone code: the provider that sent it could not be asked whether it matches (HTTP 502). The code is not spent; try again.";
@@ -13328,6 +14252,7 @@ export declare const schemas: ({
13328
14252
  readonly action: {
13329
14253
  readonly type: "string";
13330
14254
  readonly knownValues: ["fold", "link"];
14255
+ readonly description: "`fold`. (`link` is retired and no longer offered.)";
13331
14256
  };
13332
14257
  readonly token: {
13333
14258
  readonly type: "string";
@@ -13403,6 +14328,9 @@ export declare const schemas: ({
13403
14328
  }, {
13404
14329
  readonly name: "InvalidToken";
13405
14330
  readonly description: "The token is unknown, used, expired, or was issued to another session.";
14331
+ }, {
14332
+ readonly name: "ProtectedAccount";
14333
+ readonly description: "One of the two accounts has a recovery mark, a live freeze, a pending change, or a passkey, Nostr key or recovery codes since the offer (HTTP 409).";
13406
14334
  }, {
13407
14335
  readonly name: "NotEmpty";
13408
14336
  readonly description: "The account to fold gained a record or is 7 days old or more; link instead.";
@@ -13415,7 +14343,7 @@ export declare const schemas: ({
13415
14343
  readonly defs: {
13416
14344
  readonly main: {
13417
14345
  readonly type: "procedure";
13418
- readonly description: "Hold a write until someone proves a phone number: when an account proves `phone`, the platform fills every string value exactly \"$subject\" in `write.record` (and \"$subject\" in `write.rkey`) with that account's DID and every value exactly \"$now\" in the record with the time, and writes the record as `actAs` in `write.space` with what it holds for that account. Only the number's keyed hash is kept; the template may not contain the number. Every hold is answered alike, whether or not the number already has an account: one that has is released the next time it is proved (each phone sign-in proves it), never at once, so nothing here says whether a number has an account or whose it is. The caller must be able to write as `actAs` (its own DID, a collective or circle whose own member space (`space.collective.member/self`) it manages, or a collective it made that has nothing placed yet), now and again when the number is proved; a hold whose caller no longer may, or with a block either way between the new account and the caller or `actAs`, is dropped unwritten, as is one whose record the space does not admit. The record must be one permissioned.putRecord would take with the caller's DID in the slot, and must carry the slot. The nightly sweep deletes a hold 180 days after it was made. Holding again with the same number, `actAs`, `collection`, `space`, `rkey` and record `space` answers the existing hold unchanged (the first template wins; withdraw it with releasePhoneHold and hold again to change it). The template is shown to everyone who may write as `actAs` and read `space` (listPhoneHolds). Identity knows nothing about what the record means. Any signed-in DID; one call spends one of the caller's writes.";
14346
+ readonly description: "Hold a write until someone proves a phone number: when an account proves `phone`, the platform fills every string value exactly \"$subject\" in `write.record` (and \"$subject\" in `write.rkey`) with that account's DID, every value exactly \"$now\" in the record with the time and every value exactly \"$name\" with that account's name (its public pub.techne.draft.actor.profile displayName, trimmed, at most 64 graphemes, else its handle; a write waits until one is known), and writes the record as `actAs` in `write.space` with what it holds for that account. Only the number's keyed hash is kept; the template may not contain the number. Every hold is answered alike, whether or not the number already has an account: one that has is released the next time it is proved (each phone sign-in proves it), never at once, so nothing here says whether a number has an account or whose it is. The caller must be able to write as `actAs` (its own DID, a collective or circle whose own member space (`space.collective.member/self`) it manages, or a collective it made that has nothing placed yet), now and again when the number is proved; a hold whose caller no longer may, or with a block either way between the new account and the caller or `actAs`, is dropped unwritten, as is one whose record the space does not admit. The record must be one permissioned.putRecord would take with the caller's DID in the slot, and must carry the slot. The nightly sweep deletes a hold 180 days after it was made. Holding again with the same number, `actAs`, `collection`, `space`, `rkey` and record `space` answers the existing hold unchanged (the first template wins; withdraw it with releasePhoneHold and hold again to change it). The template is shown to everyone who may write as `actAs` and read `space` (listPhoneHolds). Identity knows nothing about what the record means. Any signed-in DID; one call spends one of the caller's writes.";
13419
14347
  readonly input: {
13420
14348
  readonly encoding: "application/json";
13421
14349
  readonly schema: {
@@ -13486,7 +14414,7 @@ export declare const schemas: ({
13486
14414
  };
13487
14415
  readonly record: {
13488
14416
  readonly type: "unknown";
13489
- readonly description: "The record, with the \"$subject\" (and optionally \"$now\") slots as string values.";
14417
+ readonly description: "The record, with the \"$subject\" (and optionally \"$now\" and \"$name\") slots as string values.";
13490
14418
  };
13491
14419
  };
13492
14420
  };
@@ -13497,7 +14425,7 @@ export declare const schemas: ({
13497
14425
  readonly defs: {
13498
14426
  readonly main: {
13499
14427
  readonly type: "procedure";
13500
- readonly description: "Link the caller's account with the other account named by the token identity.finishAddMethod offered: both accounts get a pub.techne.draft.accountLink in their space.personal naming the other and the primary, and, where this host holds the account's PLC rotation key, `alsoKnownAs` gains `at://{other}` after the handle. Nothing moves. v1 links only accounts whose keys this host holds.";
14428
+ readonly description: "Retired (Linking v2): the platform no longer serves it, and no client should call it. Two accounts are linked with identity.manageMethods `moveMethod` now, which makes them one person (no accountLink records, no primary). Kept so the name and its shapes stay published. It was: link the caller's account with the other account named by the token identity.finishAddMethod offered: both accounts get a pub.techne.draft.accountLink in their space.personal naming the other and the primary, and each account's `alsoKnownAs` gains `at://{other}` after the handle: signed here where this host holds the account's PLC rotation key, else by the identity PDS that made and hosts it. Nothing moves. v1 links only accounts this host or its identity PDS holds.";
13501
14429
  readonly input: {
13502
14430
  readonly encoding: "application/json";
13503
14431
  readonly schema: {
@@ -13535,9 +14463,12 @@ export declare const schemas: ({
13535
14463
  }, {
13536
14464
  readonly name: "InvalidToken";
13537
14465
  readonly description: "The token is unknown, used, expired, or was issued to another session.";
14466
+ }, {
14467
+ readonly name: "ProtectedAccount";
14468
+ readonly description: "One of the two accounts has a recovery mark, a live freeze, a pending change, or a passkey, Nostr key or recovery codes since the offer (HTTP 409).";
13538
14469
  }, {
13539
14470
  readonly name: "InvalidRequest";
13540
- readonly description: "`primary` names neither account, or the other account's keys are not held here (sign in to it and link from there).";
14471
+ readonly description: "`primary` names neither account, or the other account is held neither here nor by the identity PDS (sign in to it and link from there).";
13541
14472
  }];
13542
14473
  };
13543
14474
  };
@@ -13778,7 +14709,16 @@ export declare const schemas: ({
13778
14709
  readonly defs: {
13779
14710
  readonly main: {
13780
14711
  readonly type: "query";
13781
- readonly description: "The caller's sign-in methods (masked) and the account's alias links. Signed-in members only.";
14712
+ readonly description: "The caller's sign-in methods (masked, with their recovery mark and freeze), its pending changes, and the other accounts of its person (`links`, each `did`, `since` and `mutual`, always true; linked accounts have no primary). Emails and phones only unless `allTypes` (shipped clients label every row as an email). Signed-in members only.";
14713
+ readonly parameters: {
14714
+ readonly type: "params";
14715
+ readonly properties: {
14716
+ readonly allTypes: {
14717
+ readonly type: "boolean";
14718
+ readonly description: "Also list passkeys, Nostr keys and the recovery-code set.";
14719
+ };
14720
+ };
14721
+ };
13782
14722
  readonly output: {
13783
14723
  readonly encoding: "application/json";
13784
14724
  readonly schema: {
@@ -13794,11 +14734,20 @@ export declare const schemas: ({
13794
14734
  };
13795
14735
  readonly links: {
13796
14736
  readonly type: "array";
14737
+ readonly description: "The other accounts of the caller's person (linked with identity.manageMethods moveMethod), each with `did`, `since` and `mutual` (always true); linked accounts have no primary. Empty when it is alone.";
13797
14738
  readonly items: {
13798
14739
  readonly type: "ref";
13799
14740
  readonly ref: "lex:pub.techne.draft.identity.defs#linkView";
13800
14741
  };
13801
14742
  };
14743
+ readonly pending: {
14744
+ readonly type: "array";
14745
+ readonly description: "The account's pending changes, soonest first (the account page shows them at the top, with Cancel), a move of one of its methods onto another account included.";
14746
+ readonly items: {
14747
+ readonly type: "ref";
14748
+ readonly ref: "lex:pub.techne.draft.identity.defs#pendingChange";
14749
+ };
14750
+ };
13802
14751
  };
13803
14752
  };
13804
14753
  };
@@ -13831,76 +14780,636 @@ export declare const schemas: ({
13831
14780
  readonly type: "string";
13832
14781
  readonly format: "did";
13833
14782
  };
13834
- };
13835
- };
13836
- };
13837
- readonly output: {
13838
- readonly encoding: "application/json";
13839
- readonly schema: {
13840
- readonly type: "object";
13841
- readonly required: ["holds"];
13842
- readonly properties: {
13843
- readonly holds: {
14783
+ };
14784
+ };
14785
+ };
14786
+ readonly output: {
14787
+ readonly encoding: "application/json";
14788
+ readonly schema: {
14789
+ readonly type: "object";
14790
+ readonly required: ["holds"];
14791
+ readonly properties: {
14792
+ readonly holds: {
14793
+ readonly type: "array";
14794
+ readonly items: {
14795
+ readonly type: "ref";
14796
+ readonly ref: "lex:pub.techne.draft.identity.listPhoneHolds#holdView";
14797
+ };
14798
+ };
14799
+ };
14800
+ };
14801
+ };
14802
+ readonly errors: [{
14803
+ readonly name: "InvalidRequest";
14804
+ readonly description: "HTTP 400: `actAs` or one of `alsoActAs` is not a DID, or more than 99 `alsoActAs`.";
14805
+ }, {
14806
+ readonly name: "Forbidden";
14807
+ readonly description: "HTTP 403: the caller may not write as `actAs` (with `alsoActAs`: as any of them).";
14808
+ }];
14809
+ };
14810
+ readonly holdView: {
14811
+ readonly type: "object";
14812
+ readonly required: ["id", "askedBy", "collection", "record", "createdAt"];
14813
+ readonly properties: {
14814
+ readonly id: {
14815
+ readonly type: "string";
14816
+ };
14817
+ readonly actAs: {
14818
+ readonly type: "string";
14819
+ readonly format: "did";
14820
+ readonly description: "The account the hold would write as.";
14821
+ };
14822
+ readonly askedBy: {
14823
+ readonly type: "string";
14824
+ readonly format: "did";
14825
+ };
14826
+ readonly app: {
14827
+ readonly type: "string";
14828
+ };
14829
+ readonly collection: {
14830
+ readonly type: "string";
14831
+ readonly format: "nsid";
14832
+ };
14833
+ readonly rkey: {
14834
+ readonly type: "string";
14835
+ readonly description: "The record key template.";
14836
+ };
14837
+ readonly space: {
14838
+ readonly type: "string";
14839
+ };
14840
+ readonly record: {
14841
+ readonly type: "unknown";
14842
+ readonly description: "The record template, slots unfilled.";
14843
+ };
14844
+ readonly createdAt: {
14845
+ readonly type: "string";
14846
+ readonly format: "datetime";
14847
+ };
14848
+ readonly name: {
14849
+ readonly type: "string";
14850
+ readonly description: "On a hold the caller asked for, the name the caller saved for its number: the `name` of the caller's own active `contact` on that number (the newest, when there are several), read when the listing is made. Never on a hold someone else asked for, and nothing of it is stored on the hold.";
14851
+ };
14852
+ };
14853
+ };
14854
+ };
14855
+ } | {
14856
+ readonly lexicon: 1;
14857
+ readonly id: "pub.techne.draft.identity.manageMethods";
14858
+ readonly defs: {
14859
+ readonly main: {
14860
+ readonly type: "procedure";
14861
+ readonly description: "The identity PDS's signed hook for the sign-in method rules (the account page and sign-in page call it; the rules live on the platform so every client obeys the same ones). Authenticated only by the epds-signature MAC with the identity hook secret; no session, OAuth or service-JWT caller reaches it, and every answer is signed. The PDS vouches for the signed-in account (`did`, which must be hosted on the calling PDS, else 404 UnknownAccount) and for the step-up it just checked (`stepUp`: which method, when; it counts for 10 minutes). Rules: a recovery method acting with a fresh step-up acts at once; anything else removes a method or deletes the account after a 7-day wait with an email notice, if it has any email method, cancellable by any of the account's methods, a frozen one too (`cancel`); a wait re-checks these rules when it runs out (a method marked for recovery meanwhile is not removed; a first mark is dropped once another method is marked; a wait during which any of the account's methods was frozen, even if a recovery method lifted the freeze early or removed the method, is dropped, not completed, since a frozen method can't sign in to cancel it, and every email method gets a `waitDropped` notice naming the change); a freeze is immediate, from a different method with a fresh step-up, and lasts 7 days or until a recovery method lifts it (`unfreeze`); a recovery method is never frozen, removed or unmarked by an unmarked one; the last way to sign in is never removed; marking a recovery method needs a fresh step-up of one, except the account's first, which needs a fresh step-up of any of its methods (else StepUpRequired) and waits 24 hours with an email notice, if the account has any email method. Notices are email only: the platform sends every one itself, wherever the account is hosted, to each of the account's email methods (never by phone or Nostr); the PDS sends none. Ops: `list` (the account's methods, each email and phone also with its full `value` for the owner's own account page, pending changes (an open `moveMethod` onto the account included), `hasRecovery`, and `person`, the other accounts of its person), `signInMethods` (for a sign-in page that knows only the account, \"Sign in as @handle\": the methods that can sign in now, each a `display` only, never its full value; no step-up, recovery marks or pending changes), `sendTo` (the full email or phone of one of them, for the PDS to send a sign-in code to; never shown), `remove`, `cancel`, `freeze` (with `signOut`), `unfreeze`, `mark`, `unmark`, `signOut` (sign out everywhere the platform holds a session; the PDS revokes its own), `delete`, `addExternal` (a passkey or Nostr key the PDS proved; always a fresh step-up of one of the account's methods, StepUpRequired without one, and never a program's, ProgramRefused), `newRecoveryCodes` (returned once; a new set ends the old; always a fresh step-up, and on an account with no recovery method the set is its first mark, which waits 24 hours; a first set is refused, MethodFrozen, while one of the account's methods is frozen), `redeemCode`, `setPrograms` (\"Programs can sign in with this key\" on or off, `on`, for a Nostr key, the only type that supports it: on and off both need a fresh step-up of one of the account's methods that is not a program, not frozen (a step-up by a key with programs on is ProgramRefused, so that key never switches itself off); on is also refused from the key itself, SameMethod, for a recovery method or one whose first mark is waiting, IsRecovery, and while a method of the account is frozen, MethodFrozen), `addChannel` (a `channel` the PDS just proved for `did`, as identity.finishAddMethod does for a session: `added`, `alreadyYours`, or `boundElsewhere`: when both accounts hold something, with the `other` account and its `method` (the account page offers `moveMethod`), else with a fold `offer` (identity.finishAddMethod#offer), single use, 10 minutes, bound to `did` on this hook and to no session; MethodFrozen when the channel is frozen on any account, MethodFrozen when `did` itself has a frozen method and the channel would be new to it (no method is added past a freeze; `addExternal` likewise), and, on the fold path only (one of the two accounts holds nothing, so an `offer` would be made), ProtectedAccount when either account has a recovery mark, a freeze, a pending change, or a passkey, Nostr key or recovery codes; when both hold something the answer names `other` and `method` and moveMethod's own refusals apply), `fold` (take that offer: `token`; needs a fresh step-up of `did`; ProtectedAccount (a live freeze included) and NotEmpty, checked again; `folded` with the kept `did` and the `emptied` one, which is deleted (on the identity PDS too, by `dueDeletes`)), `moveMethod` (link two accounts: move an email or phone method of account `from` onto `did` and make the two accounts one person, every DID of each linked to every other in `alsoKnownAs`; needs a fresh step-up of `did` and one of `from` (`fromStepUp`, else FromStepUpRequired); refused, nothing scheduled, when a method of either person is frozen (Frozen), either has a pending change (PendingChange), the person would hold more than 4 accounts (TooMany), the two are already one person or the same account (Same), or no key can write `alsoKnownAs` for one of their DIDs (NoKey); a method marked for recovery on `from` moves only with a `fromStepUp` of a recovery method of `from` (RecoveryProtected); it is never done inside the call: the answer is `pending` (the change, a pending change of `from`, as a defs#pendingChange as `did`'s `list` shows it) with `due`, its `dueAt`: now for a move such a step-up proved, else 7 days on, a wait `from` is told about by email (a recovery-proven move is told only when it completes), which any method of either account can `cancel`, and which a freeze of either person's methods drops (`waitDropped` to `from`); the platform completes it once due: a move whose key check or `alsoKnownAs` writes fail is tried again after a backoff (2^tries minutes, at most an hour), one refused for good (no key we can ask holds it, or the identity PDS refuses the account) is dropped with a `moveDropped` email to both accounts, one still failing 24 hours past `due` is dropped with `moveTimedOut`, one whose accounts changed meanwhile (the method gone, or marked for recovery since unless a recovery method proved the move; a refusal above other than a freeze; or a recovery-proven requester no longer a recovery method) is dropped with `moveCancelled` to both, and a completed one sends every account of the person a `linked` email), `unlink` (account `other` leaves `did`'s person at once; the removal of the `alsoKnownAs` entries between it and the rest is queued, tried again after a failure, and given up after about a day, or at once when refused for good, with an `akaLeft` email to both accounts of the entry; needs a fresh step-up of `did`; when `other` would be left with no way to sign in, `method`, one of `did`'s email or phone methods, is required (else NeedsMethod) and moves to `other`, which needs a step-up of a recovery method of `did` or of that method itself (NeedsRecoveryMethod), a recovery method's step-up for a method marked for recovery (RecoveryProtected), a method that is not frozen (MethodFrozen) and not `did`'s last way to sign in (LastMethod); NotLinked when `other` is not in `did`'s person; an email handed to `other` is released from `did`'s identity-PDS account, tried again after a failure and given up after about a day with an `emailLeft` email to `did`; both accounts get an `unlinked` email), `link` (retired, answers 400 InvalidRequest: a link is `moveMethod` now), `importBackupEmails` (once per account, recorded: a second call answers `alreadyImported` even after every mark is taken off; the move of the PDS's verified backup emails, `backupEmails`, each with when the PDS verified it: one verified before 2026-11-13T00:00:00Z becomes an email method marked for recovery at once, without step-up or wait, and one verified at or after it is skipped, `afterCutoff`, since only the holder could have added one before these rules; only an account with no recovery method takes one, all of its addresses in one call (each address once, else 400 InvalidRequest), else `hasRecovery`, nothing changes and the import is spent; a call that marks none of them spends it too; MethodFrozen while one of the account's methods is frozen, not spent; `indexOff` while the identity index is off), `notices` and `noticesSent` (no `did`; unused, kept for older clients: `notices` always answers an empty list and `noticesSent` `count: 0`, since the platform sends every notice itself), for a login service that just checked a signature by a Nostr key and knows no account yet (no `did`) `findKey` (`external`, type `nostr` and the 64-character lowercase hex key: `none` when no account the calling PDS hosts has it, else `done` with the account's `did`, the key's `method`, whether that method is `frozen` now, and whether `programs` may sign in with it), and for scheduled account deletions that came due (no `did`; only the accounts the calling PDS hosts) `dueDeletes` (up to 100 accounts the platform has deleted on its side, which the PDS deletes too; one taken and not confirmed is offered again after 5 minutes, without limit) and `dueDeletesDone` (`dids` the PDS deleted), and for a consent screen after sign-in `operator` (`operator`: whether `did` is one of the platform's operators, so the PDS offers the moderate scope, `include:pub.techne.draft.authModerate`, to operators only and drops it from everyone else's grant). Programs: a key with programs on can't be marked (ProgramsOn), and a program never touches account security: when the PDS says a program made the request (`program`), or the step-up names a key with programs on, every op but `list`, `signInMethods` and `sendTo` is 403 ProgramRefused (`operator` included: a program never moderates), `setPrograms` included: such a key's programs are turned off by a step-up of another of the account's methods.";
14862
+ readonly input: {
14863
+ readonly encoding: "application/json";
14864
+ readonly schema: {
14865
+ readonly type: "object";
14866
+ readonly required: ["v", "op"];
14867
+ readonly properties: {
14868
+ readonly v: {
14869
+ readonly type: "integer";
14870
+ readonly const: 1;
14871
+ };
14872
+ readonly op: {
14873
+ readonly type: "string";
14874
+ readonly knownValues: ["list", "signInMethods", "sendTo", "remove", "cancel", "freeze", "unfreeze", "mark", "unmark", "signOut", "delete", "addExternal", "newRecoveryCodes", "redeemCode", "setPrograms", "importBackupEmails", "findKey", "notices", "noticesSent", "dueDeletes", "dueDeletesDone", "addChannel", "fold", "link", "moveMethod", "unlink", "operator"];
14875
+ readonly description: "The op. `link` is retired: it answers 400 InvalidRequest; `moveMethod` links two accounts now.";
14876
+ };
14877
+ readonly did: {
14878
+ readonly type: "string";
14879
+ readonly format: "did";
14880
+ readonly description: "The signed-in account. Required for every op but `notices`, `noticesSent`, `dueDeletes` and `dueDeletesDone`.";
14881
+ };
14882
+ readonly stepUp: {
14883
+ readonly type: "ref";
14884
+ readonly ref: "lex:pub.techne.draft.identity.manageMethods#stepUp";
14885
+ };
14886
+ readonly method: {
14887
+ readonly type: "string";
14888
+ readonly maxLength: 64;
14889
+ readonly description: "The method acted on (its `id` in `list` or `signInMethods`). moveMethod: the method of `from` that moves onto `did`. unlink: the method of `did` handed to `other` when `other` would have none left.";
14890
+ };
14891
+ readonly pending: {
14892
+ readonly type: "string";
14893
+ readonly maxLength: 64;
14894
+ readonly description: "The pending change `cancel` cancels.";
14895
+ };
14896
+ readonly signOut: {
14897
+ readonly type: "boolean";
14898
+ readonly description: "With `freeze`: also sign out everywhere.";
14899
+ };
14900
+ readonly external: {
14901
+ readonly type: "ref";
14902
+ readonly ref: "lex:pub.techne.draft.identity.manageMethods#external";
14903
+ };
14904
+ readonly code: {
14905
+ readonly type: "string";
14906
+ readonly maxLength: 64;
14907
+ readonly description: "A recovery code, for `redeemCode`.";
14908
+ };
14909
+ readonly ids: {
14910
+ readonly type: "array";
14911
+ readonly maxLength: 100;
14912
+ readonly items: {
14913
+ readonly type: "integer";
14914
+ };
14915
+ readonly description: "Unused, kept for older clients: notice ids for `noticesSent`, which confirms none.";
14916
+ };
14917
+ readonly emails: {
14918
+ readonly type: "array";
14919
+ readonly maxLength: 10;
14920
+ readonly items: {
14921
+ readonly type: "string";
14922
+ readonly maxLength: 320;
14923
+ };
14924
+ readonly description: "Retired, not read: a bare list has no verification dates, so the cutoff can't hold. importBackupEmails without `backupEmails` is 400 InvalidRequest.";
14925
+ };
14926
+ readonly backupEmails: {
14927
+ readonly type: "array";
14928
+ readonly maxLength: 10;
14929
+ readonly items: {
14930
+ readonly type: "ref";
14931
+ readonly ref: "lex:pub.techne.draft.identity.manageMethods#backupEmail";
14932
+ };
14933
+ readonly description: "importBackupEmails: the account's verified backup email addresses, all of them, each with when the PDS verified it.";
14934
+ };
14935
+ readonly dids: {
14936
+ readonly type: "array";
14937
+ readonly maxLength: 100;
14938
+ readonly items: {
14939
+ readonly type: "string";
14940
+ readonly format: "did";
14941
+ };
14942
+ readonly description: "dueDeletesDone: the accounts whose PDS account was deleted.";
14943
+ };
14944
+ readonly channel: {
14945
+ readonly type: "ref";
14946
+ readonly ref: "lex:pub.techne.draft.identity.defs#channel";
14947
+ readonly description: "addChannel: the email or phone the PDS just proved (a code it sent and checked).";
14948
+ };
14949
+ readonly token: {
14950
+ readonly type: "string";
14951
+ readonly maxLength: 128;
14952
+ readonly description: "fold: the offer's token from addChannel. (link, retired, took one too.)";
14953
+ };
14954
+ readonly from: {
14955
+ readonly type: "string";
14956
+ readonly format: "did";
14957
+ readonly description: "moveMethod: the account the method leaves.";
14958
+ };
14959
+ readonly fromStepUp: {
14960
+ readonly type: "ref";
14961
+ readonly ref: "lex:pub.techne.draft.identity.manageMethods#stepUp";
14962
+ readonly description: "moveMethod: what the PDS's step-up of `from` proved (fresh, one of `from`'s methods).";
14963
+ };
14964
+ readonly other: {
14965
+ readonly type: "string";
14966
+ readonly format: "did";
14967
+ readonly description: "unlink: the account that leaves `did`'s person.";
14968
+ };
14969
+ readonly primary: {
14970
+ readonly type: "string";
14971
+ readonly format: "did";
14972
+ readonly description: "Retired, not read: it was the retired `link` op's primary account. Linked accounts have no primary.";
14973
+ };
14974
+ readonly on: {
14975
+ readonly type: "boolean";
14976
+ readonly description: "setPrograms: on or off.";
14977
+ };
14978
+ readonly program: {
14979
+ readonly type: "boolean";
14980
+ readonly description: "A program made this request: a session or token the PDS's programmatic sign-in opened. Account security is refused (ProgramRefused).";
14981
+ };
14982
+ };
14983
+ };
14984
+ };
14985
+ readonly output: {
14986
+ readonly encoding: "application/json";
14987
+ readonly schema: {
14988
+ readonly type: "object";
14989
+ readonly required: ["v"];
14990
+ readonly properties: {
14991
+ readonly v: {
14992
+ readonly type: "integer";
14993
+ readonly const: 1;
14994
+ };
14995
+ readonly status: {
14996
+ readonly type: "string";
14997
+ readonly knownValues: ["done", "pending", "deleted", "deleting", "bound", "invalid", "hasRecovery", "indexOff", "alreadyImported", "added", "alreadyYours", "boundElsewhere", "unavailable", "folded", "linked", "none"];
14998
+ readonly description: "`done`: it happened now. `pending`: it waits (`pending`). `deleted` / `deleting` (`delete` done now): the account is gone / its local half is gone and a sweep finishes the rest (deleteAccount's `deleted` / `pending`; a deletion that could not start answers 503 Unavailable, try again). `bound`: addExternal's key is on another account. `invalid`: redeemCode's code is wrong, used, or the set is not a recovery method or is frozen. `hasRecovery`: importBackupEmails found a recovery method on the account; nothing changed. `indexOff`: importBackupEmails can't mark anything while the identity index is off; nothing changed. `alreadyImported`: importBackupEmails ran for this account before; nothing changed. `added` / `alreadyYours` / `boundElsewhere` / `unavailable`: addChannel, as identity.finishAddMethod. `folded`: fold done. `linked`: retired (the retired `link` op's answer). moveMethod answers `pending` only, with `pending` (the change, a defs#pendingChange) and `due`. `none`: findKey's key is no method of an account the calling PDS hosts.";
14999
+ };
15000
+ readonly pending: {
15001
+ readonly type: "ref";
15002
+ readonly ref: "lex:pub.techne.draft.identity.defs#pendingChange";
15003
+ readonly description: "The change that waits. moveMethod's `pending` answer carries the change here, as `did`'s `list` shows it (`other` and `method`: the account the method comes from and that method), with `due`; `list` answers every pending change of the account as an array.";
15004
+ };
15005
+ readonly due: {
15006
+ readonly type: "string";
15007
+ readonly format: "datetime";
15008
+ readonly description: "moveMethod `pending`: when the move is due (now for one a recovery method of `from` proved, else 7 days on). The platform completes it then or after a failed try, unless it is cancelled or dropped.";
15009
+ };
15010
+ readonly method: {
15011
+ readonly type: "string";
15012
+ readonly description: "addExternal's new method id, the recovery-code set redeemCode used, or addChannel's method id when `added` or `alreadyYours` (empty while the identity index is off); findKey's method id of the key. addChannel `boundElsewhere` when both accounts hold something: the other account's method id, for `moveMethod` (identity.finishAddMethod's session answer leaves it out).";
15013
+ };
15014
+ readonly codes: {
15015
+ readonly type: "array";
15016
+ readonly items: {
15017
+ readonly type: "string";
15018
+ };
15019
+ readonly description: "newRecoveryCodes: the codes, shown once.";
15020
+ };
15021
+ readonly methods: {
15022
+ readonly type: "array";
15023
+ readonly items: {
15024
+ readonly type: "ref";
15025
+ readonly ref: "lex:pub.techne.draft.identity.defs#methodView";
15026
+ };
15027
+ readonly description: "list: the account's methods (`value` on emails and phones; see defs#methodView).";
15028
+ };
15029
+ readonly hasRecovery: {
15030
+ readonly type: "boolean";
15031
+ };
15032
+ readonly notices: {
15033
+ readonly type: "array";
15034
+ readonly items: {
15035
+ readonly type: "ref";
15036
+ readonly ref: "lex:pub.techne.draft.identity.manageMethods#notice";
15037
+ };
15038
+ readonly description: "Unused, kept for older clients: always empty. The platform emails every notice itself.";
15039
+ };
15040
+ readonly count: {
15041
+ readonly type: "integer";
15042
+ readonly description: "dueDeletesDone: how many were confirmed. noticesSent (unused, kept for older clients): always 0.";
15043
+ };
15044
+ readonly signInMethods: {
15045
+ readonly type: "array";
15046
+ readonly items: {
15047
+ readonly type: "ref";
15048
+ readonly ref: "lex:pub.techne.draft.identity.manageMethods#signInMethod";
15049
+ };
15050
+ readonly description: "signInMethods: the account's methods that can sign in now (not frozen), oldest first.";
15051
+ };
15052
+ readonly to: {
15053
+ readonly type: "ref";
15054
+ readonly ref: "lex:pub.techne.draft.identity.manageMethods#noticeTo";
15055
+ readonly description: "sendTo: where the code goes, in full.";
15056
+ };
15057
+ readonly imported: {
15058
+ readonly type: "array";
15059
+ readonly items: {
15060
+ readonly type: "ref";
15061
+ readonly ref: "lex:pub.techne.draft.identity.manageMethods#importedEmail";
15062
+ };
15063
+ readonly description: "importBackupEmails: each address sent, with what happened to it.";
15064
+ };
15065
+ readonly dueDeletes: {
15066
+ readonly type: "array";
15067
+ readonly items: {
15068
+ readonly type: "ref";
15069
+ readonly ref: "lex:pub.techne.draft.identity.manageMethods#dueDelete";
15070
+ };
15071
+ readonly description: "dueDeletes: accounts to delete on the PDS, oldest first.";
15072
+ };
15073
+ readonly offer: {
15074
+ readonly type: "ref";
15075
+ readonly ref: "lex:pub.techne.draft.identity.finishAddMethod#offer";
15076
+ readonly description: "addChannel `boundElsewhere`: what `did` can do, with `fold` or `link`.";
15077
+ };
15078
+ readonly did: {
15079
+ readonly type: "string";
15080
+ readonly format: "did";
15081
+ readonly description: "fold: the kept account. findKey: the account the key signs in to.";
15082
+ };
15083
+ readonly other: {
15084
+ readonly type: "string";
15085
+ readonly format: "did";
15086
+ readonly description: "addChannel `boundElsewhere` when both accounts hold something: the account the channel signs in to (for `moveMethod`'s `from`).";
15087
+ };
15088
+ readonly otherPerson: {
13844
15089
  readonly type: "array";
13845
15090
  readonly items: {
13846
15091
  readonly type: "ref";
13847
- readonly ref: "lex:pub.techne.draft.identity.listPhoneHolds#holdView";
15092
+ readonly ref: "lex:pub.techne.draft.identity.defs#personMember";
15093
+ };
15094
+ readonly description: "addChannel `boundElsewhere` (either form): the other accounts of the person of the account the channel signs in to, now (`did`, `handle` when known), that account itself left out; empty when it is alone.";
15095
+ };
15096
+ readonly emptied: {
15097
+ readonly type: "string";
15098
+ readonly format: "did";
15099
+ readonly description: "fold: the account folded in and deleted.";
15100
+ };
15101
+ readonly person: {
15102
+ readonly type: "array";
15103
+ readonly items: {
15104
+ readonly type: "ref";
15105
+ readonly ref: "lex:pub.techne.draft.identity.defs#personMember";
13848
15106
  };
15107
+ readonly description: "list: the other accounts of `did`'s person (empty when it is alone). moveMethod no longer answers `done`, which carried the person's accounts here.";
15108
+ };
15109
+ readonly link: {
15110
+ readonly type: "ref";
15111
+ readonly ref: "lex:pub.techne.draft.identity.defs#linkView";
15112
+ readonly description: "Retired: the retired `link` op's answer.";
15113
+ };
15114
+ readonly frozen: {
15115
+ readonly type: "boolean";
15116
+ readonly description: "findKey: the key's method is frozen now and can't sign in.";
15117
+ };
15118
+ readonly programs: {
15119
+ readonly type: "boolean";
15120
+ readonly description: "findKey: \"Programs can sign in with this key\" is on.";
15121
+ };
15122
+ readonly operator: {
15123
+ readonly type: "boolean";
15124
+ readonly description: "operator: whether `did` is one of the platform's operators.";
13849
15125
  };
13850
15126
  };
13851
15127
  };
13852
15128
  };
13853
15129
  readonly errors: [{
15130
+ readonly name: "BadSignature";
15131
+ }, {
13854
15132
  readonly name: "InvalidRequest";
13855
- readonly description: "HTTP 400: `actAs` or one of `alsoActAs` is not a DID, or more than 99 `alsoActAs`.";
13856
15133
  }, {
13857
- readonly name: "Forbidden";
13858
- readonly description: "HTTP 403: the caller may not write as `actAs` (with `alsoActAs`: as any of them).";
15134
+ readonly name: "UnknownAccount";
15135
+ }, {
15136
+ readonly name: "RateLimitExceeded";
15137
+ }, {
15138
+ readonly name: "Unavailable";
15139
+ readonly description: "Try again (`redeemCode` and `newRecoveryCodes` also while the platform's identity keys are not loaded).";
15140
+ }, {
15141
+ readonly name: "NotFound";
15142
+ readonly description: "No such method or pending change on the account (moveMethod: `from` has no such method).";
15143
+ }, {
15144
+ readonly name: "NotYourMethod";
15145
+ readonly description: "The step-up names a method that is not the account's.";
15146
+ }, {
15147
+ readonly name: "LastMethod";
15148
+ readonly description: "It would leave no way to sign in (unlink: the method handed to `other` is `did`'s only one).";
15149
+ }, {
15150
+ readonly name: "RecoveryProtected";
15151
+ readonly description: "Only a recovery method can do this to a recovery method (moveMethod: of `from`; unlink: of `did`).";
15152
+ }, {
15153
+ readonly name: "NeedsRecoveryMethod";
15154
+ readonly description: "Needs a fresh step-up of a recovery method (unlink: or of the method handed to `other` itself).";
15155
+ }, {
15156
+ readonly name: "StepUpRequired";
15157
+ readonly description: "Needs a fresh step-up (an account's first recovery mark, `newRecoveryCodes`, `fold`, `moveMethod` and `unlink` included).";
15158
+ }, {
15159
+ readonly name: "SameMethod";
15160
+ readonly description: "A method cannot freeze itself.";
15161
+ }, {
15162
+ readonly name: "MethodFrozen";
15163
+ readonly description: "The acting method is frozen (for `sendTo`: the method named is; for `addChannel`: the channel is, on whichever account, or the channel would be new to `did` while one of its methods is frozen; for `addExternal`, a first `newRecoveryCodes` set and `importBackupEmails`: one of `did`'s methods is frozen, and the message says so; for `unlink`: the method handed to `other` is).";
15164
+ }, {
15165
+ readonly name: "InvalidToken";
15166
+ readonly description: "fold: the offer is unknown, used, expired, for the other action, or not made to `did` on this hook.";
15167
+ }, {
15168
+ readonly name: "ProtectedAccount";
15169
+ readonly description: "addChannel / fold: one of the two accounts has a recovery mark, a live freeze, a pending change, or a passkey, Nostr key or recovery codes; it is never folded, and addChannel answers this before any `boundElsewhere`, so nothing about the other account is sent (HTTP 409).";
15170
+ }, {
15171
+ readonly name: "NotEmpty";
15172
+ readonly description: "fold: the account to fold gained a record or is 7 days old or more; link it with `moveMethod` instead (HTTP 409).";
15173
+ }, {
15174
+ readonly name: "ProgramRefused";
15175
+ readonly description: "A program asked (`program`, or a step-up by a key with programs on): account security needs a person on a method no program holds.";
15176
+ }, {
15177
+ readonly name: "ProgramsOn";
15178
+ readonly description: "mark: the key has programs on; turn that off first (HTTP 409).";
15179
+ }, {
15180
+ readonly name: "IsRecovery";
15181
+ readonly description: "setPrograms on: the method is a recovery method, or its first mark is waiting (HTTP 409).";
15182
+ }, {
15183
+ readonly name: "FromStepUpRequired";
15184
+ readonly description: "moveMethod: `fromStepUp` is missing, malformed, not fresh, or names none of `from`'s methods (HTTP 403).";
15185
+ }, {
15186
+ readonly name: "Frozen";
15187
+ readonly description: "moveMethod: a method of an account of either person is frozen; nothing is scheduled (HTTP 409).";
15188
+ }, {
15189
+ readonly name: "PendingChange";
15190
+ readonly description: "moveMethod: an account of either person has a pending change, a move included; nothing is scheduled (HTTP 409).";
15191
+ }, {
15192
+ readonly name: "TooMany";
15193
+ readonly description: "moveMethod: the person would hold more than 4 accounts (HTTP 409).";
15194
+ }, {
15195
+ readonly name: "Same";
15196
+ readonly description: "moveMethod: the two accounts are already one person, or the same account (HTTP 409).";
15197
+ }, {
15198
+ readonly name: "NoKey";
15199
+ readonly description: "moveMethod: no key this platform or the identity PDS holds can write `alsoKnownAs` for an account of either person; nothing is scheduled (HTTP 409).";
15200
+ }, {
15201
+ readonly name: "NeedsMethod";
15202
+ readonly description: "unlink: `other` would be left with no way to sign in; name one of `did`'s email or phone methods to hand it (`method`) (HTTP 409).";
15203
+ }, {
15204
+ readonly name: "NotLinked";
15205
+ readonly description: "unlink: `other` is not in `did`'s person, or is `did` (HTTP 404).";
13859
15206
  }];
13860
15207
  };
13861
- readonly holdView: {
15208
+ readonly stepUp: {
13862
15209
  readonly type: "object";
13863
- readonly required: ["id", "askedBy", "collection", "record", "createdAt"];
15210
+ readonly description: "What the PDS's step-up proved.";
15211
+ readonly required: ["method", "provedAt"];
13864
15212
  readonly properties: {
13865
- readonly id: {
15213
+ readonly method: {
15214
+ readonly type: "ref";
15215
+ readonly ref: "lex:pub.techne.draft.identity.manageMethods#provedMethod";
15216
+ };
15217
+ readonly provedAt: {
13866
15218
  readonly type: "string";
15219
+ readonly format: "datetime";
13867
15220
  };
13868
- readonly actAs: {
15221
+ };
15222
+ };
15223
+ readonly external: {
15224
+ readonly type: "object";
15225
+ readonly required: ["type", "ref"];
15226
+ readonly properties: {
15227
+ readonly type: {
13869
15228
  readonly type: "string";
13870
- readonly format: "did";
13871
- readonly description: "The account the hold would write as.";
15229
+ readonly knownValues: ["passkey", "nostr"];
13872
15230
  };
13873
- readonly askedBy: {
15231
+ readonly ref: {
15232
+ readonly type: "string";
15233
+ readonly maxLength: 512;
15234
+ readonly description: "The passkey credential id, or the Nostr key (hex).";
15235
+ };
15236
+ readonly label: {
15237
+ readonly type: "string";
15238
+ readonly maxLength: 128;
15239
+ };
15240
+ };
15241
+ };
15242
+ readonly notice: {
15243
+ readonly type: "object";
15244
+ readonly description: "Unused, kept for older clients: `notices` always answers an empty list. The platform emails every notice itself, to the account's email methods only.";
15245
+ readonly required: ["id", "did", "event", "to", "createdAt"];
15246
+ readonly properties: {
15247
+ readonly id: {
15248
+ readonly type: "integer";
15249
+ };
15250
+ readonly did: {
13874
15251
  readonly type: "string";
13875
15252
  readonly format: "did";
13876
15253
  };
13877
- readonly app: {
15254
+ readonly event: {
13878
15255
  readonly type: "string";
15256
+ readonly knownValues: ["removeMethod", "deleteAccount", "markRecovery", "freeze", "waitDropped", "programsOn", "moveMethod", "linked", "unlinked", "moveDropped", "moveTimedOut", "moveCancelled", "akaLeft", "emailLeft"];
15257
+ readonly description: "What the notice is about: a change that started to wait (`removeMethod`, `deleteAccount`, `markRecovery`, `moveMethod`), a `freeze`, `waitDropped`: the change in `pending` was not completed because one of the account's methods was frozen during its wait, `programsOn`: programs can now sign in with one of the account's Nostr keys (`setPrograms` on; no `pending`), `linked` / `unlinked`: a link (moveMethod completed) or an unlink changed the account's person, `moveDropped` / `moveTimedOut` / `moveCancelled`: a move was dropped because a key can't be used or the identity PDS refused it for good, because it still could not be written 24 hours past due, or because something changed on one of its accounts, or `akaLeft` / `emailLeft`: an `alsoKnownAs` entry or an identity-PDS account email the platform owed removing was given up and is left.";
13879
15258
  };
13880
- readonly collection: {
15259
+ readonly to: {
15260
+ readonly type: "ref";
15261
+ readonly ref: "lex:pub.techne.draft.identity.manageMethods#noticeTo";
15262
+ };
15263
+ readonly pending: {
15264
+ readonly type: "ref";
15265
+ readonly ref: "lex:pub.techne.draft.identity.defs#pendingChange";
15266
+ };
15267
+ readonly createdAt: {
13881
15268
  readonly type: "string";
13882
- readonly format: "nsid";
15269
+ readonly format: "datetime";
13883
15270
  };
13884
- readonly rkey: {
15271
+ };
15272
+ };
15273
+ readonly provedMethod: {
15274
+ readonly type: "object";
15275
+ readonly required: ["type"];
15276
+ readonly properties: {
15277
+ readonly type: {
13885
15278
  readonly type: "string";
13886
- readonly description: "The record key template.";
15279
+ readonly knownValues: ["email", "phone", "passkey", "nostr", "recoveryCodes"];
13887
15280
  };
13888
- readonly space: {
15281
+ readonly value: {
13889
15282
  readonly type: "string";
15283
+ readonly maxLength: 512;
15284
+ readonly description: "The email or E.164 phone, the passkey credential id, or the Nostr key (hex). None for recoveryCodes.";
13890
15285
  };
13891
- readonly record: {
13892
- readonly type: "unknown";
13893
- readonly description: "The record template, slots unfilled.";
15286
+ };
15287
+ };
15288
+ readonly noticeTo: {
15289
+ readonly type: "object";
15290
+ readonly description: "An email or phone number in full: `sendTo`'s `to`. Also the shape of #notice's `to`, which is unused and kept for older clients (notices go to email methods only).";
15291
+ readonly required: ["type", "value"];
15292
+ readonly properties: {
15293
+ readonly type: {
15294
+ readonly type: "string";
15295
+ readonly knownValues: ["email", "phone", "nostr"];
13894
15296
  };
13895
- readonly createdAt: {
15297
+ readonly value: {
15298
+ readonly type: "string";
15299
+ };
15300
+ };
15301
+ };
15302
+ readonly signInMethod: {
15303
+ readonly type: "object";
15304
+ readonly description: "One way to sign in, as a page may show it before anyone has signed in: an email as `***a@***e.***m` (the last character of each dot-separated part), a phone as `•••• 97` (its last two digits), a passkey or Nostr key by its label.";
15305
+ readonly required: ["id", "type", "display"];
15306
+ readonly properties: {
15307
+ readonly id: {
15308
+ readonly type: "string";
15309
+ readonly description: "The method id (for `sendTo`, and the PDS's own passkey or Nostr challenge).";
15310
+ };
15311
+ readonly type: {
15312
+ readonly type: "string";
15313
+ readonly knownValues: ["email", "phone", "passkey", "nostr"];
15314
+ };
15315
+ readonly display: {
15316
+ readonly type: "string";
15317
+ };
15318
+ };
15319
+ };
15320
+ readonly importedEmail: {
15321
+ readonly type: "object";
15322
+ readonly required: ["email", "status"];
15323
+ readonly properties: {
15324
+ readonly email: {
15325
+ readonly type: "string";
15326
+ };
15327
+ readonly status: {
15328
+ readonly type: "string";
15329
+ readonly knownValues: ["marked", "boundElsewhere", "released", "invalid", "afterCutoff"];
15330
+ readonly description: "`marked`: an email method of the account now, marked for recovery. `boundElsewhere`: on another account, left there. `released`: the account removed it; only adding it again binds it back. `invalid`: not an email address. `afterCutoff`: verified at or after 2026-11-13T00:00:00Z, not imported (add it and mark it under the rules).";
15331
+ };
15332
+ };
15333
+ readonly description: "One address importBackupEmails was sent, with what happened to it.";
15334
+ };
15335
+ readonly backupEmail: {
15336
+ readonly type: "object";
15337
+ readonly description: "One backup email importBackupEmails moves, with when the PDS verified it.";
15338
+ readonly required: ["email", "verifiedAt"];
15339
+ readonly properties: {
15340
+ readonly email: {
15341
+ readonly type: "string";
15342
+ readonly maxLength: 320;
15343
+ };
15344
+ readonly verifiedAt: {
13896
15345
  readonly type: "string";
13897
15346
  readonly format: "datetime";
15347
+ readonly description: "When the PDS verified the address. Only one verified before 2026-11-13T00:00:00Z is imported.";
13898
15348
  };
13899
- readonly name: {
15349
+ };
15350
+ };
15351
+ readonly dueDelete: {
15352
+ readonly type: "object";
15353
+ readonly description: "An account whose scheduled deletion ran on the platform: the PDS deletes its PDS account, then confirms (`dueDeletesDone`). An account already gone from the PDS counts as deleted.";
15354
+ readonly required: ["did", "deletedAt"];
15355
+ readonly properties: {
15356
+ readonly did: {
13900
15357
  readonly type: "string";
13901
- readonly description: "On a hold the caller asked for, the name the caller saved for its number: the `name` of the caller's own active `contact` on that number (the newest, when there are several), read when the listing is made. Never on a hold someone else asked for, and nothing of it is stored on the hold.";
15358
+ readonly format: "did";
15359
+ };
15360
+ readonly deletedAt: {
15361
+ readonly type: "string";
15362
+ readonly format: "datetime";
15363
+ readonly description: "When the platform deleted its side.";
15364
+ };
15365
+ };
15366
+ };
15367
+ };
15368
+ } | {
15369
+ readonly lexicon: 1;
15370
+ readonly id: "pub.techne.draft.identity.openAccountPage";
15371
+ readonly defs: {
15372
+ readonly main: {
15373
+ readonly type: "procedure";
15374
+ readonly description: "A link that opens the caller's account page on their PDS already signed in, for an app to open in the system browser. The link works once, until `expiresAt` (60 seconds today). It signs in to view the page only: changing a sign-in method or deleting the account there still asks for a code or a passkey. Signed-in members only, from a browser or device session: any other bearer token (an agent token, an app's OAuth token, a program's token) is refused.";
15375
+ readonly output: {
15376
+ readonly encoding: "application/json";
15377
+ readonly schema: {
15378
+ readonly type: "object";
15379
+ readonly required: ["url", "expiresAt"];
15380
+ readonly properties: {
15381
+ readonly url: {
15382
+ readonly type: "string";
15383
+ readonly format: "uri";
15384
+ readonly maxLength: 2048;
15385
+ readonly description: "Open it once, before expiresAt.";
15386
+ };
15387
+ readonly expiresAt: {
15388
+ readonly type: "string";
15389
+ readonly format: "datetime";
15390
+ };
15391
+ };
13902
15392
  };
13903
15393
  };
15394
+ readonly errors: [{
15395
+ readonly name: "AuthenticationRequired";
15396
+ readonly description: "No signed-in caller.";
15397
+ }, {
15398
+ readonly name: "NotAuthorized";
15399
+ readonly description: "The caller's bearer token is neither a device session nor an agent token, such as an app's OAuth token (HTTP 403).";
15400
+ }, {
15401
+ readonly name: "ProgramRefused";
15402
+ readonly description: "The caller is an agent token or a program's token: neither opens the account page (HTTP 403).";
15403
+ }, {
15404
+ readonly name: "NotFound";
15405
+ readonly description: "This server has no account page for the caller: its PDS is not ours, or none is set up (HTTP 404). Open the account page without a link.";
15406
+ }, {
15407
+ readonly name: "RateLimitExceeded";
15408
+ readonly description: "Too many links for this account (HTTP 429).";
15409
+ }, {
15410
+ readonly name: "Unavailable";
15411
+ readonly description: "The PDS did not answer (HTTP 502). Open the account page without a link.";
15412
+ }];
13904
15413
  };
13905
15414
  };
13906
15415
  } | {
@@ -14142,6 +15651,15 @@ export declare const schemas: ({
14142
15651
  readonly format: "did";
14143
15652
  readonly description: "Present only with `released`, and only when the calling PDS hosts the account that removed the number: that account's DID. A PDS that keeps an account per phone number (a placeholder) uses it to tell two placeholders apart: the old account's, which must not sign in with this number again, and the one it started for the number's new holder after the removal, which it finds by this DID and `releaseId` and signs in until the number is bound to it. Binding the number back to this account through identity.attest is refused (`ChannelReleased`).";
14144
15653
  };
15654
+ readonly frozen: {
15655
+ readonly type: "boolean";
15656
+ readonly description: "Present (true) only with `did`: this method of the account is frozen (identity.manageMethods `freeze`). The PDS refuses the sign-in and creates nothing; the account's other methods still sign in.";
15657
+ };
15658
+ readonly frozenUntil: {
15659
+ readonly type: "string";
15660
+ readonly format: "datetime";
15661
+ readonly description: "Present only with `frozen`: when the freeze ends, unless a recovery method lifts it sooner.";
15662
+ };
14145
15663
  readonly releaseId: {
14146
15664
  readonly type: "string";
14147
15665
  readonly minLength: 1;
@@ -14217,7 +15735,7 @@ export declare const schemas: ({
14217
15735
  readonly defs: {
14218
15736
  readonly main: {
14219
15737
  readonly type: "procedure";
14220
- readonly description: "End an alias link: deletes the caller's pub.techne.draft.accountLink naming `other`, and the other account's too when this host holds it, and removes the `alsoKnownAs` entries this host added.";
15738
+ readonly description: "Retired (Linking v2): the platform no longer serves it, and no client should call it. An account leaves its person with identity.manageMethods `unlink` now. Kept so the name and its shapes stay published. It was: end an alias link: deletes the caller's pub.techne.draft.accountLink naming `other`, and the other account's too when this host holds it, and removes the `alsoKnownAs` entries the link added (signed here, or by the identity PDS for accounts it made).";
14221
15739
  readonly input: {
14222
15740
  readonly encoding: "application/json";
14223
15741
  readonly schema: {
@@ -14258,7 +15776,7 @@ export declare const schemas: ({
14258
15776
  readonly defs: {
14259
15777
  readonly main: {
14260
15778
  readonly type: "procedure";
14261
- readonly description: "Remove a sign-in method from the caller's account: its credential is revoked (`unlinked`), the channel stops signing in to this account, and its attested pub.techne.draft.contactChannel is deleted. Its next sign-in is treated as new. A removed phone number is marked released: identity.resolve answers `unbound` with `released` and `releasedFrom` (this account) until someone binds it, so a PDS never signs it in to this account again through a placeholder it kept, and identity.attest refuses binding it back here (`ChannelReleased`); only adding it again (identity.finishAddMethod) does. Refused for the account's last method.";
15779
+ readonly description: "Remove a sign-in method from the caller's account, by the sign-in method rules (identity.manageMethods): this method carries no step-up, so the removal always waits 7 days, with an email notice to each of the account's email methods, and any of its methods can cancel it (`status: pending`, `pending`); a recovery method is not removed this way (`RecoveryProtected`), and the last way to sign in never is. When it completes: its credential is revoked (`unlinked`), the channel stops signing in to this account, and its attested pub.techne.draft.contactChannel is deleted. Its next sign-in is treated as new. A removed phone number is marked released: identity.resolve answers `unbound` with `released` and `releasedFrom` (this account) until someone binds it, so a PDS never signs it in to this account again through a placeholder it kept, and identity.attest refuses binding it back here (`ChannelReleased`); only adding it again (identity.finishAddMethod) does. Refused for the account's last method.";
14262
15780
  readonly input: {
14263
15781
  readonly encoding: "application/json";
14264
15782
  readonly schema: {
@@ -14281,6 +15799,14 @@ export declare const schemas: ({
14281
15799
  readonly ok: {
14282
15800
  readonly type: "boolean";
14283
15801
  };
15802
+ readonly status: {
15803
+ readonly type: "string";
15804
+ readonly knownValues: ["pending"];
15805
+ };
15806
+ readonly pending: {
15807
+ readonly type: "ref";
15808
+ readonly ref: "lex:pub.techne.draft.identity.defs#pendingChange";
15809
+ };
14284
15810
  };
14285
15811
  };
14286
15812
  };
@@ -14292,7 +15818,10 @@ export declare const schemas: ({
14292
15818
  readonly description: "No such method on the caller's account.";
14293
15819
  }, {
14294
15820
  readonly name: "LastMethod";
14295
- readonly description: "It is the account's only sign-in method.";
15821
+ readonly description: "It is the account's only sign-in method (counting those already waiting to be removed).";
15822
+ }, {
15823
+ readonly name: "RecoveryProtected";
15824
+ readonly description: "It is a recovery method; only a recovery method removes it (identity.manageMethods).";
14296
15825
  }];
14297
15826
  };
14298
15827
  };
@@ -14567,7 +16096,7 @@ export declare const schemas: ({
14567
16096
  readonly main: {
14568
16097
  readonly type: "record";
14569
16098
  readonly key: "any";
14570
- readonly description: "The rkey is the operator's DID, or `{did}-{millis}` for a later period after one has ended, so each period keeps its own record. Readers count a record only at one of those rkeys and only with `subject` = that DID. `any` permits the convention but cannot enforce it.";
16099
+ readonly description: "The rkey is the operator's DID, or `{did}-{millis}` for a later period after one has ended, so each period keeps its own record. Enforced by the AppView on read: a record counts only at one of those rkeys and only with `subject` = that DID.";
14571
16100
  readonly record: {
14572
16101
  readonly type: "object";
14573
16102
  readonly required: ["subject", "createdAt"];
@@ -15288,11 +16817,11 @@ export declare const schemas: ({
15288
16817
  } | {
15289
16818
  readonly lexicon: 1;
15290
16819
  readonly id: "pub.techne.draft.permissioned.putRecords";
15291
- readonly description: "Write up to 200 records into the caller's own repo in one call: each write is applied in order, exactly as putRecord applies it (the same admission, receipts, no-op re-put and swapCid), each in its own transaction. NOT atomic: a write that is refused does not undo the writes before it or stop the ones after it, and each write's result says what happened to it. That is why this is not called applyWrites: atproto's com.atproto.repo.applyWrites commits all of its writes or none, and this does not (each write keeps putRecord's own per-record locking, so a batch never holds more than one record's locks). The caller authenticates with its own credential: a session from any sign-in lane (OAuth included), or an atproto service-auth JWT (iss = the caller, aud = the AppView's service DID, lxm = this method). repo must be the caller, or a collective or circle the platform holds the credential of whose own member space (`space.collective.member/self`) the caller manages (that space's manage leg alone hands over the authority's pen; managing another of its spaces does not); in a circle (a collective whose descriptor names a circle type) a caller holding only that space's write leg (role 20-29) holds the pen for pub.techne.draft.membership writes alone: an add (a new claim at a key that holds none now, not ending, whose addedBy is the caller or absent) or the caller's own claim (its leave, or a re-put keeping its subject and addedBy); anything else as the circle is Forbidden, or a collective the caller made that has nothing placed yet (for at most a day), else Forbidden and nothing is written. A write refused for itself (a malformed or invalid record, a swapCid that does not match, a conflict) is reported in its result as the error putRecord would have answered, and the next write is applied. A refusal that holds for the whole call stops it with that error, and no later write is applied: the caller's account is being deleted, or is deleted (AccountDeleting; what it wrote goes with the account), or a failure inside the AppView (HTTP 500; the writes applied before it stay written, so read them back or send the batch again: writing the current version again for the same space is a no-op). Callers should treat a failed batch as all-or-nothing and send it again whole: re-putting the records that landed is a no-op (in an app's space only for its app or under `space:` scopes covering it; anyone else's re-put there is Forbidden), and at the move to atproto's permissioned data this method becomes the owner's own PDS com.atproto.repo.applyWrites, which is atomic. One call spends one of the caller's writes (RateLimitExceeded), whatever the number of writes it carries. A request body that is not this method's input is refused as InvalidRequest, with an XRPC error body ({\"error\":\"InvalidRequest\",\"message\":...}): HTTP 413 for a body over 8 MiB (8,388,608 bytes; it is not read past that); 415 for one not sent as application/json; 400 for one that is not JSON or carries no writes or more than 200; 422 for JSON that is not the input (a field missing or of the wrong type). Such a refused call still spends one of the caller's writes. Each write is checked against the token's space scopes as putRecord checks it, and a write that replaces a record already written for an app's space (a pub.techne.draft.space.private space) by a caller that is neither the app its key names nor holds `space:` scopes covering a put there is refused as putRecord refuses it; either refusal is that write's result (Forbidden), and the next write is applied. A first write is never refused for its space. `space` is required: a write that names no space is refused as InvalidRequest (HTTP 400; for putRecords the whole call, and nothing is written), since public records are written with com.atproto.repo.putRecord and a record only the caller reads goes in its own pub.techne.draft.space.personal. Records written before this rule with no space stay stored and readable by their writer. Draft tier.";
16820
+ readonly description: "Write up to 200 records into the caller's own repo in one call: each write is applied in order, exactly as putRecord applies it (the same admission, receipts, no-op re-put and swapCid), each in its own transaction. NOT atomic: a write that is refused does not undo the writes before it or stop the ones after it, and each write's result says what happened to it. That is why this is not called applyWrites: atproto's com.atproto.repo.applyWrites commits all of its writes or none, and this does not (each write keeps putRecord's own per-record locking, so a batch never holds more than one record's locks). The caller authenticates with its own credential: a session from any sign-in lane (OAuth included), or an atproto service-auth JWT (iss = the caller, aud = the AppView's service DID, lxm = this method). repo must be the caller, or a collective or circle the platform holds the credential of whose own member space (`space.collective.member/self`) the caller manages (that space's manage leg alone hands over the authority's pen; managing another of its spaces does not); in a circle (a collective whose descriptor names a circle type) a caller holding only that space's write leg (role 20-29) holds the pen for pub.techne.draft.membership writes alone: an add (a new claim at a key that holds none now, not ending, whose addedBy is the caller or absent) or the caller's own claim (its leave, or a re-put keeping its subject and addedBy); anything else as the circle is Forbidden, or a collective the caller made that has nothing placed yet (for at most a day), else Forbidden and nothing is written. A write refused for itself (a malformed or invalid record, a swapCid that does not match, a conflict) is reported in its result as the error putRecord would have answered, and the next write is applied, except in a roster batch: one with any pub.techne.draft.membership write, in whatever repo. A roster batch of more than one write is first checked whole, and a write in it that putRecord would refuse before reading anything (malformed, over 2 MiB, failing its lexicon, or naming a space it cannot be written into) refuses the call as InvalidRequest (HTTP 400) with nothing written; it then stops at its first refused write, and every write after that one is reported as Conflict and not written. Since any prefix of a roster batch may be what is left written, a batch written as a circle that has a manager must keep one after every prefix of its membership writes (see LastManager), not only after the whole batch: to make someone else manager, put their membership at role 30 or above before the caller's own lower one. A refusal that holds for the whole call stops it with that error, and no later write is applied: the caller's account is being deleted, or is deleted (AccountDeleting; what it wrote goes with the account), or a failure inside the AppView (HTTP 500; the writes applied before it stay written, so read them back or send the batch again: writing the current version again for the same space is a no-op). Callers should treat a failed batch as all-or-nothing and send it again whole: re-putting the records that landed is a no-op (in an app's space only for its app or under `space:` scopes covering it; anyone else's re-put there is Forbidden), and at the move to atproto's permissioned data this method becomes the owner's own PDS com.atproto.repo.applyWrites, which is atomic. One call spends one of the caller's writes (RateLimitExceeded), whatever the number of writes it carries. A request body that is not this method's input is refused as InvalidRequest, with an XRPC error body ({\"error\":\"InvalidRequest\",\"message\":...}): HTTP 413 for a body over 8 MiB (8,388,608 bytes; it is not read past that); 415 for one not sent as application/json; 400 for one that is not JSON or carries no writes or more than 200; 422 for JSON that is not the input (a field missing or of the wrong type). Such a refused call still spends one of the caller's writes. Each write is checked against the token's space scopes as putRecord checks it, and a write that replaces a record already written for an app's space (a pub.techne.draft.space.private space) by a caller that is neither the app its key names nor holds `space:` scopes covering a put there is refused as putRecord refuses it; either refusal is that write's result (Forbidden), and the next write is applied (in a roster batch, the writes after it are Conflict, not written). A first write is never refused for its space. `space` is required: a write that names no space is refused as InvalidRequest (HTTP 400; for putRecords the whole call, and nothing is written), since public records are written with com.atproto.repo.putRecord and a record only the caller reads goes in its own pub.techne.draft.space.personal. Records written before this rule with no space stay stored and readable by their writer. Draft tier.";
15292
16821
  readonly defs: {
15293
16822
  readonly main: {
15294
16823
  readonly type: "procedure";
15295
- readonly description: "Up to 200 putRecord writes, applied in order, each in its own transaction, for one write of your rate. Not atomic: each write's result says what happened to it, and a write refused for itself does not stop the others (AccountDeleting or an HTTP 500 stops the rest). Send a failed batch again whole: re-putting what landed is a no-op (in an app's space, only for its app or under covering scopes). Space scopes and space.private apply to each write as in putRecord: a first write is never refused for its space, but replacing a record already written for an app's space needs the app its key names or `space:` scopes covering it, and that write's result is Forbidden. Every write names its `space` (a write with none refuses the whole call, InvalidRequest; public records go through com.atproto.repo.putRecord). Draft tier.";
16824
+ readonly description: "Up to 200 putRecord writes, applied in order, each in its own transaction, for one write of your rate. Not atomic: each write's result says what happened to it, and a write refused for itself does not stop the others (AccountDeleting or an HTTP 500 stops the rest), except in a roster batch (one with any pub.techne.draft.membership write), which stops at its first refused write and reports each later one as Conflict, not written; as a circle, every prefix of its membership writes must keep the circle a manager. Send a failed batch again whole: re-putting what landed is a no-op (in an app's space, only for its app or under covering scopes). Space scopes and space.private apply to each write as in putRecord: a first write is never refused for its space, but replacing a record already written for an app's space needs the app its key names or `space:` scopes covering it, and that write's result is Forbidden. Every write names its `space` (a write with none refuses the whole call, InvalidRequest; public records go through com.atproto.repo.putRecord). Draft tier.";
15296
16825
  readonly input: {
15297
16826
  readonly encoding: "application/json";
15298
16827
  readonly schema: {
@@ -15343,7 +16872,7 @@ export declare const schemas: ({
15343
16872
  readonly description: "HTTP 403. repo is not the caller's own (or a collective's or circle's the caller may write as, see the description). Nothing is written.";
15344
16873
  }, {
15345
16874
  readonly name: "LastManager";
15346
- readonly description: "HTTP 409. The write, as a circle, would leave it with members and nobody at role >= 30. Make someone else manager first. Nothing is written.";
16875
+ readonly description: "HTTP 409. The write, as a circle, would leave it with members and nobody at role >= 30, after the whole batch or after any prefix of its membership writes (a roster batch stops at its first refused write, so any prefix may be what is left written). Make someone else manager first. Nothing is written.";
15347
16876
  }, {
15348
16877
  readonly name: "AccountDeleting";
15349
16878
  readonly description: "HTTP 403. The caller's account is being deleted, or is deleted. Nothing more is written; writes applied before the deletion began go with the account.";
@@ -15426,8 +16955,8 @@ export declare const schemas: ({
15426
16955
  readonly properties: {
15427
16956
  readonly error: {
15428
16957
  readonly type: "string";
15429
- readonly description: "InvalidRequest (malformed, a body that fails its collection's published lexicon, or a record over 2 MiB, more than a putRecord body may be), InvalidSwap (swapCid did not match the current version), Conflict (the same key holds a public record in the caller's repo, or a concurrent write replaced this version before it was recorded), IdentityConflict (the write would change a contact's identity, which writing again never fixes; see putRecord), DuplicatePhone (a contact write introduces a number another of the caller's active contacts carries; see putRecord) or Forbidden (the call's `space:` scopes do not cover the write, or it replaces a record already written for an app's space and the caller is neither the app its key names nor holds `space:` scopes covering it; see putRecord).";
15430
- readonly knownValues: ["InvalidRequest", "InvalidSwap", "Conflict", "IdentityConflict", "DuplicatePhone"];
16958
+ readonly description: "InvalidRequest (malformed, a body that fails its collection's published lexicon, or a record over 2 MiB, more than a putRecord body may be), InvalidSwap (swapCid did not match the current version), Conflict (the same key holds a public record in the caller's repo, or a concurrent write replaced this version before it was recorded), IdentityConflict (the write would change a contact's identity, which writing again never fixes; see putRecord), DuplicatePhone (a contact write introduces a number another of the caller's active contacts carries; see putRecord), RateLimitExceeded (a contact write that binds a number to an account found the caller's phone lookups spent; retry it in a minute) or Forbidden (the call's `space:` scopes do not cover the write, or it replaces a record already written for an app's space and the caller is neither the app its key names nor holds `space:` scopes covering it; see putRecord).";
16959
+ readonly knownValues: ["InvalidRequest", "InvalidSwap", "Conflict", "IdentityConflict", "DuplicatePhone", "RateLimitExceeded", "Forbidden"];
15431
16960
  };
15432
16961
  readonly message: {
15433
16962
  readonly type: "string";
@@ -15520,7 +17049,7 @@ export declare const schemas: ({
15520
17049
  readonly main: {
15521
17050
  readonly type: "record";
15522
17051
  readonly key: "any";
15523
- readonly description: "Publishers use sidecar_rkey(subject AT-URI), one research record per place per writer. `any` permits that convention but cannot enforce it.";
17052
+ readonly description: "Publishers use sidecar_rkey(subject AT-URI), one research record per place per writer. Readers do not depend on the key: the AppView uses the newest research record about a place from a trusted writer.";
15524
17053
  readonly record: {
15525
17054
  readonly type: "object";
15526
17055
  readonly required: ["subject", "createdAt"];
@@ -15889,7 +17418,7 @@ export declare const schemas: ({
15889
17418
  readonly main: {
15890
17419
  readonly type: "record";
15891
17420
  readonly key: "any";
15892
- readonly description: "Publishers use sidecar_rkey(curated record AT-URI), so each curated record has one provenance per curator. `any` permits that convention but cannot enforce it.";
17421
+ readonly description: "Publishers use sidecar_rkey(curated record AT-URI), so each curated record has one provenance per curator. Readers do not depend on the key: the AppView finds a curated record's provenance by `subject` in the curator's repo.";
15893
17422
  readonly record: {
15894
17423
  readonly type: "object";
15895
17424
  readonly required: ["subject", "sources", "readiness", "createdAt"];
@@ -16612,6 +18141,32 @@ export declare const schemas: ({
16612
18141
  readonly type: "string";
16613
18142
  readonly format: "handle";
16614
18143
  };
18144
+ readonly linked: {
18145
+ readonly type: "array";
18146
+ readonly items: {
18147
+ readonly type: "ref";
18148
+ readonly ref: "lex:pub.techne.draft.query.getRecords#linkedHandle";
18149
+ };
18150
+ readonly description: "The other accounts linked to this one now (the same person; links are public, alsoKnownAs on both DIDs). Absent when none, and while a sign-in method of any account of the person is frozen (a freeze pauses the link). A linked account that is not active or is suspended is left out.";
18151
+ };
18152
+ };
18153
+ };
18154
+ readonly linkedHandle: {
18155
+ readonly type: "object";
18156
+ readonly required: ["did"];
18157
+ readonly properties: {
18158
+ readonly did: {
18159
+ readonly type: "string";
18160
+ readonly format: "did";
18161
+ };
18162
+ readonly handle: {
18163
+ readonly type: "string";
18164
+ readonly format: "handle";
18165
+ };
18166
+ readonly displayName: {
18167
+ readonly type: "string";
18168
+ readonly description: "The linked account's public profile name, when it has one.";
18169
+ };
16615
18170
  };
16616
18171
  };
16617
18172
  readonly resolved: {
@@ -17008,7 +18563,7 @@ export declare const schemas: ({
17008
18563
  readonly main: {
17009
18564
  readonly type: "record";
17010
18565
  readonly key: "any";
17011
- readonly description: "Publishers use sidecar_rkey(subject AT-URI), so a rule holds one receipt per record, updated when it reprocesses. `any` permits that convention but cannot enforce it.";
18566
+ readonly description: "Publishers use sidecar_rkey(subject AT-URI), so a rule holds one receipt per record, updated when it reprocesses. Readers do not depend on the key: the AppView counts a receipt from the rule's account about the record's current cid.";
17012
18567
  readonly record: {
17013
18568
  readonly type: "object";
17014
18569
  readonly required: ["subject", "createdAt"];
@@ -17081,7 +18636,7 @@ export declare const schemas: ({
17081
18636
  readonly defs: {
17082
18637
  readonly main: {
17083
18638
  readonly type: "procedure";
17084
- readonly description: "Operator only. Stop indexing one author's records of a community or requested type, and remove the ones this platform indexed. The block outlives the author's account here, so neither the firehose nor a backfill brings the records back. Other authors' records of the type are untouched. The records stay in the author's repo; this platform stops serving them.";
18639
+ readonly description: "Operator only, with the moderate scope. Stop indexing one author's records of a community or requested type, and remove the ones this platform indexed. The block outlives the author's account here, so neither the firehose nor a backfill brings the records back. Other authors' records of the type are untouched. The records stay in the author's repo; this platform stops serving them.";
17085
18640
  readonly input: {
17086
18641
  readonly encoding: "application/json";
17087
18642
  readonly schema: {
@@ -17138,11 +18693,17 @@ export declare const schemas: ({
17138
18693
  readonly name: "AuthenticationRequired";
17139
18694
  readonly description: "Blocking is a signed-in act.";
17140
18695
  }, {
17141
- readonly name: "Forbidden";
17142
- readonly description: "The caller is not an operator of this platform.";
18696
+ readonly name: "NotAuthorized";
18697
+ readonly description: "The caller is not an operator of this platform, or the call does not carry the moderate scope (HTTP 403).";
18698
+ }, {
18699
+ readonly name: "ProgramRefused";
18700
+ readonly description: "The caller is a program's token: a program never reaches an operator method (HTTP 403).";
17143
18701
  }, {
17144
18702
  readonly name: "UnknownType";
17145
18703
  readonly description: "`nsid` names no community or requested type (our own types are not limited).";
18704
+ }, {
18705
+ readonly name: "InvalidRequest";
18706
+ readonly description: "`reason` is blank or over 1000 characters, or `author` is not a DID (HTTP 400).";
17146
18707
  }];
17147
18708
  };
17148
18709
  };
@@ -17724,7 +19285,7 @@ export declare const schemas: ({
17724
19285
  readonly defs: {
17725
19286
  readonly main: {
17726
19287
  readonly type: "procedure";
17727
- readonly description: "Operator only. Stop indexing a community or requested type and remove every record of it this platform indexed. The type is marked blocked (it is no longer loaded, searched or listed, except in listTypes filtered to its creator (`creator`) and in getType, which still answer it as blocked) and put on the block list, so neither the firehose nor a backfill brings its records back. The records stay in their authors' repos; this platform stops serving them. Our own platform types cannot be purged.";
19288
+ readonly description: "Operator only, with the moderate scope. Stop indexing a community or requested type and remove every record of it this platform indexed. The type is marked blocked (it is no longer loaded, searched or listed, except in listTypes filtered to its creator (`creator`) and in getType, which still answer it as blocked) and put on the block list, so neither the firehose nor a backfill brings its records back. The records stay in their authors' repos; this platform stops serving them. Our own platform types cannot be purged.";
17728
19289
  readonly input: {
17729
19290
  readonly encoding: "application/json";
17730
19291
  readonly schema: {
@@ -17772,11 +19333,17 @@ export declare const schemas: ({
17772
19333
  readonly name: "AuthenticationRequired";
17773
19334
  readonly description: "Purging is a signed-in act.";
17774
19335
  }, {
17775
- readonly name: "Forbidden";
17776
- readonly description: "The caller is not an operator of this platform.";
19336
+ readonly name: "NotAuthorized";
19337
+ readonly description: "The caller is not an operator of this platform, or the call does not carry the moderate scope (HTTP 403).";
19338
+ }, {
19339
+ readonly name: "ProgramRefused";
19340
+ readonly description: "The caller is a program's token: a program never reaches an operator method (HTTP 403).";
17777
19341
  }, {
17778
19342
  readonly name: "UnknownType";
17779
19343
  readonly description: "`nsid` names no community or requested type (our own types cannot be purged).";
19344
+ }, {
19345
+ readonly name: "InvalidRequest";
19346
+ readonly description: "`reason` is blank or over 1000 characters (HTTP 400).";
17780
19347
  }];
17781
19348
  };
17782
19349
  };
@@ -17888,7 +19455,7 @@ export declare const schemas: ({
17888
19455
  readonly main: {
17889
19456
  readonly type: "record";
17890
19457
  readonly key: "any";
17891
- readonly description: "Writers use the retired identity's DID as the rkey, so each writer holds at most one per identity. `any` permits that convention but cannot enforce it, so readers count a retirement only at rkey = its subject.";
19458
+ readonly description: "Writers use the retired identity's DID as the rkey, so each writer holds at most one per identity. Enforced by the AppView on read: a retirement at any other key is not counted.";
17892
19459
  readonly record: {
17893
19460
  readonly type: "object";
17894
19461
  readonly required: ["subject", "createdAt"];
@@ -17950,7 +19517,7 @@ export declare const schemas: ({
17950
19517
  readonly main: {
17951
19518
  readonly type: "record";
17952
19519
  readonly key: "any";
17953
- readonly description: "One record per pair: publishers put the lower AT-URI in `subject` and use pair_rkey(subject, other) (regenos_lexicons::sidecar), so the reversed pair cannot get a second record. `any` permits that convention but cannot enforce it. A pair asserted both sameAs and distinctFrom by writers a reader trusts is a conflict that reader resolves.";
19520
+ readonly description: "One record per pair: publishers put the lower AT-URI in `subject` and use pair_rkey(subject, other) (regenos_lexicons::sidecar), so the reversed pair cannot get a second record. Readers do not depend on the key: the AppView walks pairs from both ends, so a reversed or repeated pair is the same link. A pair asserted both sameAs and distinctFrom by writers a reader trusts is a conflict that reader resolves.";
17954
19521
  readonly record: {
17955
19522
  readonly type: "object";
17956
19523
  readonly required: ["subject", "other", "createdAt"];
@@ -18104,7 +19671,7 @@ export declare const schemas: ({
18104
19671
  readonly main: {
18105
19672
  readonly type: "record";
18106
19673
  readonly key: "any";
18107
- readonly description: "Publishers use sidecar_rkey(subject AT-URI), one per record. `any` permits that convention but cannot enforce it.";
19674
+ readonly description: "Publishers use sidecar_rkey(subject AT-URI), one per record. Readers mostly find source sidecars by `subject` at any key; the commons curator reads only this key to tell whether a source item is gone upstream.";
18108
19675
  readonly record: {
18109
19676
  readonly type: "object";
18110
19677
  readonly required: ["subject", "sourceStatus", "lastSeenAt", "createdAt"];
@@ -18204,7 +19771,7 @@ export declare const schemas: ({
18204
19771
  };
18205
19772
  };
18206
19773
  };
18207
- readonly description: "Publishers use an immutable content-derived rkey: changed credit or license content creates a new record and CID; existing content keys are never rewritten. The key:any schema permits this convention but cannot enforce immutability.";
19774
+ readonly description: "Publishers use an immutable content-derived rkey: changed credit or license content creates a new record and CID; existing content keys are never rewritten. Readers do not depend on the key: a sourceAttribution is read only through a strongRef (uri and cid) that names it.";
18208
19775
  };
18209
19776
  };
18210
19777
  } | {
@@ -18297,7 +19864,7 @@ export declare const schemas: ({
18297
19864
  readonly main: {
18298
19865
  readonly type: "record";
18299
19866
  readonly key: "any";
18300
- readonly description: "Publishers use sidecar_rkey(subject AT-URI), one summary per record per writer. `any` permits that convention but cannot enforce it.";
19867
+ readonly description: "Publishers use sidecar_rkey(subject AT-URI), so a writer's rewrite replaces its one summary. Readers do not depend on the key: the AppView finds summaries by `subject` and its cid and uses the newest from a trusted writer.";
18301
19868
  readonly record: {
18302
19869
  readonly type: "object";
18303
19870
  readonly required: ["subject", "text", "createdAt"];
@@ -18404,7 +19971,7 @@ export declare const schemas: ({
18404
19971
  readonly main: {
18405
19972
  readonly type: "record";
18406
19973
  readonly key: "any";
18407
- readonly description: "Publishers use sidecar_rkey(subject AT-URI), so a writer holds one verdict per record, updated when a new version is judged. `any` permits that convention but cannot enforce it.";
19974
+ readonly description: "Publishers use sidecar_rkey(subject AT-URI), so a writer holds one verdict per record, updated when a new version is judged. Readers do not depend on the key: any trusted verdict naming the subject counts.";
18408
19975
  readonly record: {
18409
19976
  readonly type: "object";
18410
19977
  readonly required: ["subject", "values", "createdAt"];
@@ -18441,7 +20008,7 @@ export declare const schemas: ({
18441
20008
  readonly main: {
18442
20009
  readonly type: "record";
18443
20010
  readonly key: "any";
18444
- readonly description: "The record key is the subject DID, so an issuer holds at most one per account. `any` permits that convention but cannot enforce it, so readers count a verification only at rkey = its subject DID.";
20011
+ readonly description: "The record key is the subject DID, so an issuer holds at most one per account. Enforced by the AppView on read: a verification at any other key is not counted.";
18445
20012
  readonly record: {
18446
20013
  readonly type: "object";
18447
20014
  readonly required: ["subject", "createdAt"];
@@ -18512,7 +20079,7 @@ export declare const schemas: ({
18512
20079
  readonly defs: {
18513
20080
  readonly main: {
18514
20081
  readonly type: "procedure";
18515
- readonly description: "Let an app read a space: writes the space authority's pub.techne.draft.appAccess for the space and the app, placed in the space. Whoever passes the space type's published manage leg may call it (the owner of a personal space; Facilitator and up for a collective's): the record is written with the authority's pen, which is what the manage leg grants. Approving again is a no-op. A member's request (pub.techne.draft.appAccessRequest) for the same space and app becomes approved. Its only other effect is clearing the request from the approvers' inboxes.";
20082
+ readonly description: "Let an app read a space: writes the space authority's pub.techne.draft.appAccess for the space and the app, placed in the space. Whoever passes the space type's published manage leg may call it (the owner of a personal space itself, never another account linked to it; Facilitator and up for a collective's, a role held by any of the caller's linked accounts included): the record is written into the authority's repo with the authority's pen, which is what the manage leg grants. Approving again is a no-op. A member's request (pub.techne.draft.appAccessRequest) for the same space and app becomes approved. Its only other effect is clearing the request from the approvers' inboxes.";
18516
20083
  readonly input: {
18517
20084
  readonly encoding: "application/json";
18518
20085
  readonly schema: {
@@ -18560,7 +20127,7 @@ export declare const schemas: ({
18560
20127
  readonly description: "Malformed input, or a space type that takes no app approvals yet.";
18561
20128
  }, {
18562
20129
  readonly name: "NotAuthorized";
18563
- readonly description: "The caller does not pass the space type's manage leg.";
20130
+ readonly description: "The caller does not pass the space type's manage leg: for a personal space, the caller is not its owner (an account linked to the owner is refused too).";
18564
20131
  }];
18565
20132
  };
18566
20133
  };
@@ -18777,7 +20344,7 @@ export declare const schemas: ({
18777
20344
  readonly defs: {
18778
20345
  readonly main: {
18779
20346
  readonly type: "query";
18780
- readonly description: "Whether an app may read a space, derived and never stored: `approved` when the authority's pub.techne.draft.appAccess exists, `pending` when a pub.techne.draft.appAccessRequest counts without one, `none` otherwise. A request counts only while its requester can read the space, and for a caller who is not an approver only the caller's own request counts (an approver sees every request). Nothing stores a denial. `approvers` are who can approve it: the manage-leg holders, or the owner of a personal space. `requesterIsApprover` says the caller is one of them, so approving is one tap and sends no notification. Approvers are notified of a request only when its requester can read the space and is not an approver. Only a reader of the space may ask.";
20347
+ readonly description: "Whether an app may read a space, derived and never stored: `approved` when the authority's pub.techne.draft.appAccess exists, `pending` when a pub.techne.draft.appAccessRequest counts without one, `none` otherwise. A request counts only while its requester can read the space, and for a caller who is not an approver only requests by the caller's own accounts (its person) count (an approver sees every request). Nothing stores a denial. `approvers` are who can approve it, each an account social.scenius.approveAppAccess accepts: the manage-leg holders, or the owner of a personal space itself (never another account linked to it). `requesterIsApprover` says the caller's own account is one of them, so approving is one tap and sends no notification. Approvers are notified of a request only when its requester can read the space and is not an approver. Only a reader of the space may ask.";
18781
20348
  readonly parameters: {
18782
20349
  readonly type: "params";
18783
20350
  readonly properties: {
@@ -19019,7 +20586,7 @@ export declare const schemas: ({
19019
20586
  readonly defs: {
19020
20587
  readonly main: {
19021
20588
  readonly type: "query";
19022
- readonly description: "What an app gets from the caller, for its sign-in to list: every space the caller passes the manage leg of (their own included) whose authority has approved the app, each with the criteria that approval states for future spaces.";
20589
+ readonly description: "What an app gets from the caller, for its sign-in to list: every space the caller's person passes the manage leg of (the caller's own, and its linked accounts' spaces, included) whose authority has approved the app, each with the criteria that approval states for future spaces.";
19023
20590
  readonly parameters: {
19024
20591
  readonly type: "params";
19025
20592
  readonly properties: {
@@ -19826,6 +21393,7 @@ export declare const ids: {
19826
21393
  readonly PubTechneDraftIdentityAccountsForPhones: "pub.techne.draft.identity.accountsForPhones";
19827
21394
  readonly PubTechneDraftIdentityAttest: "pub.techne.draft.identity.attest";
19828
21395
  readonly PubTechneDraftIdentityBeginAddMethod: "pub.techne.draft.identity.beginAddMethod";
21396
+ readonly PubTechneDraftIdentityCancelPendingChange: "pub.techne.draft.identity.cancelPendingChange";
19829
21397
  readonly PubTechneDraftIdentityCheckLinkToken: "pub.techne.draft.identity.checkLinkToken";
19830
21398
  readonly PubTechneDraftIdentityCreateCollective: "pub.techne.draft.identity.createCollective";
19831
21399
  readonly PubTechneDraftIdentityCreateLinkToken: "pub.techne.draft.identity.createLinkToken";
@@ -19840,6 +21408,8 @@ export declare const ids: {
19840
21408
  readonly PubTechneDraftIdentityListLinkTokens: "pub.techne.draft.identity.listLinkTokens";
19841
21409
  readonly PubTechneDraftIdentityListMethods: "pub.techne.draft.identity.listMethods";
19842
21410
  readonly PubTechneDraftIdentityListPhoneHolds: "pub.techne.draft.identity.listPhoneHolds";
21411
+ readonly PubTechneDraftIdentityManageMethods: "pub.techne.draft.identity.manageMethods";
21412
+ readonly PubTechneDraftIdentityOpenAccountPage: "pub.techne.draft.identity.openAccountPage";
19843
21413
  readonly PubTechneDraftIdentityRedeemLinkToken: "pub.techne.draft.identity.redeemLinkToken";
19844
21414
  readonly PubTechneDraftIdentityReleasePhoneHold: "pub.techne.draft.identity.releasePhoneHold";
19845
21415
  readonly PubTechneDraftIdentityResetLinkToken: "pub.techne.draft.identity.resetLinkToken";