techne-sdk 0.3.8 → 0.4.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 (49) hide show
  1. package/CHANGELOG.md +59 -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 +1067 -194
  10. package/dist/generated/index.d.ts +9 -0
  11. package/dist/generated/index.js +27 -0
  12. package/dist/generated/lexicons.d.ts +1436 -148
  13. package/dist/generated/lexicons.js +782 -23
  14. package/dist/generated/nsid.d.ts +14 -0
  15. package/dist/generated/nsid.js +14 -0
  16. package/dist/generated/nsid.json +14 -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 +3 -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 +22 -4
  26. package/dist/generated/types/pub/techne/draft/identity/defs.js +7 -0
  27. package/dist/generated/types/pub/techne/draft/identity/finishAddMethod.d.ts +6 -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 +6 -1
  35. package/dist/generated/types/pub/techne/draft/identity/manageMethods.d.ts +225 -0
  36. package/dist/generated/types/pub/techne/draft/identity/manageMethods.js +209 -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/registry/blockIndex.d.ts +7 -1
  44. package/dist/generated/types/pub/techne/draft/registry/blockIndex.js +17 -3
  45. package/dist/generated/types/pub/techne/draft/registry/purgeType.d.ts +7 -1
  46. package/dist/generated/types/pub/techne/draft/registry/purgeType.js +17 -3
  47. package/dist/wasm/techne-wasm.gen.js +1 -1
  48. package/dist/wasm/techne-wasm2js.gen.js +11723 -11721
  49. package/package.json +2 -1
@@ -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.";
@@ -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: {
@@ -2970,6 +2973,9 @@ export declare const schemaDict: {
2970
2973
  }, {
2971
2974
  readonly name: "ChannelReleased";
2972
2975
  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).";
2976
+ }, {
2977
+ readonly name: "MethodFrozen";
2978
+ 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
2979
  }, {
2974
2980
  readonly name: "RateLimitExceeded";
2975
2981
  readonly description: "As identity.resolve (HTTP 429).";
@@ -3024,6 +3030,9 @@ export declare const schemaDict: {
3024
3030
  }, {
3025
3031
  readonly name: "RateLimitExceeded";
3026
3032
  readonly description: "Too many codes sent to this address (HTTP 429).";
3033
+ }, {
3034
+ readonly name: "MethodFrozen";
3035
+ 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
3036
  }, {
3028
3037
  readonly name: "SendFailed";
3029
3038
  readonly description: "The code could not be texted to that phone number (HTTP 502). Try again.";
@@ -3031,6 +3040,48 @@ export declare const schemaDict: {
3031
3040
  };
3032
3041
  };
3033
3042
  };
3043
+ readonly PubTechneDraftIdentityCancelPendingChange: {
3044
+ readonly lexicon: 1;
3045
+ readonly id: "pub.techne.draft.identity.cancelPendingChange";
3046
+ readonly defs: {
3047
+ readonly main: {
3048
+ readonly type: "procedure";
3049
+ 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.";
3050
+ readonly input: {
3051
+ readonly encoding: "application/json";
3052
+ readonly schema: {
3053
+ readonly type: "object";
3054
+ readonly required: ["id"];
3055
+ readonly properties: {
3056
+ readonly id: {
3057
+ readonly type: "string";
3058
+ readonly maxLength: 64;
3059
+ };
3060
+ };
3061
+ };
3062
+ };
3063
+ readonly output: {
3064
+ readonly encoding: "application/json";
3065
+ readonly schema: {
3066
+ readonly type: "object";
3067
+ readonly required: ["ok"];
3068
+ readonly properties: {
3069
+ readonly ok: {
3070
+ readonly type: "boolean";
3071
+ };
3072
+ };
3073
+ };
3074
+ };
3075
+ readonly errors: [{
3076
+ readonly name: "AuthenticationRequired";
3077
+ readonly description: "No signed-in caller.";
3078
+ }, {
3079
+ readonly name: "NotFound";
3080
+ readonly description: "No such pending change on the caller's account, or it already completed or was cancelled.";
3081
+ }];
3082
+ };
3083
+ };
3084
+ };
3034
3085
  readonly PubTechneDraftIdentityCheckLinkToken: {
3035
3086
  readonly lexicon: 1;
3036
3087
  readonly id: "pub.techne.draft.identity.checkLinkToken";
@@ -3146,7 +3197,7 @@ export declare const schemaDict: {
3146
3197
  readonly defs: {
3147
3198
  readonly main: {
3148
3199
  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.";
3200
+ 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
3201
  readonly input: {
3151
3202
  readonly encoding: "application/json";
3152
3203
  readonly schema: {
@@ -3237,27 +3288,68 @@ export declare const schemaDict: {
3237
3288
  };
3238
3289
  readonly methodView: {
3239
3290
  readonly type: "object";
3240
- readonly description: "One sign-in method bound to the caller's account, masked.";
3291
+ readonly description: "One sign-in method of the caller's account, masked.";
3241
3292
  readonly required: ["bid", "type", "masked", "boundAt"];
3242
3293
  readonly properties: {
3243
3294
  readonly bid: {
3244
3295
  readonly type: "string";
3245
3296
  readonly maxLength: 64;
3246
- readonly description: "The binding id (the credential's record key). Names the method in unlinkMethod.";
3297
+ 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
3298
  };
3248
3299
  readonly type: {
3249
3300
  readonly type: "string";
3250
- readonly knownValues: ["email", "phone"];
3301
+ readonly knownValues: ["email", "phone", "passkey", "nostr", "recoveryCodes"];
3251
3302
  };
3252
3303
  readonly masked: {
3253
3304
  readonly type: "string";
3254
3305
  readonly maxLength: 320;
3255
- readonly description: "The channel with most of it hidden, e.g. `j•••@example.com`, `+1 ••• ••• 4567`.";
3306
+ 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)`.";
3256
3307
  };
3257
3308
  readonly boundAt: {
3258
3309
  readonly type: "string";
3259
3310
  readonly format: "datetime";
3260
3311
  };
3312
+ readonly recovery: {
3313
+ readonly type: "boolean";
3314
+ readonly description: "A recovery method of this account. Private: only the account sees it.";
3315
+ };
3316
+ readonly frozenUntil: {
3317
+ readonly type: "string";
3318
+ readonly format: "datetime";
3319
+ readonly description: "Frozen: it signs in nowhere until then, or until a recovery method lifts it.";
3320
+ };
3321
+ readonly programs: {
3322
+ readonly type: "boolean";
3323
+ 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.";
3324
+ };
3325
+ };
3326
+ };
3327
+ readonly pendingChange: {
3328
+ readonly type: "object";
3329
+ readonly description: "A change that waits for its time (a method's removal or the account's deletion, 7 days; the account's first recovery mark, 24 hours). 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 (and not lifted early by a recovery method) is dropped when it runs out, not completed.";
3330
+ readonly required: ["id", "kind", "createdAt", "dueAt"];
3331
+ readonly properties: {
3332
+ readonly id: {
3333
+ readonly type: "string";
3334
+ readonly maxLength: 64;
3335
+ };
3336
+ readonly kind: {
3337
+ readonly type: "string";
3338
+ readonly knownValues: ["removeMethod", "deleteAccount", "markRecovery"];
3339
+ };
3340
+ readonly method: {
3341
+ readonly type: "string";
3342
+ readonly maxLength: 64;
3343
+ readonly description: "The method it removes or marks.";
3344
+ };
3345
+ readonly createdAt: {
3346
+ readonly type: "string";
3347
+ readonly format: "datetime";
3348
+ };
3349
+ readonly dueAt: {
3350
+ readonly type: "string";
3351
+ readonly format: "datetime";
3352
+ };
3261
3353
  };
3262
3354
  };
3263
3355
  readonly linkView: {
@@ -3419,6 +3511,12 @@ export declare const schemaDict: {
3419
3511
  }, {
3420
3512
  readonly name: "RateLimitExceeded";
3421
3513
  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.";
3514
+ }, {
3515
+ readonly name: "MethodFrozen";
3516
+ 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).";
3517
+ }, {
3518
+ readonly name: "ProtectedAccount";
3519
+ 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.";
3422
3520
  }, {
3423
3521
  readonly name: "UpstreamFailure";
3424
3522
  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.";
@@ -3507,6 +3605,9 @@ export declare const schemaDict: {
3507
3605
  }, {
3508
3606
  readonly name: "InvalidToken";
3509
3607
  readonly description: "The token is unknown, used, expired, or was issued to another session.";
3608
+ }, {
3609
+ readonly name: "ProtectedAccount";
3610
+ 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
3611
  }, {
3511
3612
  readonly name: "NotEmpty";
3512
3613
  readonly description: "The account to fold gained a record or is 7 days old or more; link instead.";
@@ -3520,7 +3621,7 @@ export declare const schemaDict: {
3520
3621
  readonly defs: {
3521
3622
  readonly main: {
3522
3623
  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.";
3624
+ 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
3625
  readonly input: {
3525
3626
  readonly encoding: "application/json";
3526
3627
  readonly schema: {
@@ -3591,7 +3692,7 @@ export declare const schemaDict: {
3591
3692
  };
3592
3693
  readonly record: {
3593
3694
  readonly type: "unknown";
3594
- readonly description: "The record, with the \"$subject\" (and optionally \"$now\") slots as string values.";
3695
+ readonly description: "The record, with the \"$subject\" (and optionally \"$now\" and \"$name\") slots as string values.";
3595
3696
  };
3596
3697
  };
3597
3698
  };
@@ -3641,6 +3742,9 @@ export declare const schemaDict: {
3641
3742
  }, {
3642
3743
  readonly name: "InvalidToken";
3643
3744
  readonly description: "The token is unknown, used, expired, or was issued to another session.";
3745
+ }, {
3746
+ readonly name: "ProtectedAccount";
3747
+ 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
3748
  }, {
3645
3749
  readonly name: "InvalidRequest";
3646
3750
  readonly description: "`primary` names neither account, or the other account's keys are not held here (sign in to it and link from there).";
@@ -3889,7 +3993,16 @@ export declare const schemaDict: {
3889
3993
  readonly defs: {
3890
3994
  readonly main: {
3891
3995
  readonly type: "query";
3892
- readonly description: "The caller's sign-in methods (masked) and the account's alias links. Signed-in members only.";
3996
+ readonly description: "The caller's sign-in methods (masked, with their recovery mark and freeze), its pending changes, and the account's alias links. Emails and phones only unless `allTypes` (shipped clients label every row as an email). Signed-in members only.";
3997
+ readonly parameters: {
3998
+ readonly type: "params";
3999
+ readonly properties: {
4000
+ readonly allTypes: {
4001
+ readonly type: "boolean";
4002
+ readonly description: "Also list passkeys, Nostr keys and the recovery-code set.";
4003
+ };
4004
+ };
4005
+ };
3893
4006
  readonly output: {
3894
4007
  readonly encoding: "application/json";
3895
4008
  readonly schema: {
@@ -3910,6 +4023,14 @@ export declare const schemaDict: {
3910
4023
  readonly ref: "lex:pub.techne.draft.identity.defs#linkView";
3911
4024
  };
3912
4025
  };
4026
+ readonly pending: {
4027
+ readonly type: "array";
4028
+ readonly description: "The account's pending changes, soonest first (the account page shows them at the top, with Cancel).";
4029
+ readonly items: {
4030
+ readonly type: "ref";
4031
+ readonly ref: "lex:pub.techne.draft.identity.defs#pendingChange";
4032
+ };
4033
+ };
3913
4034
  };
3914
4035
  };
3915
4036
  };
@@ -4016,22 +4137,116 @@ export declare const schemaDict: {
4016
4137
  };
4017
4138
  };
4018
4139
  };
4019
- readonly PubTechneDraftIdentityRedeemLinkToken: {
4140
+ readonly PubTechneDraftIdentityManageMethods: {
4020
4141
  readonly lexicon: 1;
4021
- readonly id: "pub.techne.draft.identity.redeemLinkToken";
4142
+ readonly id: "pub.techne.draft.identity.manageMethods";
4022
4143
  readonly defs: {
4023
4144
  readonly main: {
4024
4145
  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.";
4146
+ 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 notice to every method, cancellable by any of them, 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 notice. Ops: `list` (methods, pending changes, `hasRecovery`), `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` with an `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), ProtectedAccount when either account has a recovery mark, a freeze, a pending change, or a passkey, Nostr key or recovery codes), `fold` and `link` (take that offer: `token`, and for `link` the `primary`; need 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`), or `linked` with `link`), `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), for the notice queue (no `did`; only the accounts the calling PDS hosts; the platform emails those of accounts hosted elsewhere itself) `notices` (up to 100 to deliver; one taken and not confirmed is offered again after 5 minutes, at most 10 times) and `noticesSent`, 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
4147
  readonly input: {
4027
4148
  readonly encoding: "application/json";
4028
4149
  readonly schema: {
4029
4150
  readonly type: "object";
4030
- readonly required: ["token"];
4151
+ readonly required: ["v", "op"];
4031
4152
  readonly properties: {
4153
+ readonly v: {
4154
+ readonly type: "integer";
4155
+ readonly const: 1;
4156
+ };
4157
+ readonly op: {
4158
+ readonly type: "string";
4159
+ 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", "operator"];
4160
+ };
4161
+ readonly did: {
4162
+ readonly type: "string";
4163
+ readonly format: "did";
4164
+ readonly description: "The signed-in account. Required for every op but `notices`, `noticesSent`, `dueDeletes` and `dueDeletesDone`.";
4165
+ };
4166
+ readonly stepUp: {
4167
+ readonly type: "ref";
4168
+ readonly ref: "lex:pub.techne.draft.identity.manageMethods#stepUp";
4169
+ };
4170
+ readonly method: {
4171
+ readonly type: "string";
4172
+ readonly maxLength: 64;
4173
+ readonly description: "The method acted on (its `id` in `list` or `signInMethods`).";
4174
+ };
4175
+ readonly pending: {
4176
+ readonly type: "string";
4177
+ readonly maxLength: 64;
4178
+ readonly description: "The pending change `cancel` cancels.";
4179
+ };
4180
+ readonly signOut: {
4181
+ readonly type: "boolean";
4182
+ readonly description: "With `freeze`: also sign out everywhere.";
4183
+ };
4184
+ readonly external: {
4185
+ readonly type: "ref";
4186
+ readonly ref: "lex:pub.techne.draft.identity.manageMethods#external";
4187
+ };
4188
+ readonly code: {
4189
+ readonly type: "string";
4190
+ readonly maxLength: 64;
4191
+ readonly description: "A recovery code, for `redeemCode`.";
4192
+ };
4193
+ readonly ids: {
4194
+ readonly type: "array";
4195
+ readonly maxLength: 100;
4196
+ readonly items: {
4197
+ readonly type: "integer";
4198
+ };
4199
+ readonly description: "Notice ids, for `noticesSent`.";
4200
+ };
4201
+ readonly emails: {
4202
+ readonly type: "array";
4203
+ readonly maxLength: 10;
4204
+ readonly items: {
4205
+ readonly type: "string";
4206
+ readonly maxLength: 320;
4207
+ };
4208
+ readonly description: "Retired, not read: a bare list has no verification dates, so the cutoff can't hold. importBackupEmails without `backupEmails` is 400 InvalidRequest.";
4209
+ };
4210
+ readonly backupEmails: {
4211
+ readonly type: "array";
4212
+ readonly maxLength: 10;
4213
+ readonly items: {
4214
+ readonly type: "ref";
4215
+ readonly ref: "lex:pub.techne.draft.identity.manageMethods#backupEmail";
4216
+ };
4217
+ readonly description: "importBackupEmails: the account's verified backup email addresses, all of them, each with when the PDS verified it.";
4218
+ };
4219
+ readonly dids: {
4220
+ readonly type: "array";
4221
+ readonly maxLength: 100;
4222
+ readonly items: {
4223
+ readonly type: "string";
4224
+ readonly format: "did";
4225
+ };
4226
+ readonly description: "dueDeletesDone: the accounts whose PDS account was deleted.";
4227
+ };
4228
+ readonly channel: {
4229
+ readonly type: "ref";
4230
+ readonly ref: "lex:pub.techne.draft.identity.defs#channel";
4231
+ readonly description: "addChannel: the email or phone the PDS just proved (a code it sent and checked).";
4232
+ };
4032
4233
  readonly token: {
4033
4234
  readonly type: "string";
4034
- readonly maxLength: 512;
4235
+ readonly maxLength: 128;
4236
+ readonly description: "fold / link: the offer's token from addChannel.";
4237
+ };
4238
+ readonly primary: {
4239
+ readonly type: "string";
4240
+ readonly format: "did";
4241
+ readonly description: "link: which of the two accounts is the primary.";
4242
+ };
4243
+ readonly on: {
4244
+ readonly type: "boolean";
4245
+ readonly description: "setPrograms: on or off.";
4246
+ };
4247
+ readonly program: {
4248
+ readonly type: "boolean";
4249
+ readonly description: "A program made this request: a session or token the PDS's programmatic sign-in opened. Account security is refused (ProgramRefused).";
4035
4250
  };
4036
4251
  };
4037
4252
  };
@@ -4040,55 +4255,452 @@ export declare const schemaDict: {
4040
4255
  readonly encoding: "application/json";
4041
4256
  readonly schema: {
4042
4257
  readonly type: "object";
4043
- readonly required: ["id", "app", "target", "owner", "reusable", "redeemedAt", "repeat"];
4258
+ readonly required: ["v"];
4044
4259
  readonly properties: {
4045
- readonly id: {
4260
+ readonly v: {
4261
+ readonly type: "integer";
4262
+ readonly const: 1;
4263
+ };
4264
+ readonly status: {
4046
4265
  readonly type: "string";
4266
+ readonly knownValues: ["done", "pending", "deleted", "deleting", "bound", "invalid", "hasRecovery", "indexOff", "alreadyImported", "added", "alreadyYours", "boundElsewhere", "unavailable", "folded", "linked", "none"];
4267
+ 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` / `linked`: fold / link done. `none`: findKey's key is no method of an account the calling PDS hosts.";
4047
4268
  };
4048
- readonly app: {
4269
+ readonly pending: {
4270
+ readonly type: "ref";
4271
+ readonly ref: "lex:pub.techne.draft.identity.defs#pendingChange";
4272
+ };
4273
+ readonly method: {
4049
4274
  readonly type: "string";
4275
+ 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.";
4050
4276
  };
4051
- readonly target: {
4277
+ readonly codes: {
4278
+ readonly type: "array";
4279
+ readonly items: {
4280
+ readonly type: "string";
4281
+ };
4282
+ readonly description: "newRecoveryCodes: the codes, shown once.";
4283
+ };
4284
+ readonly methods: {
4285
+ readonly type: "array";
4286
+ readonly items: {
4287
+ readonly type: "ref";
4288
+ readonly ref: "lex:pub.techne.draft.identity.defs#methodView";
4289
+ };
4290
+ };
4291
+ readonly hasRecovery: {
4292
+ readonly type: "boolean";
4293
+ };
4294
+ readonly notices: {
4295
+ readonly type: "array";
4296
+ readonly items: {
4297
+ readonly type: "ref";
4298
+ readonly ref: "lex:pub.techne.draft.identity.manageMethods#notice";
4299
+ };
4300
+ };
4301
+ readonly count: {
4302
+ readonly type: "integer";
4303
+ readonly description: "noticesSent / dueDeletesDone: how many were confirmed.";
4304
+ };
4305
+ readonly signInMethods: {
4306
+ readonly type: "array";
4307
+ readonly items: {
4308
+ readonly type: "ref";
4309
+ readonly ref: "lex:pub.techne.draft.identity.manageMethods#signInMethod";
4310
+ };
4311
+ readonly description: "signInMethods: the account's methods that can sign in now (not frozen), oldest first.";
4312
+ };
4313
+ readonly to: {
4314
+ readonly type: "ref";
4315
+ readonly ref: "lex:pub.techne.draft.identity.manageMethods#noticeTo";
4316
+ readonly description: "sendTo: where the code goes, in full.";
4317
+ };
4318
+ readonly imported: {
4319
+ readonly type: "array";
4320
+ readonly items: {
4321
+ readonly type: "ref";
4322
+ readonly ref: "lex:pub.techne.draft.identity.manageMethods#importedEmail";
4323
+ };
4324
+ readonly description: "importBackupEmails: each address sent, with what happened to it.";
4325
+ };
4326
+ readonly dueDeletes: {
4327
+ readonly type: "array";
4328
+ readonly items: {
4329
+ readonly type: "ref";
4330
+ readonly ref: "lex:pub.techne.draft.identity.manageMethods#dueDelete";
4331
+ };
4332
+ readonly description: "dueDeletes: accounts to delete on the PDS, oldest first.";
4333
+ };
4334
+ readonly offer: {
4335
+ readonly type: "ref";
4336
+ readonly ref: "lex:pub.techne.draft.identity.finishAddMethod#offer";
4337
+ readonly description: "addChannel `boundElsewhere`: what `did` can do, with `fold` or `link`.";
4338
+ };
4339
+ readonly did: {
4052
4340
  readonly type: "string";
4341
+ readonly format: "did";
4342
+ readonly description: "fold: the kept account. findKey: the account the key signs in to.";
4053
4343
  };
4054
- readonly owner: {
4344
+ readonly emptied: {
4055
4345
  readonly type: "string";
4056
4346
  readonly format: "did";
4347
+ readonly description: "fold: the account folded in and deleted.";
4057
4348
  };
4058
- readonly reusable: {
4349
+ readonly link: {
4350
+ readonly type: "ref";
4351
+ readonly ref: "lex:pub.techne.draft.identity.defs#linkView";
4352
+ readonly description: "link: the link, from `did`'s side.";
4353
+ };
4354
+ readonly frozen: {
4059
4355
  readonly type: "boolean";
4356
+ readonly description: "findKey: the key's method is frozen now and can't sign in.";
4060
4357
  };
4061
- readonly redeemedAt: {
4062
- readonly type: "string";
4063
- readonly format: "datetime";
4358
+ readonly programs: {
4359
+ readonly type: "boolean";
4360
+ readonly description: "findKey: \"Programs can sign in with this key\" is on.";
4064
4361
  };
4065
- readonly repeat: {
4362
+ readonly operator: {
4066
4363
  readonly type: "boolean";
4364
+ readonly description: "operator: whether `did` is one of the platform's operators.";
4067
4365
  };
4068
4366
  };
4069
4367
  };
4070
4368
  };
4071
4369
  readonly errors: [{
4370
+ readonly name: "BadSignature";
4371
+ }, {
4072
4372
  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
4373
  }, {
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\").";
4374
+ readonly name: "UnknownAccount";
4077
4375
  }, {
4078
- readonly name: "OwnLink";
4079
- readonly description: "HTTP 400: the caller made this link.";
4376
+ readonly name: "RateLimitExceeded";
4080
4377
  }, {
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.";
4378
+ readonly name: "Unavailable";
4379
+ readonly description: "Try again (`redeemCode` and `newRecoveryCodes` also while the platform's identity keys are not loaded).";
4083
4380
  }, {
4084
- readonly name: "RateLimitExceeded";
4085
- readonly description: "HTTP 429: too many writes, or too many short codes that named no link, from this DID.";
4381
+ readonly name: "NotFound";
4382
+ readonly description: "No such method or pending change on the account.";
4086
4383
  }, {
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.";
4384
+ readonly name: "NotYourMethod";
4385
+ readonly description: "The step-up names a method that is not the account's.";
4386
+ }, {
4387
+ readonly name: "LastMethod";
4388
+ readonly description: "It would leave no way to sign in.";
4389
+ }, {
4390
+ readonly name: "RecoveryProtected";
4391
+ readonly description: "Only a recovery method can do this to a recovery method.";
4392
+ }, {
4393
+ readonly name: "NeedsRecoveryMethod";
4394
+ readonly description: "Needs a fresh step-up of a recovery method.";
4395
+ }, {
4396
+ readonly name: "StepUpRequired";
4397
+ readonly description: "Needs a fresh step-up (an account's first recovery mark, `newRecoveryCodes`, `fold` and `link` included).";
4398
+ }, {
4399
+ readonly name: "SameMethod";
4400
+ readonly description: "A method cannot freeze itself.";
4401
+ }, {
4402
+ readonly name: "MethodFrozen";
4403
+ 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).";
4404
+ }, {
4405
+ readonly name: "InvalidToken";
4406
+ readonly description: "fold / link: the offer is unknown, used, expired, for the other action, or not made to `did` on this hook.";
4407
+ }, {
4408
+ readonly name: "ProtectedAccount";
4409
+ readonly description: "addChannel / fold / link: 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 or linked (HTTP 409).";
4410
+ }, {
4411
+ readonly name: "NotEmpty";
4412
+ readonly description: "fold: the account to fold gained a record or is 7 days old or more; link instead (HTTP 409).";
4413
+ }, {
4414
+ readonly name: "ProgramRefused";
4415
+ 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.";
4416
+ }, {
4417
+ readonly name: "ProgramsOn";
4418
+ readonly description: "mark: the key has programs on; turn that off first (HTTP 409).";
4419
+ }, {
4420
+ readonly name: "IsRecovery";
4421
+ readonly description: "setPrograms on: the method is a recovery method, or its first mark is waiting (HTTP 409).";
4089
4422
  }];
4090
4423
  };
4091
- };
4424
+ readonly stepUp: {
4425
+ readonly type: "object";
4426
+ readonly description: "What the PDS's step-up proved.";
4427
+ readonly required: ["method", "provedAt"];
4428
+ readonly properties: {
4429
+ readonly method: {
4430
+ readonly type: "ref";
4431
+ readonly ref: "lex:pub.techne.draft.identity.manageMethods#provedMethod";
4432
+ };
4433
+ readonly provedAt: {
4434
+ readonly type: "string";
4435
+ readonly format: "datetime";
4436
+ };
4437
+ };
4438
+ };
4439
+ readonly external: {
4440
+ readonly type: "object";
4441
+ readonly required: ["type", "ref"];
4442
+ readonly properties: {
4443
+ readonly type: {
4444
+ readonly type: "string";
4445
+ readonly knownValues: ["passkey", "nostr"];
4446
+ };
4447
+ readonly ref: {
4448
+ readonly type: "string";
4449
+ readonly maxLength: 512;
4450
+ readonly description: "The passkey credential id, or the Nostr key (hex).";
4451
+ };
4452
+ readonly label: {
4453
+ readonly type: "string";
4454
+ readonly maxLength: 128;
4455
+ };
4456
+ };
4457
+ };
4458
+ readonly notice: {
4459
+ readonly type: "object";
4460
+ readonly required: ["id", "did", "event", "to", "createdAt"];
4461
+ readonly properties: {
4462
+ readonly id: {
4463
+ readonly type: "integer";
4464
+ };
4465
+ readonly did: {
4466
+ readonly type: "string";
4467
+ readonly format: "did";
4468
+ };
4469
+ readonly event: {
4470
+ readonly type: "string";
4471
+ readonly knownValues: ["removeMethod", "deleteAccount", "markRecovery", "freeze", "waitDropped", "programsOn"];
4472
+ readonly description: "What the notice is about: a change that started to wait (`removeMethod`, `deleteAccount`, `markRecovery`), a `freeze`, `waitDropped`: the change in `pending` was not completed because one of the account's methods was frozen during its wait, or `programsOn`: programs can now sign in with one of the account's Nostr keys (`setPrograms` on; no `pending`).";
4473
+ };
4474
+ readonly to: {
4475
+ readonly type: "ref";
4476
+ readonly ref: "lex:pub.techne.draft.identity.manageMethods#noticeTo";
4477
+ };
4478
+ readonly pending: {
4479
+ readonly type: "ref";
4480
+ readonly ref: "lex:pub.techne.draft.identity.defs#pendingChange";
4481
+ };
4482
+ readonly createdAt: {
4483
+ readonly type: "string";
4484
+ readonly format: "datetime";
4485
+ };
4486
+ };
4487
+ };
4488
+ readonly provedMethod: {
4489
+ readonly type: "object";
4490
+ readonly required: ["type"];
4491
+ readonly properties: {
4492
+ readonly type: {
4493
+ readonly type: "string";
4494
+ readonly knownValues: ["email", "phone", "passkey", "nostr", "recoveryCodes"];
4495
+ };
4496
+ readonly value: {
4497
+ readonly type: "string";
4498
+ readonly maxLength: 512;
4499
+ readonly description: "The email or E.164 phone, the passkey credential id, or the Nostr key (hex). None for recoveryCodes.";
4500
+ };
4501
+ };
4502
+ };
4503
+ readonly noticeTo: {
4504
+ readonly type: "object";
4505
+ readonly required: ["type", "value"];
4506
+ readonly properties: {
4507
+ readonly type: {
4508
+ readonly type: "string";
4509
+ readonly knownValues: ["email", "phone", "nostr"];
4510
+ };
4511
+ readonly value: {
4512
+ readonly type: "string";
4513
+ };
4514
+ };
4515
+ };
4516
+ readonly signInMethod: {
4517
+ readonly type: "object";
4518
+ 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.";
4519
+ readonly required: ["id", "type", "display"];
4520
+ readonly properties: {
4521
+ readonly id: {
4522
+ readonly type: "string";
4523
+ readonly description: "The method id (for `sendTo`, and the PDS's own passkey or Nostr challenge).";
4524
+ };
4525
+ readonly type: {
4526
+ readonly type: "string";
4527
+ readonly knownValues: ["email", "phone", "passkey", "nostr"];
4528
+ };
4529
+ readonly display: {
4530
+ readonly type: "string";
4531
+ };
4532
+ };
4533
+ };
4534
+ readonly importedEmail: {
4535
+ readonly type: "object";
4536
+ readonly required: ["email", "status"];
4537
+ readonly properties: {
4538
+ readonly email: {
4539
+ readonly type: "string";
4540
+ };
4541
+ readonly status: {
4542
+ readonly type: "string";
4543
+ readonly knownValues: ["marked", "boundElsewhere", "released", "invalid", "afterCutoff"];
4544
+ 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).";
4545
+ };
4546
+ };
4547
+ readonly description: "One address importBackupEmails was sent, with what happened to it.";
4548
+ };
4549
+ readonly backupEmail: {
4550
+ readonly type: "object";
4551
+ readonly description: "One backup email importBackupEmails moves, with when the PDS verified it.";
4552
+ readonly required: ["email", "verifiedAt"];
4553
+ readonly properties: {
4554
+ readonly email: {
4555
+ readonly type: "string";
4556
+ readonly maxLength: 320;
4557
+ };
4558
+ readonly verifiedAt: {
4559
+ readonly type: "string";
4560
+ readonly format: "datetime";
4561
+ readonly description: "When the PDS verified the address. Only one verified before 2026-11-13T00:00:00Z is imported.";
4562
+ };
4563
+ };
4564
+ };
4565
+ readonly dueDelete: {
4566
+ readonly type: "object";
4567
+ 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.";
4568
+ readonly required: ["did", "deletedAt"];
4569
+ readonly properties: {
4570
+ readonly did: {
4571
+ readonly type: "string";
4572
+ readonly format: "did";
4573
+ };
4574
+ readonly deletedAt: {
4575
+ readonly type: "string";
4576
+ readonly format: "datetime";
4577
+ readonly description: "When the platform deleted its side.";
4578
+ };
4579
+ };
4580
+ };
4581
+ };
4582
+ };
4583
+ readonly PubTechneDraftIdentityOpenAccountPage: {
4584
+ readonly lexicon: 1;
4585
+ readonly id: "pub.techne.draft.identity.openAccountPage";
4586
+ readonly defs: {
4587
+ readonly main: {
4588
+ readonly type: "procedure";
4589
+ 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.";
4590
+ readonly output: {
4591
+ readonly encoding: "application/json";
4592
+ readonly schema: {
4593
+ readonly type: "object";
4594
+ readonly required: ["url", "expiresAt"];
4595
+ readonly properties: {
4596
+ readonly url: {
4597
+ readonly type: "string";
4598
+ readonly format: "uri";
4599
+ readonly maxLength: 2048;
4600
+ readonly description: "Open it once, before expiresAt.";
4601
+ };
4602
+ readonly expiresAt: {
4603
+ readonly type: "string";
4604
+ readonly format: "datetime";
4605
+ };
4606
+ };
4607
+ };
4608
+ };
4609
+ readonly errors: [{
4610
+ readonly name: "AuthenticationRequired";
4611
+ readonly description: "No signed-in caller.";
4612
+ }, {
4613
+ readonly name: "NotAuthorized";
4614
+ 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).";
4615
+ }, {
4616
+ readonly name: "ProgramRefused";
4617
+ readonly description: "The caller is an agent token or a program's token: neither opens the account page (HTTP 403).";
4618
+ }, {
4619
+ readonly name: "NotFound";
4620
+ 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.";
4621
+ }, {
4622
+ readonly name: "RateLimitExceeded";
4623
+ readonly description: "Too many links for this account (HTTP 429).";
4624
+ }, {
4625
+ readonly name: "Unavailable";
4626
+ readonly description: "The PDS did not answer (HTTP 502). Open the account page without a link.";
4627
+ }];
4628
+ };
4629
+ };
4630
+ };
4631
+ readonly PubTechneDraftIdentityRedeemLinkToken: {
4632
+ readonly lexicon: 1;
4633
+ readonly id: "pub.techne.draft.identity.redeemLinkToken";
4634
+ readonly defs: {
4635
+ readonly main: {
4636
+ readonly type: "procedure";
4637
+ 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.";
4638
+ readonly input: {
4639
+ readonly encoding: "application/json";
4640
+ readonly schema: {
4641
+ readonly type: "object";
4642
+ readonly required: ["token"];
4643
+ readonly properties: {
4644
+ readonly token: {
4645
+ readonly type: "string";
4646
+ readonly maxLength: 512;
4647
+ };
4648
+ };
4649
+ };
4650
+ };
4651
+ readonly output: {
4652
+ readonly encoding: "application/json";
4653
+ readonly schema: {
4654
+ readonly type: "object";
4655
+ readonly required: ["id", "app", "target", "owner", "reusable", "redeemedAt", "repeat"];
4656
+ readonly properties: {
4657
+ readonly id: {
4658
+ readonly type: "string";
4659
+ };
4660
+ readonly app: {
4661
+ readonly type: "string";
4662
+ };
4663
+ readonly target: {
4664
+ readonly type: "string";
4665
+ };
4666
+ readonly owner: {
4667
+ readonly type: "string";
4668
+ readonly format: "did";
4669
+ };
4670
+ readonly reusable: {
4671
+ readonly type: "boolean";
4672
+ };
4673
+ readonly redeemedAt: {
4674
+ readonly type: "string";
4675
+ readonly format: "datetime";
4676
+ };
4677
+ readonly repeat: {
4678
+ readonly type: "boolean";
4679
+ };
4680
+ };
4681
+ };
4682
+ };
4683
+ readonly errors: [{
4684
+ readonly name: "InvalidRequest";
4685
+ 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.";
4686
+ }, {
4687
+ readonly name: "LinkNotUsable";
4688
+ readonly description: "HTTP 400: the link is unknown, revoked, expired or already used by another account (\"this link no longer works\").";
4689
+ }, {
4690
+ readonly name: "OwnLink";
4691
+ readonly description: "HTTP 400: the caller made this link.";
4692
+ }, {
4693
+ readonly name: "NotSupported";
4694
+ 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.";
4695
+ }, {
4696
+ readonly name: "RateLimitExceeded";
4697
+ readonly description: "HTTP 429: too many writes, or too many short codes that named no link, from this DID.";
4698
+ }, {
4699
+ readonly name: "UpstreamFailure";
4700
+ 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.";
4701
+ }];
4702
+ };
4703
+ };
4092
4704
  };
4093
4705
  readonly PubTechneDraftIdentityReleasePhoneHold: {
4094
4706
  readonly lexicon: 1;
@@ -4258,6 +4870,15 @@ export declare const schemaDict: {
4258
4870
  readonly format: "did";
4259
4871
  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
4872
  };
4873
+ readonly frozen: {
4874
+ readonly type: "boolean";
4875
+ 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.";
4876
+ };
4877
+ readonly frozenUntil: {
4878
+ readonly type: "string";
4879
+ readonly format: "datetime";
4880
+ readonly description: "Present only with `frozen`: when the freeze ends, unless a recovery method lifts it sooner.";
4881
+ };
4261
4882
  readonly releaseId: {
4262
4883
  readonly type: "string";
4263
4884
  readonly minLength: 1;
@@ -4377,7 +4998,7 @@ export declare const schemaDict: {
4377
4998
  readonly defs: {
4378
4999
  readonly main: {
4379
5000
  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.";
5001
+ 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 notice to every method and any of them 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
5002
  readonly input: {
4382
5003
  readonly encoding: "application/json";
4383
5004
  readonly schema: {
@@ -4400,6 +5021,14 @@ export declare const schemaDict: {
4400
5021
  readonly ok: {
4401
5022
  readonly type: "boolean";
4402
5023
  };
5024
+ readonly status: {
5025
+ readonly type: "string";
5026
+ readonly knownValues: ["pending"];
5027
+ };
5028
+ readonly pending: {
5029
+ readonly type: "ref";
5030
+ readonly ref: "lex:pub.techne.draft.identity.defs#pendingChange";
5031
+ };
4403
5032
  };
4404
5033
  };
4405
5034
  };
@@ -4411,7 +5040,10 @@ export declare const schemaDict: {
4411
5040
  readonly description: "No such method on the caller's account.";
4412
5041
  }, {
4413
5042
  readonly name: "LastMethod";
4414
- readonly description: "It is the account's only sign-in method.";
5043
+ readonly description: "It is the account's only sign-in method (counting those already waiting to be removed).";
5044
+ }, {
5045
+ readonly name: "RecoveryProtected";
5046
+ readonly description: "It is a recovery method; only a recovery method removes it (identity.manageMethods).";
4415
5047
  }];
4416
5048
  };
4417
5049
  };
@@ -5425,11 +6057,11 @@ export declare const schemaDict: {
5425
6057
  readonly PubTechneDraftPermissionedPutRecords: {
5426
6058
  readonly lexicon: 1;
5427
6059
  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.";
6060
+ 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
6061
  readonly defs: {
5430
6062
  readonly main: {
5431
6063
  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.";
6064
+ 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
6065
  readonly input: {
5434
6066
  readonly encoding: "application/json";
5435
6067
  readonly schema: {
@@ -5480,7 +6112,7 @@ export declare const schemaDict: {
5480
6112
  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
6113
  }, {
5482
6114
  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.";
6115
+ 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
6116
  }, {
5485
6117
  readonly name: "AccountDeleting";
5486
6118
  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 +6195,8 @@ export declare const schemaDict: {
5563
6195
  readonly properties: {
5564
6196
  readonly error: {
5565
6197
  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"];
6198
+ 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).";
6199
+ readonly knownValues: ["InvalidRequest", "InvalidSwap", "Conflict", "IdentityConflict", "DuplicatePhone", "RateLimitExceeded", "Forbidden"];
5568
6200
  };
5569
6201
  readonly message: {
5570
6202
  readonly type: "string";
@@ -7234,7 +7866,7 @@ export declare const schemaDict: {
7234
7866
  readonly defs: {
7235
7867
  readonly main: {
7236
7868
  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.";
7869
+ 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
7870
  readonly input: {
7239
7871
  readonly encoding: "application/json";
7240
7872
  readonly schema: {
@@ -7291,11 +7923,17 @@ export declare const schemaDict: {
7291
7923
  readonly name: "AuthenticationRequired";
7292
7924
  readonly description: "Blocking is a signed-in act.";
7293
7925
  }, {
7294
- readonly name: "Forbidden";
7295
- readonly description: "The caller is not an operator of this platform.";
7926
+ readonly name: "NotAuthorized";
7927
+ readonly description: "The caller is not an operator of this platform, or the call does not carry the moderate scope (HTTP 403).";
7928
+ }, {
7929
+ readonly name: "ProgramRefused";
7930
+ readonly description: "The caller is a program's token: a program never reaches an operator method (HTTP 403).";
7296
7931
  }, {
7297
7932
  readonly name: "UnknownType";
7298
7933
  readonly description: "`nsid` names no community or requested type (our own types are not limited).";
7934
+ }, {
7935
+ readonly name: "InvalidRequest";
7936
+ readonly description: "`reason` is blank or over 1000 characters, or `author` is not a DID (HTTP 400).";
7299
7937
  }];
7300
7938
  };
7301
7939
  };
@@ -7884,7 +8522,7 @@ export declare const schemaDict: {
7884
8522
  readonly defs: {
7885
8523
  readonly main: {
7886
8524
  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.";
8525
+ 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
8526
  readonly input: {
7889
8527
  readonly encoding: "application/json";
7890
8528
  readonly schema: {
@@ -7932,11 +8570,17 @@ export declare const schemaDict: {
7932
8570
  readonly name: "AuthenticationRequired";
7933
8571
  readonly description: "Purging is a signed-in act.";
7934
8572
  }, {
7935
- readonly name: "Forbidden";
7936
- readonly description: "The caller is not an operator of this platform.";
8573
+ readonly name: "NotAuthorized";
8574
+ readonly description: "The caller is not an operator of this platform, or the call does not carry the moderate scope (HTTP 403).";
8575
+ }, {
8576
+ readonly name: "ProgramRefused";
8577
+ readonly description: "The caller is a program's token: a program never reaches an operator method (HTTP 403).";
7937
8578
  }, {
7938
8579
  readonly name: "UnknownType";
7939
8580
  readonly description: "`nsid` names no community or requested type (our own types cannot be purged).";
8581
+ }, {
8582
+ readonly name: "InvalidRequest";
8583
+ readonly description: "`reason` is blank or over 1000 characters (HTTP 400).";
7940
8584
  }];
7941
8585
  };
7942
8586
  };
@@ -11766,7 +12410,7 @@ export declare const schemas: ({
11766
12410
  readonly defs: {
11767
12411
  readonly main: {
11768
12412
  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.";
12413
+ 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
12414
  readonly input: {
11771
12415
  readonly encoding: "application/json";
11772
12416
  readonly schema: {
@@ -11814,7 +12458,10 @@ export declare const schemas: ({
11814
12458
  readonly description: "No signed-in caller.";
11815
12459
  }, {
11816
12460
  readonly name: "NotAuthorized";
11817
- readonly description: "The caller is not an operator.";
12461
+ readonly description: "The caller is not an operator, or the call does not carry the moderate scope (HTTP 403).";
12462
+ }, {
12463
+ readonly name: "ProgramRefused";
12464
+ readonly description: "The caller is a program's token: a program never reaches an operator method (HTTP 403).";
11818
12465
  }, {
11819
12466
  readonly name: "InvalidRequest";
11820
12467
  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.";
@@ -12806,7 +13453,7 @@ export declare const schemas: ({
12806
13453
  readonly defs: {
12807
13454
  readonly main: {
12808
13455
  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).";
13456
+ 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
13457
  readonly input: {
12811
13458
  readonly encoding: "application/json";
12812
13459
  readonly schema: {
@@ -12873,6 +13520,9 @@ export declare const schemas: ({
12873
13520
  }, {
12874
13521
  readonly name: "ChannelReleased";
12875
13522
  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).";
13523
+ }, {
13524
+ readonly name: "MethodFrozen";
13525
+ 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
13526
  }, {
12877
13527
  readonly name: "RateLimitExceeded";
12878
13528
  readonly description: "As identity.resolve (HTTP 429).";
@@ -12926,6 +13576,9 @@ export declare const schemas: ({
12926
13576
  }, {
12927
13577
  readonly name: "RateLimitExceeded";
12928
13578
  readonly description: "Too many codes sent to this address (HTTP 429).";
13579
+ }, {
13580
+ readonly name: "MethodFrozen";
13581
+ 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
13582
  }, {
12930
13583
  readonly name: "SendFailed";
12931
13584
  readonly description: "The code could not be texted to that phone number (HTTP 502). Try again.";
@@ -12934,18 +13587,59 @@ export declare const schemas: ({
12934
13587
  };
12935
13588
  } | {
12936
13589
  readonly lexicon: 1;
12937
- readonly id: "pub.techne.draft.identity.checkLinkToken";
13590
+ readonly id: "pub.techne.draft.identity.cancelPendingChange";
12938
13591
  readonly defs: {
12939
13592
  readonly main: {
12940
13593
  readonly type: "procedure";
12941
- readonly description: "Whether a link token still redeems, without signing in. A live one answers what it is for; a dead or unknown one answers only `live: false`, saying nothing of who made it or what it was for. Rate limited per IP by the platform. A live token shows its owner and target to whoever holds it: an app should give a link a target that reveals no more than the link itself should.";
13594
+ 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.";
12942
13595
  readonly input: {
12943
13596
  readonly encoding: "application/json";
12944
13597
  readonly schema: {
12945
13598
  readonly type: "object";
12946
- readonly required: ["token"];
13599
+ readonly required: ["id"];
12947
13600
  readonly properties: {
12948
- readonly token: {
13601
+ readonly id: {
13602
+ readonly type: "string";
13603
+ readonly maxLength: 64;
13604
+ };
13605
+ };
13606
+ };
13607
+ };
13608
+ readonly output: {
13609
+ readonly encoding: "application/json";
13610
+ readonly schema: {
13611
+ readonly type: "object";
13612
+ readonly required: ["ok"];
13613
+ readonly properties: {
13614
+ readonly ok: {
13615
+ readonly type: "boolean";
13616
+ };
13617
+ };
13618
+ };
13619
+ };
13620
+ readonly errors: [{
13621
+ readonly name: "AuthenticationRequired";
13622
+ readonly description: "No signed-in caller.";
13623
+ }, {
13624
+ readonly name: "NotFound";
13625
+ readonly description: "No such pending change on the caller's account, or it already completed or was cancelled.";
13626
+ }];
13627
+ };
13628
+ };
13629
+ } | {
13630
+ readonly lexicon: 1;
13631
+ readonly id: "pub.techne.draft.identity.checkLinkToken";
13632
+ readonly defs: {
13633
+ readonly main: {
13634
+ readonly type: "procedure";
13635
+ readonly description: "Whether a link token still redeems, without signing in. A live one answers what it is for; a dead or unknown one answers only `live: false`, saying nothing of who made it or what it was for. Rate limited per IP by the platform. A live token shows its owner and target to whoever holds it: an app should give a link a target that reveals no more than the link itself should.";
13636
+ readonly input: {
13637
+ readonly encoding: "application/json";
13638
+ readonly schema: {
13639
+ readonly type: "object";
13640
+ readonly required: ["token"];
13641
+ readonly properties: {
13642
+ readonly token: {
12949
13643
  readonly type: "string";
12950
13644
  readonly minLength: 1;
12951
13645
  readonly maxLength: 512;
@@ -13045,7 +13739,7 @@ export declare const schemas: ({
13045
13739
  readonly defs: {
13046
13740
  readonly main: {
13047
13741
  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.";
13742
+ 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
13743
  readonly input: {
13050
13744
  readonly encoding: "application/json";
13051
13745
  readonly schema: {
@@ -13135,27 +13829,68 @@ export declare const schemas: ({
13135
13829
  };
13136
13830
  readonly methodView: {
13137
13831
  readonly type: "object";
13138
- readonly description: "One sign-in method bound to the caller's account, masked.";
13832
+ readonly description: "One sign-in method of the caller's account, masked.";
13139
13833
  readonly required: ["bid", "type", "masked", "boundAt"];
13140
13834
  readonly properties: {
13141
13835
  readonly bid: {
13142
13836
  readonly type: "string";
13143
13837
  readonly maxLength: 64;
13144
- readonly description: "The binding id (the credential's record key). Names the method in unlinkMethod.";
13838
+ 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
13839
  };
13146
13840
  readonly type: {
13147
13841
  readonly type: "string";
13148
- readonly knownValues: ["email", "phone"];
13842
+ readonly knownValues: ["email", "phone", "passkey", "nostr", "recoveryCodes"];
13149
13843
  };
13150
13844
  readonly masked: {
13151
13845
  readonly type: "string";
13152
13846
  readonly maxLength: 320;
13153
- readonly description: "The channel with most of it hidden, e.g. `j•••@example.com`, `+1 ••• ••• 4567`.";
13847
+ 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)`.";
13154
13848
  };
13155
13849
  readonly boundAt: {
13156
13850
  readonly type: "string";
13157
13851
  readonly format: "datetime";
13158
13852
  };
13853
+ readonly recovery: {
13854
+ readonly type: "boolean";
13855
+ readonly description: "A recovery method of this account. Private: only the account sees it.";
13856
+ };
13857
+ readonly frozenUntil: {
13858
+ readonly type: "string";
13859
+ readonly format: "datetime";
13860
+ readonly description: "Frozen: it signs in nowhere until then, or until a recovery method lifts it.";
13861
+ };
13862
+ readonly programs: {
13863
+ readonly type: "boolean";
13864
+ 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.";
13865
+ };
13866
+ };
13867
+ };
13868
+ readonly pendingChange: {
13869
+ readonly type: "object";
13870
+ readonly description: "A change that waits for its time (a method's removal or the account's deletion, 7 days; the account's first recovery mark, 24 hours). 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 (and not lifted early by a recovery method) is dropped when it runs out, not completed.";
13871
+ readonly required: ["id", "kind", "createdAt", "dueAt"];
13872
+ readonly properties: {
13873
+ readonly id: {
13874
+ readonly type: "string";
13875
+ readonly maxLength: 64;
13876
+ };
13877
+ readonly kind: {
13878
+ readonly type: "string";
13879
+ readonly knownValues: ["removeMethod", "deleteAccount", "markRecovery"];
13880
+ };
13881
+ readonly method: {
13882
+ readonly type: "string";
13883
+ readonly maxLength: 64;
13884
+ readonly description: "The method it removes or marks.";
13885
+ };
13886
+ readonly createdAt: {
13887
+ readonly type: "string";
13888
+ readonly format: "datetime";
13889
+ };
13890
+ readonly dueAt: {
13891
+ readonly type: "string";
13892
+ readonly format: "datetime";
13893
+ };
13159
13894
  };
13160
13895
  };
13161
13896
  readonly linkView: {
@@ -13316,6 +14051,12 @@ export declare const schemas: ({
13316
14051
  }, {
13317
14052
  readonly name: "RateLimitExceeded";
13318
14053
  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.";
14054
+ }, {
14055
+ readonly name: "MethodFrozen";
14056
+ 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).";
14057
+ }, {
14058
+ readonly name: "ProtectedAccount";
14059
+ 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.";
13319
14060
  }, {
13320
14061
  readonly name: "UpstreamFailure";
13321
14062
  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.";
@@ -13403,6 +14144,9 @@ export declare const schemas: ({
13403
14144
  }, {
13404
14145
  readonly name: "InvalidToken";
13405
14146
  readonly description: "The token is unknown, used, expired, or was issued to another session.";
14147
+ }, {
14148
+ readonly name: "ProtectedAccount";
14149
+ 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
14150
  }, {
13407
14151
  readonly name: "NotEmpty";
13408
14152
  readonly description: "The account to fold gained a record or is 7 days old or more; link instead.";
@@ -13415,7 +14159,7 @@ export declare const schemas: ({
13415
14159
  readonly defs: {
13416
14160
  readonly main: {
13417
14161
  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.";
14162
+ 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
14163
  readonly input: {
13420
14164
  readonly encoding: "application/json";
13421
14165
  readonly schema: {
@@ -13486,7 +14230,7 @@ export declare const schemas: ({
13486
14230
  };
13487
14231
  readonly record: {
13488
14232
  readonly type: "unknown";
13489
- readonly description: "The record, with the \"$subject\" (and optionally \"$now\") slots as string values.";
14233
+ readonly description: "The record, with the \"$subject\" (and optionally \"$now\" and \"$name\") slots as string values.";
13490
14234
  };
13491
14235
  };
13492
14236
  };
@@ -13535,6 +14279,9 @@ export declare const schemas: ({
13535
14279
  }, {
13536
14280
  readonly name: "InvalidToken";
13537
14281
  readonly description: "The token is unknown, used, expired, or was issued to another session.";
14282
+ }, {
14283
+ readonly name: "ProtectedAccount";
14284
+ 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
14285
  }, {
13539
14286
  readonly name: "InvalidRequest";
13540
14287
  readonly description: "`primary` names neither account, or the other account's keys are not held here (sign in to it and link from there).";
@@ -13778,7 +14525,16 @@ export declare const schemas: ({
13778
14525
  readonly defs: {
13779
14526
  readonly main: {
13780
14527
  readonly type: "query";
13781
- readonly description: "The caller's sign-in methods (masked) and the account's alias links. Signed-in members only.";
14528
+ readonly description: "The caller's sign-in methods (masked, with their recovery mark and freeze), its pending changes, and the account's alias links. Emails and phones only unless `allTypes` (shipped clients label every row as an email). Signed-in members only.";
14529
+ readonly parameters: {
14530
+ readonly type: "params";
14531
+ readonly properties: {
14532
+ readonly allTypes: {
14533
+ readonly type: "boolean";
14534
+ readonly description: "Also list passkeys, Nostr keys and the recovery-code set.";
14535
+ };
14536
+ };
14537
+ };
13782
14538
  readonly output: {
13783
14539
  readonly encoding: "application/json";
13784
14540
  readonly schema: {
@@ -13789,118 +14545,615 @@ export declare const schemas: ({
13789
14545
  readonly type: "array";
13790
14546
  readonly items: {
13791
14547
  readonly type: "ref";
13792
- readonly ref: "lex:pub.techne.draft.identity.defs#methodView";
14548
+ readonly ref: "lex:pub.techne.draft.identity.defs#methodView";
14549
+ };
14550
+ };
14551
+ readonly links: {
14552
+ readonly type: "array";
14553
+ readonly items: {
14554
+ readonly type: "ref";
14555
+ readonly ref: "lex:pub.techne.draft.identity.defs#linkView";
14556
+ };
14557
+ };
14558
+ readonly pending: {
14559
+ readonly type: "array";
14560
+ readonly description: "The account's pending changes, soonest first (the account page shows them at the top, with Cancel).";
14561
+ readonly items: {
14562
+ readonly type: "ref";
14563
+ readonly ref: "lex:pub.techne.draft.identity.defs#pendingChange";
14564
+ };
14565
+ };
14566
+ };
14567
+ };
14568
+ };
14569
+ readonly errors: [{
14570
+ readonly name: "AuthenticationRequired";
14571
+ readonly description: "No signed-in caller.";
14572
+ }];
14573
+ };
14574
+ };
14575
+ } | {
14576
+ readonly lexicon: 1;
14577
+ readonly id: "pub.techne.draft.identity.listPhoneHolds";
14578
+ readonly defs: {
14579
+ readonly main: {
14580
+ readonly type: "query";
14581
+ readonly description: "The live holds (identity.holdForPhone) that would write as `actAs`, oldest first, for anyone who may write as it, and of those only the holds for a space the caller may read. With `alsoActAs`, the holds of each of those accounts too, in the order first asked (an account asked twice is listed once) (so a client lists every circle's pending members in one call): an account among them the caller may not write as is passed over, and writing as none of them is 403. A hold shows the account it writes as, who asked and the template as written, never the number or its hash (Beacon's circle template carries `addedBy`, so a circle shows \"1 pending, added by <member>\"). A hold the caller asked for also carries `name`, the name the caller saved for the number in their own contacts, when they did. Holds are identity state, not records, so they are listed here and not through the generic query.";
14582
+ readonly parameters: {
14583
+ readonly type: "params";
14584
+ readonly required: ["actAs"];
14585
+ readonly properties: {
14586
+ readonly actAs: {
14587
+ readonly type: "string";
14588
+ readonly format: "did";
14589
+ };
14590
+ readonly alsoActAs: {
14591
+ readonly type: "array";
14592
+ readonly maxLength: 99;
14593
+ readonly description: "More accounts whose holds to list in the same call, after `actAs` (repeat the parameter).";
14594
+ readonly items: {
14595
+ readonly type: "string";
14596
+ readonly format: "did";
14597
+ };
14598
+ };
14599
+ };
14600
+ };
14601
+ readonly output: {
14602
+ readonly encoding: "application/json";
14603
+ readonly schema: {
14604
+ readonly type: "object";
14605
+ readonly required: ["holds"];
14606
+ readonly properties: {
14607
+ readonly holds: {
14608
+ readonly type: "array";
14609
+ readonly items: {
14610
+ readonly type: "ref";
14611
+ readonly ref: "lex:pub.techne.draft.identity.listPhoneHolds#holdView";
14612
+ };
14613
+ };
14614
+ };
14615
+ };
14616
+ };
14617
+ readonly errors: [{
14618
+ readonly name: "InvalidRequest";
14619
+ readonly description: "HTTP 400: `actAs` or one of `alsoActAs` is not a DID, or more than 99 `alsoActAs`.";
14620
+ }, {
14621
+ readonly name: "Forbidden";
14622
+ readonly description: "HTTP 403: the caller may not write as `actAs` (with `alsoActAs`: as any of them).";
14623
+ }];
14624
+ };
14625
+ readonly holdView: {
14626
+ readonly type: "object";
14627
+ readonly required: ["id", "askedBy", "collection", "record", "createdAt"];
14628
+ readonly properties: {
14629
+ readonly id: {
14630
+ readonly type: "string";
14631
+ };
14632
+ readonly actAs: {
14633
+ readonly type: "string";
14634
+ readonly format: "did";
14635
+ readonly description: "The account the hold would write as.";
14636
+ };
14637
+ readonly askedBy: {
14638
+ readonly type: "string";
14639
+ readonly format: "did";
14640
+ };
14641
+ readonly app: {
14642
+ readonly type: "string";
14643
+ };
14644
+ readonly collection: {
14645
+ readonly type: "string";
14646
+ readonly format: "nsid";
14647
+ };
14648
+ readonly rkey: {
14649
+ readonly type: "string";
14650
+ readonly description: "The record key template.";
14651
+ };
14652
+ readonly space: {
14653
+ readonly type: "string";
14654
+ };
14655
+ readonly record: {
14656
+ readonly type: "unknown";
14657
+ readonly description: "The record template, slots unfilled.";
14658
+ };
14659
+ readonly createdAt: {
14660
+ readonly type: "string";
14661
+ readonly format: "datetime";
14662
+ };
14663
+ readonly name: {
14664
+ readonly type: "string";
14665
+ 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.";
14666
+ };
14667
+ };
14668
+ };
14669
+ };
14670
+ } | {
14671
+ readonly lexicon: 1;
14672
+ readonly id: "pub.techne.draft.identity.manageMethods";
14673
+ readonly defs: {
14674
+ readonly main: {
14675
+ readonly type: "procedure";
14676
+ 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 notice to every method, cancellable by any of them, 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 notice. Ops: `list` (methods, pending changes, `hasRecovery`), `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` with an `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), ProtectedAccount when either account has a recovery mark, a freeze, a pending change, or a passkey, Nostr key or recovery codes), `fold` and `link` (take that offer: `token`, and for `link` the `primary`; need 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`), or `linked` with `link`), `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), for the notice queue (no `did`; only the accounts the calling PDS hosts; the platform emails those of accounts hosted elsewhere itself) `notices` (up to 100 to deliver; one taken and not confirmed is offered again after 5 minutes, at most 10 times) and `noticesSent`, 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.";
14677
+ readonly input: {
14678
+ readonly encoding: "application/json";
14679
+ readonly schema: {
14680
+ readonly type: "object";
14681
+ readonly required: ["v", "op"];
14682
+ readonly properties: {
14683
+ readonly v: {
14684
+ readonly type: "integer";
14685
+ readonly const: 1;
14686
+ };
14687
+ readonly op: {
14688
+ readonly type: "string";
14689
+ 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", "operator"];
14690
+ };
14691
+ readonly did: {
14692
+ readonly type: "string";
14693
+ readonly format: "did";
14694
+ readonly description: "The signed-in account. Required for every op but `notices`, `noticesSent`, `dueDeletes` and `dueDeletesDone`.";
14695
+ };
14696
+ readonly stepUp: {
14697
+ readonly type: "ref";
14698
+ readonly ref: "lex:pub.techne.draft.identity.manageMethods#stepUp";
14699
+ };
14700
+ readonly method: {
14701
+ readonly type: "string";
14702
+ readonly maxLength: 64;
14703
+ readonly description: "The method acted on (its `id` in `list` or `signInMethods`).";
14704
+ };
14705
+ readonly pending: {
14706
+ readonly type: "string";
14707
+ readonly maxLength: 64;
14708
+ readonly description: "The pending change `cancel` cancels.";
14709
+ };
14710
+ readonly signOut: {
14711
+ readonly type: "boolean";
14712
+ readonly description: "With `freeze`: also sign out everywhere.";
14713
+ };
14714
+ readonly external: {
14715
+ readonly type: "ref";
14716
+ readonly ref: "lex:pub.techne.draft.identity.manageMethods#external";
14717
+ };
14718
+ readonly code: {
14719
+ readonly type: "string";
14720
+ readonly maxLength: 64;
14721
+ readonly description: "A recovery code, for `redeemCode`.";
14722
+ };
14723
+ readonly ids: {
14724
+ readonly type: "array";
14725
+ readonly maxLength: 100;
14726
+ readonly items: {
14727
+ readonly type: "integer";
14728
+ };
14729
+ readonly description: "Notice ids, for `noticesSent`.";
14730
+ };
14731
+ readonly emails: {
14732
+ readonly type: "array";
14733
+ readonly maxLength: 10;
14734
+ readonly items: {
14735
+ readonly type: "string";
14736
+ readonly maxLength: 320;
14737
+ };
14738
+ readonly description: "Retired, not read: a bare list has no verification dates, so the cutoff can't hold. importBackupEmails without `backupEmails` is 400 InvalidRequest.";
14739
+ };
14740
+ readonly backupEmails: {
14741
+ readonly type: "array";
14742
+ readonly maxLength: 10;
14743
+ readonly items: {
14744
+ readonly type: "ref";
14745
+ readonly ref: "lex:pub.techne.draft.identity.manageMethods#backupEmail";
14746
+ };
14747
+ readonly description: "importBackupEmails: the account's verified backup email addresses, all of them, each with when the PDS verified it.";
14748
+ };
14749
+ readonly dids: {
14750
+ readonly type: "array";
14751
+ readonly maxLength: 100;
14752
+ readonly items: {
14753
+ readonly type: "string";
14754
+ readonly format: "did";
14755
+ };
14756
+ readonly description: "dueDeletesDone: the accounts whose PDS account was deleted.";
14757
+ };
14758
+ readonly channel: {
14759
+ readonly type: "ref";
14760
+ readonly ref: "lex:pub.techne.draft.identity.defs#channel";
14761
+ readonly description: "addChannel: the email or phone the PDS just proved (a code it sent and checked).";
14762
+ };
14763
+ readonly token: {
14764
+ readonly type: "string";
14765
+ readonly maxLength: 128;
14766
+ readonly description: "fold / link: the offer's token from addChannel.";
14767
+ };
14768
+ readonly primary: {
14769
+ readonly type: "string";
14770
+ readonly format: "did";
14771
+ readonly description: "link: which of the two accounts is the primary.";
14772
+ };
14773
+ readonly on: {
14774
+ readonly type: "boolean";
14775
+ readonly description: "setPrograms: on or off.";
14776
+ };
14777
+ readonly program: {
14778
+ readonly type: "boolean";
14779
+ readonly description: "A program made this request: a session or token the PDS's programmatic sign-in opened. Account security is refused (ProgramRefused).";
14780
+ };
14781
+ };
14782
+ };
14783
+ };
14784
+ readonly output: {
14785
+ readonly encoding: "application/json";
14786
+ readonly schema: {
14787
+ readonly type: "object";
14788
+ readonly required: ["v"];
14789
+ readonly properties: {
14790
+ readonly v: {
14791
+ readonly type: "integer";
14792
+ readonly const: 1;
14793
+ };
14794
+ readonly status: {
14795
+ readonly type: "string";
14796
+ readonly knownValues: ["done", "pending", "deleted", "deleting", "bound", "invalid", "hasRecovery", "indexOff", "alreadyImported", "added", "alreadyYours", "boundElsewhere", "unavailable", "folded", "linked", "none"];
14797
+ 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` / `linked`: fold / link done. `none`: findKey's key is no method of an account the calling PDS hosts.";
14798
+ };
14799
+ readonly pending: {
14800
+ readonly type: "ref";
14801
+ readonly ref: "lex:pub.techne.draft.identity.defs#pendingChange";
14802
+ };
14803
+ readonly method: {
14804
+ readonly type: "string";
14805
+ 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.";
14806
+ };
14807
+ readonly codes: {
14808
+ readonly type: "array";
14809
+ readonly items: {
14810
+ readonly type: "string";
14811
+ };
14812
+ readonly description: "newRecoveryCodes: the codes, shown once.";
14813
+ };
14814
+ readonly methods: {
14815
+ readonly type: "array";
14816
+ readonly items: {
14817
+ readonly type: "ref";
14818
+ readonly ref: "lex:pub.techne.draft.identity.defs#methodView";
14819
+ };
14820
+ };
14821
+ readonly hasRecovery: {
14822
+ readonly type: "boolean";
14823
+ };
14824
+ readonly notices: {
14825
+ readonly type: "array";
14826
+ readonly items: {
14827
+ readonly type: "ref";
14828
+ readonly ref: "lex:pub.techne.draft.identity.manageMethods#notice";
14829
+ };
14830
+ };
14831
+ readonly count: {
14832
+ readonly type: "integer";
14833
+ readonly description: "noticesSent / dueDeletesDone: how many were confirmed.";
14834
+ };
14835
+ readonly signInMethods: {
14836
+ readonly type: "array";
14837
+ readonly items: {
14838
+ readonly type: "ref";
14839
+ readonly ref: "lex:pub.techne.draft.identity.manageMethods#signInMethod";
14840
+ };
14841
+ readonly description: "signInMethods: the account's methods that can sign in now (not frozen), oldest first.";
14842
+ };
14843
+ readonly to: {
14844
+ readonly type: "ref";
14845
+ readonly ref: "lex:pub.techne.draft.identity.manageMethods#noticeTo";
14846
+ readonly description: "sendTo: where the code goes, in full.";
14847
+ };
14848
+ readonly imported: {
14849
+ readonly type: "array";
14850
+ readonly items: {
14851
+ readonly type: "ref";
14852
+ readonly ref: "lex:pub.techne.draft.identity.manageMethods#importedEmail";
13793
14853
  };
14854
+ readonly description: "importBackupEmails: each address sent, with what happened to it.";
13794
14855
  };
13795
- readonly links: {
14856
+ readonly dueDeletes: {
13796
14857
  readonly type: "array";
13797
14858
  readonly items: {
13798
14859
  readonly type: "ref";
13799
- readonly ref: "lex:pub.techne.draft.identity.defs#linkView";
14860
+ readonly ref: "lex:pub.techne.draft.identity.manageMethods#dueDelete";
13800
14861
  };
14862
+ readonly description: "dueDeletes: accounts to delete on the PDS, oldest first.";
13801
14863
  };
13802
- };
13803
- };
13804
- };
13805
- readonly errors: [{
13806
- readonly name: "AuthenticationRequired";
13807
- readonly description: "No signed-in caller.";
13808
- }];
13809
- };
13810
- };
13811
- } | {
13812
- readonly lexicon: 1;
13813
- readonly id: "pub.techne.draft.identity.listPhoneHolds";
13814
- readonly defs: {
13815
- readonly main: {
13816
- readonly type: "query";
13817
- readonly description: "The live holds (identity.holdForPhone) that would write as `actAs`, oldest first, for anyone who may write as it, and of those only the holds for a space the caller may read. With `alsoActAs`, the holds of each of those accounts too, in the order first asked (an account asked twice is listed once) (so a client lists every circle's pending members in one call): an account among them the caller may not write as is passed over, and writing as none of them is 403. A hold shows the account it writes as, who asked and the template as written, never the number or its hash (Beacon's circle template carries `addedBy`, so a circle shows \"1 pending, added by <member>\"). A hold the caller asked for also carries `name`, the name the caller saved for the number in their own contacts, when they did. Holds are identity state, not records, so they are listed here and not through the generic query.";
13818
- readonly parameters: {
13819
- readonly type: "params";
13820
- readonly required: ["actAs"];
13821
- readonly properties: {
13822
- readonly actAs: {
13823
- readonly type: "string";
13824
- readonly format: "did";
13825
- };
13826
- readonly alsoActAs: {
13827
- readonly type: "array";
13828
- readonly maxLength: 99;
13829
- readonly description: "More accounts whose holds to list in the same call, after `actAs` (repeat the parameter).";
13830
- readonly items: {
14864
+ readonly offer: {
14865
+ readonly type: "ref";
14866
+ readonly ref: "lex:pub.techne.draft.identity.finishAddMethod#offer";
14867
+ readonly description: "addChannel `boundElsewhere`: what `did` can do, with `fold` or `link`.";
14868
+ };
14869
+ readonly did: {
13831
14870
  readonly type: "string";
13832
14871
  readonly format: "did";
14872
+ readonly description: "fold: the kept account. findKey: the account the key signs in to.";
13833
14873
  };
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: {
13844
- readonly type: "array";
13845
- readonly items: {
13846
- readonly type: "ref";
13847
- readonly ref: "lex:pub.techne.draft.identity.listPhoneHolds#holdView";
13848
- };
14874
+ readonly emptied: {
14875
+ readonly type: "string";
14876
+ readonly format: "did";
14877
+ readonly description: "fold: the account folded in and deleted.";
14878
+ };
14879
+ readonly link: {
14880
+ readonly type: "ref";
14881
+ readonly ref: "lex:pub.techne.draft.identity.defs#linkView";
14882
+ readonly description: "link: the link, from `did`'s side.";
14883
+ };
14884
+ readonly frozen: {
14885
+ readonly type: "boolean";
14886
+ readonly description: "findKey: the key's method is frozen now and can't sign in.";
14887
+ };
14888
+ readonly programs: {
14889
+ readonly type: "boolean";
14890
+ readonly description: "findKey: \"Programs can sign in with this key\" is on.";
14891
+ };
14892
+ readonly operator: {
14893
+ readonly type: "boolean";
14894
+ readonly description: "operator: whether `did` is one of the platform's operators.";
13849
14895
  };
13850
14896
  };
13851
14897
  };
13852
14898
  };
13853
14899
  readonly errors: [{
14900
+ readonly name: "BadSignature";
14901
+ }, {
13854
14902
  readonly name: "InvalidRequest";
13855
- readonly description: "HTTP 400: `actAs` or one of `alsoActAs` is not a DID, or more than 99 `alsoActAs`.";
13856
14903
  }, {
13857
- readonly name: "Forbidden";
13858
- readonly description: "HTTP 403: the caller may not write as `actAs` (with `alsoActAs`: as any of them).";
14904
+ readonly name: "UnknownAccount";
14905
+ }, {
14906
+ readonly name: "RateLimitExceeded";
14907
+ }, {
14908
+ readonly name: "Unavailable";
14909
+ readonly description: "Try again (`redeemCode` and `newRecoveryCodes` also while the platform's identity keys are not loaded).";
14910
+ }, {
14911
+ readonly name: "NotFound";
14912
+ readonly description: "No such method or pending change on the account.";
14913
+ }, {
14914
+ readonly name: "NotYourMethod";
14915
+ readonly description: "The step-up names a method that is not the account's.";
14916
+ }, {
14917
+ readonly name: "LastMethod";
14918
+ readonly description: "It would leave no way to sign in.";
14919
+ }, {
14920
+ readonly name: "RecoveryProtected";
14921
+ readonly description: "Only a recovery method can do this to a recovery method.";
14922
+ }, {
14923
+ readonly name: "NeedsRecoveryMethod";
14924
+ readonly description: "Needs a fresh step-up of a recovery method.";
14925
+ }, {
14926
+ readonly name: "StepUpRequired";
14927
+ readonly description: "Needs a fresh step-up (an account's first recovery mark, `newRecoveryCodes`, `fold` and `link` included).";
14928
+ }, {
14929
+ readonly name: "SameMethod";
14930
+ readonly description: "A method cannot freeze itself.";
14931
+ }, {
14932
+ readonly name: "MethodFrozen";
14933
+ 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).";
14934
+ }, {
14935
+ readonly name: "InvalidToken";
14936
+ readonly description: "fold / link: the offer is unknown, used, expired, for the other action, or not made to `did` on this hook.";
14937
+ }, {
14938
+ readonly name: "ProtectedAccount";
14939
+ readonly description: "addChannel / fold / link: 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 or linked (HTTP 409).";
14940
+ }, {
14941
+ readonly name: "NotEmpty";
14942
+ readonly description: "fold: the account to fold gained a record or is 7 days old or more; link instead (HTTP 409).";
14943
+ }, {
14944
+ readonly name: "ProgramRefused";
14945
+ 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.";
14946
+ }, {
14947
+ readonly name: "ProgramsOn";
14948
+ readonly description: "mark: the key has programs on; turn that off first (HTTP 409).";
14949
+ }, {
14950
+ readonly name: "IsRecovery";
14951
+ readonly description: "setPrograms on: the method is a recovery method, or its first mark is waiting (HTTP 409).";
13859
14952
  }];
13860
14953
  };
13861
- readonly holdView: {
14954
+ readonly stepUp: {
13862
14955
  readonly type: "object";
13863
- readonly required: ["id", "askedBy", "collection", "record", "createdAt"];
14956
+ readonly description: "What the PDS's step-up proved.";
14957
+ readonly required: ["method", "provedAt"];
13864
14958
  readonly properties: {
13865
- readonly id: {
14959
+ readonly method: {
14960
+ readonly type: "ref";
14961
+ readonly ref: "lex:pub.techne.draft.identity.manageMethods#provedMethod";
14962
+ };
14963
+ readonly provedAt: {
13866
14964
  readonly type: "string";
14965
+ readonly format: "datetime";
13867
14966
  };
13868
- readonly actAs: {
14967
+ };
14968
+ };
14969
+ readonly external: {
14970
+ readonly type: "object";
14971
+ readonly required: ["type", "ref"];
14972
+ readonly properties: {
14973
+ readonly type: {
13869
14974
  readonly type: "string";
13870
- readonly format: "did";
13871
- readonly description: "The account the hold would write as.";
14975
+ readonly knownValues: ["passkey", "nostr"];
13872
14976
  };
13873
- readonly askedBy: {
14977
+ readonly ref: {
14978
+ readonly type: "string";
14979
+ readonly maxLength: 512;
14980
+ readonly description: "The passkey credential id, or the Nostr key (hex).";
14981
+ };
14982
+ readonly label: {
14983
+ readonly type: "string";
14984
+ readonly maxLength: 128;
14985
+ };
14986
+ };
14987
+ };
14988
+ readonly notice: {
14989
+ readonly type: "object";
14990
+ readonly required: ["id", "did", "event", "to", "createdAt"];
14991
+ readonly properties: {
14992
+ readonly id: {
14993
+ readonly type: "integer";
14994
+ };
14995
+ readonly did: {
13874
14996
  readonly type: "string";
13875
14997
  readonly format: "did";
13876
14998
  };
13877
- readonly app: {
14999
+ readonly event: {
13878
15000
  readonly type: "string";
15001
+ readonly knownValues: ["removeMethod", "deleteAccount", "markRecovery", "freeze", "waitDropped", "programsOn"];
15002
+ readonly description: "What the notice is about: a change that started to wait (`removeMethod`, `deleteAccount`, `markRecovery`), a `freeze`, `waitDropped`: the change in `pending` was not completed because one of the account's methods was frozen during its wait, or `programsOn`: programs can now sign in with one of the account's Nostr keys (`setPrograms` on; no `pending`).";
13879
15003
  };
13880
- readonly collection: {
15004
+ readonly to: {
15005
+ readonly type: "ref";
15006
+ readonly ref: "lex:pub.techne.draft.identity.manageMethods#noticeTo";
15007
+ };
15008
+ readonly pending: {
15009
+ readonly type: "ref";
15010
+ readonly ref: "lex:pub.techne.draft.identity.defs#pendingChange";
15011
+ };
15012
+ readonly createdAt: {
13881
15013
  readonly type: "string";
13882
- readonly format: "nsid";
15014
+ readonly format: "datetime";
13883
15015
  };
13884
- readonly rkey: {
15016
+ };
15017
+ };
15018
+ readonly provedMethod: {
15019
+ readonly type: "object";
15020
+ readonly required: ["type"];
15021
+ readonly properties: {
15022
+ readonly type: {
13885
15023
  readonly type: "string";
13886
- readonly description: "The record key template.";
15024
+ readonly knownValues: ["email", "phone", "passkey", "nostr", "recoveryCodes"];
13887
15025
  };
13888
- readonly space: {
15026
+ readonly value: {
13889
15027
  readonly type: "string";
15028
+ readonly maxLength: 512;
15029
+ readonly description: "The email or E.164 phone, the passkey credential id, or the Nostr key (hex). None for recoveryCodes.";
13890
15030
  };
13891
- readonly record: {
13892
- readonly type: "unknown";
13893
- readonly description: "The record template, slots unfilled.";
15031
+ };
15032
+ };
15033
+ readonly noticeTo: {
15034
+ readonly type: "object";
15035
+ readonly required: ["type", "value"];
15036
+ readonly properties: {
15037
+ readonly type: {
15038
+ readonly type: "string";
15039
+ readonly knownValues: ["email", "phone", "nostr"];
13894
15040
  };
13895
- readonly createdAt: {
15041
+ readonly value: {
15042
+ readonly type: "string";
15043
+ };
15044
+ };
15045
+ };
15046
+ readonly signInMethod: {
15047
+ readonly type: "object";
15048
+ 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.";
15049
+ readonly required: ["id", "type", "display"];
15050
+ readonly properties: {
15051
+ readonly id: {
15052
+ readonly type: "string";
15053
+ readonly description: "The method id (for `sendTo`, and the PDS's own passkey or Nostr challenge).";
15054
+ };
15055
+ readonly type: {
15056
+ readonly type: "string";
15057
+ readonly knownValues: ["email", "phone", "passkey", "nostr"];
15058
+ };
15059
+ readonly display: {
15060
+ readonly type: "string";
15061
+ };
15062
+ };
15063
+ };
15064
+ readonly importedEmail: {
15065
+ readonly type: "object";
15066
+ readonly required: ["email", "status"];
15067
+ readonly properties: {
15068
+ readonly email: {
15069
+ readonly type: "string";
15070
+ };
15071
+ readonly status: {
15072
+ readonly type: "string";
15073
+ readonly knownValues: ["marked", "boundElsewhere", "released", "invalid", "afterCutoff"];
15074
+ 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).";
15075
+ };
15076
+ };
15077
+ readonly description: "One address importBackupEmails was sent, with what happened to it.";
15078
+ };
15079
+ readonly backupEmail: {
15080
+ readonly type: "object";
15081
+ readonly description: "One backup email importBackupEmails moves, with when the PDS verified it.";
15082
+ readonly required: ["email", "verifiedAt"];
15083
+ readonly properties: {
15084
+ readonly email: {
15085
+ readonly type: "string";
15086
+ readonly maxLength: 320;
15087
+ };
15088
+ readonly verifiedAt: {
13896
15089
  readonly type: "string";
13897
15090
  readonly format: "datetime";
15091
+ readonly description: "When the PDS verified the address. Only one verified before 2026-11-13T00:00:00Z is imported.";
13898
15092
  };
13899
- readonly name: {
15093
+ };
15094
+ };
15095
+ readonly dueDelete: {
15096
+ readonly type: "object";
15097
+ 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.";
15098
+ readonly required: ["did", "deletedAt"];
15099
+ readonly properties: {
15100
+ readonly did: {
13900
15101
  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.";
15102
+ readonly format: "did";
15103
+ };
15104
+ readonly deletedAt: {
15105
+ readonly type: "string";
15106
+ readonly format: "datetime";
15107
+ readonly description: "When the platform deleted its side.";
15108
+ };
15109
+ };
15110
+ };
15111
+ };
15112
+ } | {
15113
+ readonly lexicon: 1;
15114
+ readonly id: "pub.techne.draft.identity.openAccountPage";
15115
+ readonly defs: {
15116
+ readonly main: {
15117
+ readonly type: "procedure";
15118
+ 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.";
15119
+ readonly output: {
15120
+ readonly encoding: "application/json";
15121
+ readonly schema: {
15122
+ readonly type: "object";
15123
+ readonly required: ["url", "expiresAt"];
15124
+ readonly properties: {
15125
+ readonly url: {
15126
+ readonly type: "string";
15127
+ readonly format: "uri";
15128
+ readonly maxLength: 2048;
15129
+ readonly description: "Open it once, before expiresAt.";
15130
+ };
15131
+ readonly expiresAt: {
15132
+ readonly type: "string";
15133
+ readonly format: "datetime";
15134
+ };
15135
+ };
13902
15136
  };
13903
15137
  };
15138
+ readonly errors: [{
15139
+ readonly name: "AuthenticationRequired";
15140
+ readonly description: "No signed-in caller.";
15141
+ }, {
15142
+ readonly name: "NotAuthorized";
15143
+ 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).";
15144
+ }, {
15145
+ readonly name: "ProgramRefused";
15146
+ readonly description: "The caller is an agent token or a program's token: neither opens the account page (HTTP 403).";
15147
+ }, {
15148
+ readonly name: "NotFound";
15149
+ 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.";
15150
+ }, {
15151
+ readonly name: "RateLimitExceeded";
15152
+ readonly description: "Too many links for this account (HTTP 429).";
15153
+ }, {
15154
+ readonly name: "Unavailable";
15155
+ readonly description: "The PDS did not answer (HTTP 502). Open the account page without a link.";
15156
+ }];
13904
15157
  };
13905
15158
  };
13906
15159
  } | {
@@ -14142,6 +15395,15 @@ export declare const schemas: ({
14142
15395
  readonly format: "did";
14143
15396
  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
15397
  };
15398
+ readonly frozen: {
15399
+ readonly type: "boolean";
15400
+ 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.";
15401
+ };
15402
+ readonly frozenUntil: {
15403
+ readonly type: "string";
15404
+ readonly format: "datetime";
15405
+ readonly description: "Present only with `frozen`: when the freeze ends, unless a recovery method lifts it sooner.";
15406
+ };
14145
15407
  readonly releaseId: {
14146
15408
  readonly type: "string";
14147
15409
  readonly minLength: 1;
@@ -14258,7 +15520,7 @@ export declare const schemas: ({
14258
15520
  readonly defs: {
14259
15521
  readonly main: {
14260
15522
  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.";
15523
+ 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 notice to every method and any of them 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
15524
  readonly input: {
14263
15525
  readonly encoding: "application/json";
14264
15526
  readonly schema: {
@@ -14281,6 +15543,14 @@ export declare const schemas: ({
14281
15543
  readonly ok: {
14282
15544
  readonly type: "boolean";
14283
15545
  };
15546
+ readonly status: {
15547
+ readonly type: "string";
15548
+ readonly knownValues: ["pending"];
15549
+ };
15550
+ readonly pending: {
15551
+ readonly type: "ref";
15552
+ readonly ref: "lex:pub.techne.draft.identity.defs#pendingChange";
15553
+ };
14284
15554
  };
14285
15555
  };
14286
15556
  };
@@ -14292,7 +15562,10 @@ export declare const schemas: ({
14292
15562
  readonly description: "No such method on the caller's account.";
14293
15563
  }, {
14294
15564
  readonly name: "LastMethod";
14295
- readonly description: "It is the account's only sign-in method.";
15565
+ readonly description: "It is the account's only sign-in method (counting those already waiting to be removed).";
15566
+ }, {
15567
+ readonly name: "RecoveryProtected";
15568
+ readonly description: "It is a recovery method; only a recovery method removes it (identity.manageMethods).";
14296
15569
  }];
14297
15570
  };
14298
15571
  };
@@ -15288,11 +16561,11 @@ export declare const schemas: ({
15288
16561
  } | {
15289
16562
  readonly lexicon: 1;
15290
16563
  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.";
16564
+ 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
16565
  readonly defs: {
15293
16566
  readonly main: {
15294
16567
  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.";
16568
+ 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
16569
  readonly input: {
15297
16570
  readonly encoding: "application/json";
15298
16571
  readonly schema: {
@@ -15343,7 +16616,7 @@ export declare const schemas: ({
15343
16616
  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
16617
  }, {
15345
16618
  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.";
16619
+ 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
16620
  }, {
15348
16621
  readonly name: "AccountDeleting";
15349
16622
  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 +16699,8 @@ export declare const schemas: ({
15426
16699
  readonly properties: {
15427
16700
  readonly error: {
15428
16701
  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"];
16702
+ 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).";
16703
+ readonly knownValues: ["InvalidRequest", "InvalidSwap", "Conflict", "IdentityConflict", "DuplicatePhone", "RateLimitExceeded", "Forbidden"];
15431
16704
  };
15432
16705
  readonly message: {
15433
16706
  readonly type: "string";
@@ -17081,7 +18354,7 @@ export declare const schemas: ({
17081
18354
  readonly defs: {
17082
18355
  readonly main: {
17083
18356
  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.";
18357
+ 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
18358
  readonly input: {
17086
18359
  readonly encoding: "application/json";
17087
18360
  readonly schema: {
@@ -17138,11 +18411,17 @@ export declare const schemas: ({
17138
18411
  readonly name: "AuthenticationRequired";
17139
18412
  readonly description: "Blocking is a signed-in act.";
17140
18413
  }, {
17141
- readonly name: "Forbidden";
17142
- readonly description: "The caller is not an operator of this platform.";
18414
+ readonly name: "NotAuthorized";
18415
+ readonly description: "The caller is not an operator of this platform, or the call does not carry the moderate scope (HTTP 403).";
18416
+ }, {
18417
+ readonly name: "ProgramRefused";
18418
+ readonly description: "The caller is a program's token: a program never reaches an operator method (HTTP 403).";
17143
18419
  }, {
17144
18420
  readonly name: "UnknownType";
17145
18421
  readonly description: "`nsid` names no community or requested type (our own types are not limited).";
18422
+ }, {
18423
+ readonly name: "InvalidRequest";
18424
+ readonly description: "`reason` is blank or over 1000 characters, or `author` is not a DID (HTTP 400).";
17146
18425
  }];
17147
18426
  };
17148
18427
  };
@@ -17724,7 +19003,7 @@ export declare const schemas: ({
17724
19003
  readonly defs: {
17725
19004
  readonly main: {
17726
19005
  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.";
19006
+ 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
19007
  readonly input: {
17729
19008
  readonly encoding: "application/json";
17730
19009
  readonly schema: {
@@ -17772,11 +19051,17 @@ export declare const schemas: ({
17772
19051
  readonly name: "AuthenticationRequired";
17773
19052
  readonly description: "Purging is a signed-in act.";
17774
19053
  }, {
17775
- readonly name: "Forbidden";
17776
- readonly description: "The caller is not an operator of this platform.";
19054
+ readonly name: "NotAuthorized";
19055
+ readonly description: "The caller is not an operator of this platform, or the call does not carry the moderate scope (HTTP 403).";
19056
+ }, {
19057
+ readonly name: "ProgramRefused";
19058
+ readonly description: "The caller is a program's token: a program never reaches an operator method (HTTP 403).";
17777
19059
  }, {
17778
19060
  readonly name: "UnknownType";
17779
19061
  readonly description: "`nsid` names no community or requested type (our own types cannot be purged).";
19062
+ }, {
19063
+ readonly name: "InvalidRequest";
19064
+ readonly description: "`reason` is blank or over 1000 characters (HTTP 400).";
17780
19065
  }];
17781
19066
  };
17782
19067
  };
@@ -19826,6 +21111,7 @@ export declare const ids: {
19826
21111
  readonly PubTechneDraftIdentityAccountsForPhones: "pub.techne.draft.identity.accountsForPhones";
19827
21112
  readonly PubTechneDraftIdentityAttest: "pub.techne.draft.identity.attest";
19828
21113
  readonly PubTechneDraftIdentityBeginAddMethod: "pub.techne.draft.identity.beginAddMethod";
21114
+ readonly PubTechneDraftIdentityCancelPendingChange: "pub.techne.draft.identity.cancelPendingChange";
19829
21115
  readonly PubTechneDraftIdentityCheckLinkToken: "pub.techne.draft.identity.checkLinkToken";
19830
21116
  readonly PubTechneDraftIdentityCreateCollective: "pub.techne.draft.identity.createCollective";
19831
21117
  readonly PubTechneDraftIdentityCreateLinkToken: "pub.techne.draft.identity.createLinkToken";
@@ -19840,6 +21126,8 @@ export declare const ids: {
19840
21126
  readonly PubTechneDraftIdentityListLinkTokens: "pub.techne.draft.identity.listLinkTokens";
19841
21127
  readonly PubTechneDraftIdentityListMethods: "pub.techne.draft.identity.listMethods";
19842
21128
  readonly PubTechneDraftIdentityListPhoneHolds: "pub.techne.draft.identity.listPhoneHolds";
21129
+ readonly PubTechneDraftIdentityManageMethods: "pub.techne.draft.identity.manageMethods";
21130
+ readonly PubTechneDraftIdentityOpenAccountPage: "pub.techne.draft.identity.openAccountPage";
19843
21131
  readonly PubTechneDraftIdentityRedeemLinkToken: "pub.techne.draft.identity.redeemLinkToken";
19844
21132
  readonly PubTechneDraftIdentityReleasePhoneHold: "pub.techne.draft.identity.releasePhoneHold";
19845
21133
  readonly PubTechneDraftIdentityResetLinkToken: "pub.techne.draft.identity.resetLinkToken";