techne-sdk 0.3.4 → 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 (59) hide show
  1. package/CHANGELOG.md +159 -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.d.ts +24 -24
  10. package/dist/catalog/catalog.gen.js +1256 -85
  11. package/dist/generated/index.d.ts +9 -0
  12. package/dist/generated/index.js +27 -0
  13. package/dist/generated/lexicons.d.ts +1539 -147
  14. package/dist/generated/lexicons.js +1020 -202
  15. package/dist/generated/nsid.d.ts +18 -0
  16. package/dist/generated/nsid.js +18 -0
  17. package/dist/generated/nsid.json +18 -0
  18. package/dist/generated/types/pub/techne/draft/beacon.d.ts +2 -0
  19. package/dist/generated/types/pub/techne/draft/collective.d.ts +1 -1
  20. package/dist/generated/types/pub/techne/draft/commons/moveAccountHandle.d.ts +3 -0
  21. package/dist/generated/types/pub/techne/draft/commons/moveAccountHandle.js +7 -0
  22. package/dist/generated/types/pub/techne/draft/identity/attest.d.ts +6 -0
  23. package/dist/generated/types/pub/techne/draft/identity/attest.js +14 -0
  24. package/dist/generated/types/pub/techne/draft/identity/beginAddMethod.d.ts +6 -0
  25. package/dist/generated/types/pub/techne/draft/identity/beginAddMethod.js +14 -0
  26. package/dist/generated/types/pub/techne/draft/identity/cancelPendingChange.d.ts +29 -0
  27. package/dist/generated/types/pub/techne/draft/identity/cancelPendingChange.js +27 -0
  28. package/dist/generated/types/pub/techne/draft/identity/defs.d.ts +22 -4
  29. package/dist/generated/types/pub/techne/draft/identity/defs.js +7 -0
  30. package/dist/generated/types/pub/techne/draft/identity/finishAddMethod.d.ts +12 -0
  31. package/dist/generated/types/pub/techne/draft/identity/finishAddMethod.js +28 -0
  32. package/dist/generated/types/pub/techne/draft/identity/fold.d.ts +3 -0
  33. package/dist/generated/types/pub/techne/draft/identity/fold.js +7 -0
  34. package/dist/generated/types/pub/techne/draft/identity/holdForPhone.d.ts +1 -1
  35. package/dist/generated/types/pub/techne/draft/identity/link.d.ts +3 -0
  36. package/dist/generated/types/pub/techne/draft/identity/link.js +7 -0
  37. package/dist/generated/types/pub/techne/draft/identity/listMethods.d.ts +6 -1
  38. package/dist/generated/types/pub/techne/draft/identity/manageMethods.d.ts +225 -0
  39. package/dist/generated/types/pub/techne/draft/identity/manageMethods.js +209 -0
  40. package/dist/generated/types/pub/techne/draft/identity/openAccountPage.d.ts +40 -0
  41. package/dist/generated/types/pub/techne/draft/identity/openAccountPage.js +55 -0
  42. package/dist/generated/types/pub/techne/draft/identity/resolve.d.ts +10 -0
  43. package/dist/generated/types/pub/techne/draft/identity/unlinkMethod.d.ts +6 -0
  44. package/dist/generated/types/pub/techne/draft/identity/unlinkMethod.js +7 -0
  45. package/dist/generated/types/pub/techne/draft/membership.d.ts +1 -1
  46. package/dist/generated/types/pub/techne/draft/permissioned/deleteRecord.d.ts +3 -0
  47. package/dist/generated/types/pub/techne/draft/permissioned/deleteRecord.js +7 -0
  48. package/dist/generated/types/pub/techne/draft/permissioned/putRecord.d.ts +3 -0
  49. package/dist/generated/types/pub/techne/draft/permissioned/putRecord.js +7 -0
  50. package/dist/generated/types/pub/techne/draft/permissioned/putRecords.d.ts +5 -2
  51. package/dist/generated/types/pub/techne/draft/permissioned/putRecords.js +7 -0
  52. package/dist/generated/types/pub/techne/draft/registry/blockIndex.d.ts +7 -1
  53. package/dist/generated/types/pub/techne/draft/registry/blockIndex.js +17 -3
  54. package/dist/generated/types/pub/techne/draft/registry/purgeType.d.ts +7 -1
  55. package/dist/generated/types/pub/techne/draft/registry/purgeType.js +17 -3
  56. package/dist/generated/types/pub/techne/draft/summary.d.ts +2 -0
  57. package/dist/wasm/techne-wasm.gen.js +1 -1
  58. package/dist/wasm/techne-wasm2js.gen.js +9950 -9947
  59. package/package.json +2 -1
@@ -1471,6 +1471,16 @@ export const schemaDict = {
1471
1471
  maxLength: 64,
1472
1472
  description: 'Optional: one emoji the lighter picked for this beacon (its card mark and map pin glyph).',
1473
1473
  },
1474
+ answerEmojis: {
1475
+ type: 'array',
1476
+ maxLength: 3,
1477
+ items: {
1478
+ type: 'string',
1479
+ maxGraphemes: 1,
1480
+ maxLength: 64,
1481
+ },
1482
+ description: "Optional: the emoji the lighter picked for the answers, in this order: going (I'm in), interested (Maybe), notgoing (Can't go). A missing or empty entry means the app's own emoji for that answer.",
1483
+ },
1474
1484
  createdAt: {
1475
1485
  type: 'string',
1476
1486
  format: 'datetime',
@@ -1655,7 +1665,7 @@ export const schemaDict = {
1655
1665
  },
1656
1666
  collectiveType: {
1657
1667
  type: 'string',
1658
- description: 'Free-form collective type/category label. The value "beacon.circle" marks a Beacon circle on a descriptor placed in its own DID\'s pub.techne.draft.space.collective.member/self, whoever made that DID or wrote it. A Beacon circle is a private group whose descriptor and memberships live only in that member space, where every member holds role 40 (where the platform holds the circle\'s credential, any member may add, remove and rename and nobody deletes it; a circle whose DID someone else holds is managed by its holder), and which a pub.techne.draft.accessRule#groupTarget may name.',
1668
+ description: "Free-form collective type/category label. The value \"beacon.circle\" marks a Beacon circle on a descriptor placed in its own DID's pub.techne.draft.space.collective.member/self, whoever made that DID or wrote it. A Beacon circle is a private group whose descriptor and memberships live only in that member space, and which a pub.techne.draft.accessRule#groupTarget may name. Roles: a member holds 20 and the manager 40 (the founder, until they make someone else manager). Where the platform holds the circle's credential, any member may add people and leave; only the manager renames, sets the emoji, removes people and makes someone manager (one putRecords: that member at 40, the manager's own claim at 20). A write that would leave members with nobody at >= 30 is refused (LastManager). A circle whose last member leaves is deleted, and so is one whose only member deletes their account; an account that alone manages a circle hands it to the longest-standing other member when it is deleted. Circles made before these roles hold every member at 40 until the operator lowers them. A circle whose DID someone else holds is managed by its holder.",
1659
1669
  maxLength: 64,
1660
1670
  },
1661
1671
  sceneType: {
@@ -1930,7 +1940,7 @@ export const schemaDict = {
1930
1940
  defs: {
1931
1941
  main: {
1932
1942
  type: 'procedure',
1933
- 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.",
1943
+ 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.",
1934
1944
  input: {
1935
1945
  encoding: 'application/json',
1936
1946
  schema: {
@@ -1980,7 +1990,11 @@ export const schemaDict = {
1980
1990
  },
1981
1991
  {
1982
1992
  name: 'NotAuthorized',
1983
- description: 'The caller is not an operator.',
1993
+ description: 'The caller is not an operator, or the call does not carry the moderate scope (HTTP 403).',
1994
+ },
1995
+ {
1996
+ name: 'ProgramRefused',
1997
+ description: "The caller is a program's token: a program never reaches an operator method (HTTP 403).",
1984
1998
  },
1985
1999
  {
1986
2000
  name: 'InvalidRequest',
@@ -3047,7 +3061,7 @@ export const schemaDict = {
3047
3061
  defs: {
3048
3062
  main: {
3049
3063
  type: 'procedure',
3050
- 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, 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).",
3064
+ 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).",
3051
3065
  input: {
3052
3066
  encoding: 'application/json',
3053
3067
  schema: {
@@ -3116,6 +3130,14 @@ export const schemaDict = {
3116
3130
  name: 'ChannelBound',
3117
3131
  description: 'The channel is bound to another account (HTTP 409). Never retried.',
3118
3132
  },
3133
+ {
3134
+ name: 'ChannelReleased',
3135
+ 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).',
3136
+ },
3137
+ {
3138
+ name: 'MethodFrozen',
3139
+ 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.',
3140
+ },
3119
3141
  {
3120
3142
  name: 'RateLimitExceeded',
3121
3143
  description: 'As identity.resolve (HTTP 429).',
@@ -3130,7 +3152,7 @@ export const schemaDict = {
3130
3152
  defs: {
3131
3153
  main: {
3132
3154
  type: 'procedure',
3133
- description: "Start adding a sign-in method to the caller's account: sends a 6-digit code to the channel (email in v1). The code is good for 10 minutes and 5 attempts; finish with identity.finishAddMethod. Signed-in members only.",
3155
+ description: "Start adding a sign-in method to the caller's account: sends a 6-digit code to the channel: an email, or a phone by SMS. To change a phone number, add the new one, then remove the old one with identity.unlinkMethod. The code is good for 10 minutes and 5 attempts; finish with identity.finishAddMethod. Signed-in members only.",
3134
3156
  input: {
3135
3157
  encoding: 'application/json',
3136
3158
  schema: {
@@ -3169,12 +3191,65 @@ export const schemaDict = {
3169
3191
  },
3170
3192
  {
3171
3193
  name: 'InvalidRequest',
3172
- description: 'The channel is not a valid email, or its type cannot be added yet.',
3194
+ description: 'The channel is not a valid email or E.164 phone number, or its type cannot be added on this server.',
3173
3195
  },
3174
3196
  {
3175
3197
  name: 'RateLimitExceeded',
3176
3198
  description: 'Too many codes sent to this address (HTTP 429).',
3177
3199
  },
3200
+ {
3201
+ name: 'MethodFrozen',
3202
+ description: "The channel is a frozen sign-in method of an account (HTTP 403); it can't be proved anywhere until the freeze ends.",
3203
+ },
3204
+ {
3205
+ name: 'SendFailed',
3206
+ description: 'The code could not be texted to that phone number (HTTP 502). Try again.',
3207
+ },
3208
+ ],
3209
+ },
3210
+ },
3211
+ },
3212
+ PubTechneDraftIdentityCancelPendingChange: {
3213
+ lexicon: 1,
3214
+ id: 'pub.techne.draft.identity.cancelPendingChange',
3215
+ defs: {
3216
+ main: {
3217
+ type: 'procedure',
3218
+ 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.",
3219
+ input: {
3220
+ encoding: 'application/json',
3221
+ schema: {
3222
+ type: 'object',
3223
+ required: ['id'],
3224
+ properties: {
3225
+ id: {
3226
+ type: 'string',
3227
+ maxLength: 64,
3228
+ },
3229
+ },
3230
+ },
3231
+ },
3232
+ output: {
3233
+ encoding: 'application/json',
3234
+ schema: {
3235
+ type: 'object',
3236
+ required: ['ok'],
3237
+ properties: {
3238
+ ok: {
3239
+ type: 'boolean',
3240
+ },
3241
+ },
3242
+ },
3243
+ },
3244
+ errors: [
3245
+ {
3246
+ name: 'AuthenticationRequired',
3247
+ description: 'No signed-in caller.',
3248
+ },
3249
+ {
3250
+ name: 'NotFound',
3251
+ description: "No such pending change on the caller's account, or it already completed or was cancelled.",
3252
+ },
3178
3253
  ],
3179
3254
  },
3180
3255
  },
@@ -3301,7 +3376,7 @@ export const schemaDict = {
3301
3376
  defs: {
3302
3377
  main: {
3303
3378
  type: 'procedure',
3304
- 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.",
3379
+ 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.",
3305
3380
  input: {
3306
3381
  encoding: 'application/json',
3307
3382
  schema: {
@@ -3398,27 +3473,74 @@ export const schemaDict = {
3398
3473
  },
3399
3474
  methodView: {
3400
3475
  type: 'object',
3401
- description: "One sign-in method bound to the caller's account, masked.",
3476
+ description: "One sign-in method of the caller's account, masked.",
3402
3477
  required: ['bid', 'type', 'masked', 'boundAt'],
3403
3478
  properties: {
3404
3479
  bid: {
3405
3480
  type: 'string',
3406
3481
  maxLength: 64,
3407
- description: "The binding id (the credential's record key). Names the method in unlinkMethod.",
3482
+ 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.",
3408
3483
  },
3409
3484
  type: {
3410
3485
  type: 'string',
3411
- knownValues: ['email', 'phone'],
3486
+ knownValues: [
3487
+ 'email',
3488
+ 'phone',
3489
+ 'passkey',
3490
+ 'nostr',
3491
+ 'recoveryCodes',
3492
+ ],
3412
3493
  },
3413
3494
  masked: {
3414
3495
  type: 'string',
3415
3496
  maxLength: 320,
3416
- description: 'The channel with most of it hidden, e.g. `j•••@example.com`, `+1 ••• ••• 4567`.',
3497
+ 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)`.",
3417
3498
  },
3418
3499
  boundAt: {
3419
3500
  type: 'string',
3420
3501
  format: 'datetime',
3421
3502
  },
3503
+ recovery: {
3504
+ type: 'boolean',
3505
+ description: 'A recovery method of this account. Private: only the account sees it.',
3506
+ },
3507
+ frozenUntil: {
3508
+ type: 'string',
3509
+ format: 'datetime',
3510
+ description: 'Frozen: it signs in nowhere until then, or until a recovery method lifts it.',
3511
+ },
3512
+ programs: {
3513
+ type: 'boolean',
3514
+ 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.',
3515
+ },
3516
+ },
3517
+ },
3518
+ pendingChange: {
3519
+ type: 'object',
3520
+ 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.",
3521
+ required: ['id', 'kind', 'createdAt', 'dueAt'],
3522
+ properties: {
3523
+ id: {
3524
+ type: 'string',
3525
+ maxLength: 64,
3526
+ },
3527
+ kind: {
3528
+ type: 'string',
3529
+ knownValues: ['removeMethod', 'deleteAccount', 'markRecovery'],
3530
+ },
3531
+ method: {
3532
+ type: 'string',
3533
+ maxLength: 64,
3534
+ description: 'The method it removes or marks.',
3535
+ },
3536
+ createdAt: {
3537
+ type: 'string',
3538
+ format: 'datetime',
3539
+ },
3540
+ dueAt: {
3541
+ type: 'string',
3542
+ format: 'datetime',
3543
+ },
3422
3544
  },
3423
3545
  },
3424
3546
  linkView: {
@@ -3585,6 +3707,22 @@ export const schemaDict = {
3585
3707
  name: 'InvalidCode',
3586
3708
  description: "The code is wrong, expired or used up, or the challenge is not the caller's.",
3587
3709
  },
3710
+ {
3711
+ name: 'RateLimitExceeded',
3712
+ description: 'A phone code: the provider that sent it is refusing more checks for this number for now (HTTP 429). Wait a few minutes.',
3713
+ },
3714
+ {
3715
+ name: 'MethodFrozen',
3716
+ 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).",
3717
+ },
3718
+ {
3719
+ name: 'ProtectedAccount',
3720
+ 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.',
3721
+ },
3722
+ {
3723
+ name: 'UpstreamFailure',
3724
+ 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.',
3725
+ },
3588
3726
  ],
3589
3727
  },
3590
3728
  offer: {
@@ -3673,6 +3811,10 @@ export const schemaDict = {
3673
3811
  name: 'InvalidToken',
3674
3812
  description: 'The token is unknown, used, expired, or was issued to another session.',
3675
3813
  },
3814
+ {
3815
+ name: 'ProtectedAccount',
3816
+ 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).',
3817
+ },
3676
3818
  {
3677
3819
  name: 'NotEmpty',
3678
3820
  description: 'The account to fold gained a record or is 7 days old or more; link instead.',
@@ -3687,7 +3829,7 @@ export const schemaDict = {
3687
3829
  defs: {
3688
3830
  main: {
3689
3831
  type: 'procedure',
3690
- 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.',
3832
+ 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.',
3691
3833
  input: {
3692
3834
  encoding: 'application/json',
3693
3835
  schema: {
@@ -3762,7 +3904,7 @@ export const schemaDict = {
3762
3904
  },
3763
3905
  record: {
3764
3906
  type: 'unknown',
3765
- description: 'The record, with the "$subject" (and optionally "$now") slots as string values.',
3907
+ description: 'The record, with the "$subject" (and optionally "$now" and "$name") slots as string values.',
3766
3908
  },
3767
3909
  },
3768
3910
  },
@@ -3815,6 +3957,10 @@ export const schemaDict = {
3815
3957
  name: 'InvalidToken',
3816
3958
  description: 'The token is unknown, used, expired, or was issued to another session.',
3817
3959
  },
3960
+ {
3961
+ name: 'ProtectedAccount',
3962
+ 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).',
3963
+ },
3818
3964
  {
3819
3965
  name: 'InvalidRequest',
3820
3966
  description: "`primary` names neither account, or the other account's keys are not held here (sign in to it and link from there).",
@@ -4014,101 +4160,777 @@ export const schemaDict = {
4014
4160
  name: 'UpstreamFailure',
4015
4161
  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.',
4016
4162
  },
4017
- ],
4163
+ ],
4164
+ },
4165
+ },
4166
+ },
4167
+ PubTechneDraftIdentityListLinkTokens: {
4168
+ lexicon: 1,
4169
+ id: 'pub.techne.draft.identity.listLinkTokens',
4170
+ defs: {
4171
+ main: {
4172
+ type: 'procedure',
4173
+ description: "The caller's live links for `app` and `target`, each with its token, in no promised order. A procedure so the token never rides a URL. One call spends one of the caller's writes.",
4174
+ input: {
4175
+ encoding: 'application/json',
4176
+ schema: {
4177
+ type: 'object',
4178
+ required: ['app', 'target'],
4179
+ properties: {
4180
+ app: {
4181
+ type: 'string',
4182
+ minLength: 1,
4183
+ maxLength: 64,
4184
+ description: 'The app the link is for, a label the caller gives itself (unverified).',
4185
+ },
4186
+ target: {
4187
+ type: 'string',
4188
+ minLength: 1,
4189
+ maxLength: 2048,
4190
+ description: 'What the link is for, as a URI with a scheme (at://, https://, did:...).',
4191
+ },
4192
+ },
4193
+ },
4194
+ },
4195
+ output: {
4196
+ encoding: 'application/json',
4197
+ schema: {
4198
+ type: 'object',
4199
+ required: ['links'],
4200
+ properties: {
4201
+ links: {
4202
+ type: 'array',
4203
+ items: {
4204
+ type: 'ref',
4205
+ ref: 'lex:pub.techne.draft.identity.defs#linkTokenListed',
4206
+ },
4207
+ },
4208
+ },
4209
+ },
4210
+ },
4211
+ errors: [
4212
+ {
4213
+ name: 'InvalidRequest',
4214
+ 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.",
4215
+ },
4216
+ {
4217
+ name: 'NotSupported',
4218
+ description: "HTTP 400: the caller's account is not hosted on the platform's identity PDS, or link tokens are not configured there.",
4219
+ },
4220
+ {
4221
+ name: 'RateLimitExceeded',
4222
+ description: 'Too many writes from this DID (HTTP 429).',
4223
+ },
4224
+ {
4225
+ name: 'UpstreamFailure',
4226
+ 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.',
4227
+ },
4228
+ ],
4229
+ },
4230
+ },
4231
+ },
4232
+ PubTechneDraftIdentityListMethods: {
4233
+ lexicon: 1,
4234
+ id: 'pub.techne.draft.identity.listMethods',
4235
+ defs: {
4236
+ main: {
4237
+ type: 'query',
4238
+ 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.",
4239
+ parameters: {
4240
+ type: 'params',
4241
+ properties: {
4242
+ allTypes: {
4243
+ type: 'boolean',
4244
+ description: 'Also list passkeys, Nostr keys and the recovery-code set.',
4245
+ },
4246
+ },
4247
+ },
4248
+ output: {
4249
+ encoding: 'application/json',
4250
+ schema: {
4251
+ type: 'object',
4252
+ required: ['methods', 'links'],
4253
+ properties: {
4254
+ methods: {
4255
+ type: 'array',
4256
+ items: {
4257
+ type: 'ref',
4258
+ ref: 'lex:pub.techne.draft.identity.defs#methodView',
4259
+ },
4260
+ },
4261
+ links: {
4262
+ type: 'array',
4263
+ items: {
4264
+ type: 'ref',
4265
+ ref: 'lex:pub.techne.draft.identity.defs#linkView',
4266
+ },
4267
+ },
4268
+ pending: {
4269
+ type: 'array',
4270
+ description: "The account's pending changes, soonest first (the account page shows them at the top, with Cancel).",
4271
+ items: {
4272
+ type: 'ref',
4273
+ ref: 'lex:pub.techne.draft.identity.defs#pendingChange',
4274
+ },
4275
+ },
4276
+ },
4277
+ },
4278
+ },
4279
+ errors: [
4280
+ {
4281
+ name: 'AuthenticationRequired',
4282
+ description: 'No signed-in caller.',
4283
+ },
4284
+ ],
4285
+ },
4286
+ },
4287
+ },
4288
+ PubTechneDraftIdentityListPhoneHolds: {
4289
+ lexicon: 1,
4290
+ id: 'pub.techne.draft.identity.listPhoneHolds',
4291
+ defs: {
4292
+ main: {
4293
+ type: 'query',
4294
+ 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.',
4295
+ parameters: {
4296
+ type: 'params',
4297
+ required: ['actAs'],
4298
+ properties: {
4299
+ actAs: {
4300
+ type: 'string',
4301
+ format: 'did',
4302
+ },
4303
+ alsoActAs: {
4304
+ type: 'array',
4305
+ maxLength: 99,
4306
+ description: 'More accounts whose holds to list in the same call, after `actAs` (repeat the parameter).',
4307
+ items: {
4308
+ type: 'string',
4309
+ format: 'did',
4310
+ },
4311
+ },
4312
+ },
4313
+ },
4314
+ output: {
4315
+ encoding: 'application/json',
4316
+ schema: {
4317
+ type: 'object',
4318
+ required: ['holds'],
4319
+ properties: {
4320
+ holds: {
4321
+ type: 'array',
4322
+ items: {
4323
+ type: 'ref',
4324
+ ref: 'lex:pub.techne.draft.identity.listPhoneHolds#holdView',
4325
+ },
4326
+ },
4327
+ },
4328
+ },
4329
+ },
4330
+ errors: [
4331
+ {
4332
+ name: 'InvalidRequest',
4333
+ description: 'HTTP 400: `actAs` or one of `alsoActAs` is not a DID, or more than 99 `alsoActAs`.',
4334
+ },
4335
+ {
4336
+ name: 'Forbidden',
4337
+ description: 'HTTP 403: the caller may not write as `actAs` (with `alsoActAs`: as any of them).',
4338
+ },
4339
+ ],
4340
+ },
4341
+ holdView: {
4342
+ type: 'object',
4343
+ required: ['id', 'askedBy', 'collection', 'record', 'createdAt'],
4344
+ properties: {
4345
+ id: {
4346
+ type: 'string',
4347
+ },
4348
+ actAs: {
4349
+ type: 'string',
4350
+ format: 'did',
4351
+ description: 'The account the hold would write as.',
4352
+ },
4353
+ askedBy: {
4354
+ type: 'string',
4355
+ format: 'did',
4356
+ },
4357
+ app: {
4358
+ type: 'string',
4359
+ },
4360
+ collection: {
4361
+ type: 'string',
4362
+ format: 'nsid',
4363
+ },
4364
+ rkey: {
4365
+ type: 'string',
4366
+ description: 'The record key template.',
4367
+ },
4368
+ space: {
4369
+ type: 'string',
4370
+ },
4371
+ record: {
4372
+ type: 'unknown',
4373
+ description: 'The record template, slots unfilled.',
4374
+ },
4375
+ createdAt: {
4376
+ type: 'string',
4377
+ format: 'datetime',
4378
+ },
4379
+ name: {
4380
+ type: 'string',
4381
+ 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.",
4382
+ },
4383
+ },
4384
+ },
4385
+ },
4386
+ },
4387
+ PubTechneDraftIdentityManageMethods: {
4388
+ lexicon: 1,
4389
+ id: 'pub.techne.draft.identity.manageMethods',
4390
+ defs: {
4391
+ main: {
4392
+ type: 'procedure',
4393
+ 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.",
4394
+ input: {
4395
+ encoding: 'application/json',
4396
+ schema: {
4397
+ type: 'object',
4398
+ required: ['v', 'op'],
4399
+ properties: {
4400
+ v: {
4401
+ type: 'integer',
4402
+ const: 1,
4403
+ },
4404
+ op: {
4405
+ type: 'string',
4406
+ knownValues: [
4407
+ 'list',
4408
+ 'signInMethods',
4409
+ 'sendTo',
4410
+ 'remove',
4411
+ 'cancel',
4412
+ 'freeze',
4413
+ 'unfreeze',
4414
+ 'mark',
4415
+ 'unmark',
4416
+ 'signOut',
4417
+ 'delete',
4418
+ 'addExternal',
4419
+ 'newRecoveryCodes',
4420
+ 'redeemCode',
4421
+ 'setPrograms',
4422
+ 'importBackupEmails',
4423
+ 'findKey',
4424
+ 'notices',
4425
+ 'noticesSent',
4426
+ 'dueDeletes',
4427
+ 'dueDeletesDone',
4428
+ 'addChannel',
4429
+ 'fold',
4430
+ 'link',
4431
+ 'operator',
4432
+ ],
4433
+ },
4434
+ did: {
4435
+ type: 'string',
4436
+ format: 'did',
4437
+ description: 'The signed-in account. Required for every op but `notices`, `noticesSent`, `dueDeletes` and `dueDeletesDone`.',
4438
+ },
4439
+ stepUp: {
4440
+ type: 'ref',
4441
+ ref: 'lex:pub.techne.draft.identity.manageMethods#stepUp',
4442
+ },
4443
+ method: {
4444
+ type: 'string',
4445
+ maxLength: 64,
4446
+ description: 'The method acted on (its `id` in `list` or `signInMethods`).',
4447
+ },
4448
+ pending: {
4449
+ type: 'string',
4450
+ maxLength: 64,
4451
+ description: 'The pending change `cancel` cancels.',
4452
+ },
4453
+ signOut: {
4454
+ type: 'boolean',
4455
+ description: 'With `freeze`: also sign out everywhere.',
4456
+ },
4457
+ external: {
4458
+ type: 'ref',
4459
+ ref: 'lex:pub.techne.draft.identity.manageMethods#external',
4460
+ },
4461
+ code: {
4462
+ type: 'string',
4463
+ maxLength: 64,
4464
+ description: 'A recovery code, for `redeemCode`.',
4465
+ },
4466
+ ids: {
4467
+ type: 'array',
4468
+ maxLength: 100,
4469
+ items: {
4470
+ type: 'integer',
4471
+ },
4472
+ description: 'Notice ids, for `noticesSent`.',
4473
+ },
4474
+ emails: {
4475
+ type: 'array',
4476
+ maxLength: 10,
4477
+ items: {
4478
+ type: 'string',
4479
+ maxLength: 320,
4480
+ },
4481
+ description: "Retired, not read: a bare list has no verification dates, so the cutoff can't hold. importBackupEmails without `backupEmails` is 400 InvalidRequest.",
4482
+ },
4483
+ backupEmails: {
4484
+ type: 'array',
4485
+ maxLength: 10,
4486
+ items: {
4487
+ type: 'ref',
4488
+ ref: 'lex:pub.techne.draft.identity.manageMethods#backupEmail',
4489
+ },
4490
+ description: "importBackupEmails: the account's verified backup email addresses, all of them, each with when the PDS verified it.",
4491
+ },
4492
+ dids: {
4493
+ type: 'array',
4494
+ maxLength: 100,
4495
+ items: {
4496
+ type: 'string',
4497
+ format: 'did',
4498
+ },
4499
+ description: 'dueDeletesDone: the accounts whose PDS account was deleted.',
4500
+ },
4501
+ channel: {
4502
+ type: 'ref',
4503
+ ref: 'lex:pub.techne.draft.identity.defs#channel',
4504
+ description: 'addChannel: the email or phone the PDS just proved (a code it sent and checked).',
4505
+ },
4506
+ token: {
4507
+ type: 'string',
4508
+ maxLength: 128,
4509
+ description: "fold / link: the offer's token from addChannel.",
4510
+ },
4511
+ primary: {
4512
+ type: 'string',
4513
+ format: 'did',
4514
+ description: 'link: which of the two accounts is the primary.',
4515
+ },
4516
+ on: {
4517
+ type: 'boolean',
4518
+ description: 'setPrograms: on or off.',
4519
+ },
4520
+ program: {
4521
+ type: 'boolean',
4522
+ description: "A program made this request: a session or token the PDS's programmatic sign-in opened. Account security is refused (ProgramRefused).",
4523
+ },
4524
+ },
4525
+ },
4526
+ },
4527
+ output: {
4528
+ encoding: 'application/json',
4529
+ schema: {
4530
+ type: 'object',
4531
+ required: ['v'],
4532
+ properties: {
4533
+ v: {
4534
+ type: 'integer',
4535
+ const: 1,
4536
+ },
4537
+ status: {
4538
+ type: 'string',
4539
+ knownValues: [
4540
+ 'done',
4541
+ 'pending',
4542
+ 'deleted',
4543
+ 'deleting',
4544
+ 'bound',
4545
+ 'invalid',
4546
+ 'hasRecovery',
4547
+ 'indexOff',
4548
+ 'alreadyImported',
4549
+ 'added',
4550
+ 'alreadyYours',
4551
+ 'boundElsewhere',
4552
+ 'unavailable',
4553
+ 'folded',
4554
+ 'linked',
4555
+ 'none',
4556
+ ],
4557
+ 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.",
4558
+ },
4559
+ pending: {
4560
+ type: 'ref',
4561
+ ref: 'lex:pub.techne.draft.identity.defs#pendingChange',
4562
+ },
4563
+ method: {
4564
+ type: 'string',
4565
+ 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.",
4566
+ },
4567
+ codes: {
4568
+ type: 'array',
4569
+ items: {
4570
+ type: 'string',
4571
+ },
4572
+ description: 'newRecoveryCodes: the codes, shown once.',
4573
+ },
4574
+ methods: {
4575
+ type: 'array',
4576
+ items: {
4577
+ type: 'ref',
4578
+ ref: 'lex:pub.techne.draft.identity.defs#methodView',
4579
+ },
4580
+ },
4581
+ hasRecovery: {
4582
+ type: 'boolean',
4583
+ },
4584
+ notices: {
4585
+ type: 'array',
4586
+ items: {
4587
+ type: 'ref',
4588
+ ref: 'lex:pub.techne.draft.identity.manageMethods#notice',
4589
+ },
4590
+ },
4591
+ count: {
4592
+ type: 'integer',
4593
+ description: 'noticesSent / dueDeletesDone: how many were confirmed.',
4594
+ },
4595
+ signInMethods: {
4596
+ type: 'array',
4597
+ items: {
4598
+ type: 'ref',
4599
+ ref: 'lex:pub.techne.draft.identity.manageMethods#signInMethod',
4600
+ },
4601
+ description: "signInMethods: the account's methods that can sign in now (not frozen), oldest first.",
4602
+ },
4603
+ to: {
4604
+ type: 'ref',
4605
+ ref: 'lex:pub.techne.draft.identity.manageMethods#noticeTo',
4606
+ description: 'sendTo: where the code goes, in full.',
4607
+ },
4608
+ imported: {
4609
+ type: 'array',
4610
+ items: {
4611
+ type: 'ref',
4612
+ ref: 'lex:pub.techne.draft.identity.manageMethods#importedEmail',
4613
+ },
4614
+ description: 'importBackupEmails: each address sent, with what happened to it.',
4615
+ },
4616
+ dueDeletes: {
4617
+ type: 'array',
4618
+ items: {
4619
+ type: 'ref',
4620
+ ref: 'lex:pub.techne.draft.identity.manageMethods#dueDelete',
4621
+ },
4622
+ description: 'dueDeletes: accounts to delete on the PDS, oldest first.',
4623
+ },
4624
+ offer: {
4625
+ type: 'ref',
4626
+ ref: 'lex:pub.techne.draft.identity.finishAddMethod#offer',
4627
+ description: 'addChannel `boundElsewhere`: what `did` can do, with `fold` or `link`.',
4628
+ },
4629
+ did: {
4630
+ type: 'string',
4631
+ format: 'did',
4632
+ description: 'fold: the kept account. findKey: the account the key signs in to.',
4633
+ },
4634
+ emptied: {
4635
+ type: 'string',
4636
+ format: 'did',
4637
+ description: 'fold: the account folded in and deleted.',
4638
+ },
4639
+ link: {
4640
+ type: 'ref',
4641
+ ref: 'lex:pub.techne.draft.identity.defs#linkView',
4642
+ description: "link: the link, from `did`'s side.",
4643
+ },
4644
+ frozen: {
4645
+ type: 'boolean',
4646
+ description: "findKey: the key's method is frozen now and can't sign in.",
4647
+ },
4648
+ programs: {
4649
+ type: 'boolean',
4650
+ description: 'findKey: "Programs can sign in with this key" is on.',
4651
+ },
4652
+ operator: {
4653
+ type: 'boolean',
4654
+ description: "operator: whether `did` is one of the platform's operators.",
4655
+ },
4656
+ },
4657
+ },
4658
+ },
4659
+ errors: [
4660
+ {
4661
+ name: 'BadSignature',
4662
+ },
4663
+ {
4664
+ name: 'InvalidRequest',
4665
+ },
4666
+ {
4667
+ name: 'UnknownAccount',
4668
+ },
4669
+ {
4670
+ name: 'RateLimitExceeded',
4671
+ },
4672
+ {
4673
+ name: 'Unavailable',
4674
+ description: "Try again (`redeemCode` and `newRecoveryCodes` also while the platform's identity keys are not loaded).",
4675
+ },
4676
+ {
4677
+ name: 'NotFound',
4678
+ description: 'No such method or pending change on the account.',
4679
+ },
4680
+ {
4681
+ name: 'NotYourMethod',
4682
+ description: "The step-up names a method that is not the account's.",
4683
+ },
4684
+ {
4685
+ name: 'LastMethod',
4686
+ description: 'It would leave no way to sign in.',
4687
+ },
4688
+ {
4689
+ name: 'RecoveryProtected',
4690
+ description: 'Only a recovery method can do this to a recovery method.',
4691
+ },
4692
+ {
4693
+ name: 'NeedsRecoveryMethod',
4694
+ description: 'Needs a fresh step-up of a recovery method.',
4695
+ },
4696
+ {
4697
+ name: 'StepUpRequired',
4698
+ description: "Needs a fresh step-up (an account's first recovery mark, `newRecoveryCodes`, `fold` and `link` included).",
4699
+ },
4700
+ {
4701
+ name: 'SameMethod',
4702
+ description: 'A method cannot freeze itself.',
4703
+ },
4704
+ {
4705
+ name: 'MethodFrozen',
4706
+ 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).",
4707
+ },
4708
+ {
4709
+ name: 'InvalidToken',
4710
+ description: 'fold / link: the offer is unknown, used, expired, for the other action, or not made to `did` on this hook.',
4711
+ },
4712
+ {
4713
+ name: 'ProtectedAccount',
4714
+ 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).',
4715
+ },
4716
+ {
4717
+ name: 'NotEmpty',
4718
+ description: 'fold: the account to fold gained a record or is 7 days old or more; link instead (HTTP 409).',
4719
+ },
4720
+ {
4721
+ name: 'ProgramRefused',
4722
+ 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.',
4723
+ },
4724
+ {
4725
+ name: 'ProgramsOn',
4726
+ description: 'mark: the key has programs on; turn that off first (HTTP 409).',
4727
+ },
4728
+ {
4729
+ name: 'IsRecovery',
4730
+ description: 'setPrograms on: the method is a recovery method, or its first mark is waiting (HTTP 409).',
4731
+ },
4732
+ ],
4733
+ },
4734
+ stepUp: {
4735
+ type: 'object',
4736
+ description: "What the PDS's step-up proved.",
4737
+ required: ['method', 'provedAt'],
4738
+ properties: {
4739
+ method: {
4740
+ type: 'ref',
4741
+ ref: 'lex:pub.techne.draft.identity.manageMethods#provedMethod',
4742
+ },
4743
+ provedAt: {
4744
+ type: 'string',
4745
+ format: 'datetime',
4746
+ },
4747
+ },
4748
+ },
4749
+ external: {
4750
+ type: 'object',
4751
+ required: ['type', 'ref'],
4752
+ properties: {
4753
+ type: {
4754
+ type: 'string',
4755
+ knownValues: ['passkey', 'nostr'],
4756
+ },
4757
+ ref: {
4758
+ type: 'string',
4759
+ maxLength: 512,
4760
+ description: 'The passkey credential id, or the Nostr key (hex).',
4761
+ },
4762
+ label: {
4763
+ type: 'string',
4764
+ maxLength: 128,
4765
+ },
4766
+ },
4767
+ },
4768
+ notice: {
4769
+ type: 'object',
4770
+ required: ['id', 'did', 'event', 'to', 'createdAt'],
4771
+ properties: {
4772
+ id: {
4773
+ type: 'integer',
4774
+ },
4775
+ did: {
4776
+ type: 'string',
4777
+ format: 'did',
4778
+ },
4779
+ event: {
4780
+ type: 'string',
4781
+ knownValues: [
4782
+ 'removeMethod',
4783
+ 'deleteAccount',
4784
+ 'markRecovery',
4785
+ 'freeze',
4786
+ 'waitDropped',
4787
+ 'programsOn',
4788
+ ],
4789
+ 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`).",
4790
+ },
4791
+ to: {
4792
+ type: 'ref',
4793
+ ref: 'lex:pub.techne.draft.identity.manageMethods#noticeTo',
4794
+ },
4795
+ pending: {
4796
+ type: 'ref',
4797
+ ref: 'lex:pub.techne.draft.identity.defs#pendingChange',
4798
+ },
4799
+ createdAt: {
4800
+ type: 'string',
4801
+ format: 'datetime',
4802
+ },
4803
+ },
4804
+ },
4805
+ provedMethod: {
4806
+ type: 'object',
4807
+ required: ['type'],
4808
+ properties: {
4809
+ type: {
4810
+ type: 'string',
4811
+ knownValues: [
4812
+ 'email',
4813
+ 'phone',
4814
+ 'passkey',
4815
+ 'nostr',
4816
+ 'recoveryCodes',
4817
+ ],
4818
+ },
4819
+ value: {
4820
+ type: 'string',
4821
+ maxLength: 512,
4822
+ description: 'The email or E.164 phone, the passkey credential id, or the Nostr key (hex). None for recoveryCodes.',
4823
+ },
4824
+ },
4825
+ },
4826
+ noticeTo: {
4827
+ type: 'object',
4828
+ required: ['type', 'value'],
4829
+ properties: {
4830
+ type: {
4831
+ type: 'string',
4832
+ knownValues: ['email', 'phone', 'nostr'],
4833
+ },
4834
+ value: {
4835
+ type: 'string',
4836
+ },
4837
+ },
4838
+ },
4839
+ signInMethod: {
4840
+ type: 'object',
4841
+ 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.',
4842
+ required: ['id', 'type', 'display'],
4843
+ properties: {
4844
+ id: {
4845
+ type: 'string',
4846
+ description: "The method id (for `sendTo`, and the PDS's own passkey or Nostr challenge).",
4847
+ },
4848
+ type: {
4849
+ type: 'string',
4850
+ knownValues: ['email', 'phone', 'passkey', 'nostr'],
4851
+ },
4852
+ display: {
4853
+ type: 'string',
4854
+ },
4855
+ },
4018
4856
  },
4019
- },
4020
- },
4021
- PubTechneDraftIdentityListLinkTokens: {
4022
- lexicon: 1,
4023
- id: 'pub.techne.draft.identity.listLinkTokens',
4024
- defs: {
4025
- main: {
4026
- type: 'procedure',
4027
- description: "The caller's live links for `app` and `target`, each with its token, in no promised order. A procedure so the token never rides a URL. One call spends one of the caller's writes.",
4028
- input: {
4029
- encoding: 'application/json',
4030
- schema: {
4031
- type: 'object',
4032
- required: ['app', 'target'],
4033
- properties: {
4034
- app: {
4035
- type: 'string',
4036
- minLength: 1,
4037
- maxLength: 64,
4038
- description: 'The app the link is for, a label the caller gives itself (unverified).',
4039
- },
4040
- target: {
4041
- type: 'string',
4042
- minLength: 1,
4043
- maxLength: 2048,
4044
- description: 'What the link is for, as a URI with a scheme (at://, https://, did:...).',
4045
- },
4046
- },
4857
+ importedEmail: {
4858
+ type: 'object',
4859
+ required: ['email', 'status'],
4860
+ properties: {
4861
+ email: {
4862
+ type: 'string',
4047
4863
  },
4048
- },
4049
- output: {
4050
- encoding: 'application/json',
4051
- schema: {
4052
- type: 'object',
4053
- required: ['links'],
4054
- properties: {
4055
- links: {
4056
- type: 'array',
4057
- items: {
4058
- type: 'ref',
4059
- ref: 'lex:pub.techne.draft.identity.defs#linkTokenListed',
4060
- },
4061
- },
4062
- },
4864
+ status: {
4865
+ type: 'string',
4866
+ knownValues: [
4867
+ 'marked',
4868
+ 'boundElsewhere',
4869
+ 'released',
4870
+ 'invalid',
4871
+ 'afterCutoff',
4872
+ ],
4873
+ 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).',
4063
4874
  },
4064
4875
  },
4065
- errors: [
4066
- {
4067
- name: 'InvalidRequest',
4068
- 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.",
4876
+ description: 'One address importBackupEmails was sent, with what happened to it.',
4877
+ },
4878
+ backupEmail: {
4879
+ type: 'object',
4880
+ description: 'One backup email importBackupEmails moves, with when the PDS verified it.',
4881
+ required: ['email', 'verifiedAt'],
4882
+ properties: {
4883
+ email: {
4884
+ type: 'string',
4885
+ maxLength: 320,
4069
4886
  },
4070
- {
4071
- name: 'NotSupported',
4072
- description: "HTTP 400: the caller's account is not hosted on the platform's identity PDS, or link tokens are not configured there.",
4887
+ verifiedAt: {
4888
+ type: 'string',
4889
+ format: 'datetime',
4890
+ description: 'When the PDS verified the address. Only one verified before 2026-11-13T00:00:00Z is imported.',
4073
4891
  },
4074
- {
4075
- name: 'RateLimitExceeded',
4076
- description: 'Too many writes from this DID (HTTP 429).',
4892
+ },
4893
+ },
4894
+ dueDelete: {
4895
+ type: 'object',
4896
+ 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.',
4897
+ required: ['did', 'deletedAt'],
4898
+ properties: {
4899
+ did: {
4900
+ type: 'string',
4901
+ format: 'did',
4077
4902
  },
4078
- {
4079
- name: 'UpstreamFailure',
4080
- 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.',
4903
+ deletedAt: {
4904
+ type: 'string',
4905
+ format: 'datetime',
4906
+ description: 'When the platform deleted its side.',
4081
4907
  },
4082
- ],
4908
+ },
4083
4909
  },
4084
4910
  },
4085
4911
  },
4086
- PubTechneDraftIdentityListMethods: {
4912
+ PubTechneDraftIdentityOpenAccountPage: {
4087
4913
  lexicon: 1,
4088
- id: 'pub.techne.draft.identity.listMethods',
4914
+ id: 'pub.techne.draft.identity.openAccountPage',
4089
4915
  defs: {
4090
4916
  main: {
4091
- type: 'query',
4092
- description: "The caller's sign-in methods (masked) and the account's alias links. Signed-in members only.",
4917
+ type: 'procedure',
4918
+ 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.",
4093
4919
  output: {
4094
4920
  encoding: 'application/json',
4095
4921
  schema: {
4096
4922
  type: 'object',
4097
- required: ['methods', 'links'],
4923
+ required: ['url', 'expiresAt'],
4098
4924
  properties: {
4099
- methods: {
4100
- type: 'array',
4101
- items: {
4102
- type: 'ref',
4103
- ref: 'lex:pub.techne.draft.identity.defs#methodView',
4104
- },
4925
+ url: {
4926
+ type: 'string',
4927
+ format: 'uri',
4928
+ maxLength: 2048,
4929
+ description: 'Open it once, before expiresAt.',
4105
4930
  },
4106
- links: {
4107
- type: 'array',
4108
- items: {
4109
- type: 'ref',
4110
- ref: 'lex:pub.techne.draft.identity.defs#linkView',
4111
- },
4931
+ expiresAt: {
4932
+ type: 'string',
4933
+ format: 'datetime',
4112
4934
  },
4113
4935
  },
4114
4936
  },
@@ -4118,106 +4940,27 @@ export const schemaDict = {
4118
4940
  name: 'AuthenticationRequired',
4119
4941
  description: 'No signed-in caller.',
4120
4942
  },
4121
- ],
4122
- },
4123
- },
4124
- },
4125
- PubTechneDraftIdentityListPhoneHolds: {
4126
- lexicon: 1,
4127
- id: 'pub.techne.draft.identity.listPhoneHolds',
4128
- defs: {
4129
- main: {
4130
- type: 'query',
4131
- 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.',
4132
- parameters: {
4133
- type: 'params',
4134
- required: ['actAs'],
4135
- properties: {
4136
- actAs: {
4137
- type: 'string',
4138
- format: 'did',
4139
- },
4140
- alsoActAs: {
4141
- type: 'array',
4142
- maxLength: 99,
4143
- description: 'More accounts whose holds to list in the same call, after `actAs` (repeat the parameter).',
4144
- items: {
4145
- type: 'string',
4146
- format: 'did',
4147
- },
4148
- },
4149
- },
4150
- },
4151
- output: {
4152
- encoding: 'application/json',
4153
- schema: {
4154
- type: 'object',
4155
- required: ['holds'],
4156
- properties: {
4157
- holds: {
4158
- type: 'array',
4159
- items: {
4160
- type: 'ref',
4161
- ref: 'lex:pub.techne.draft.identity.listPhoneHolds#holdView',
4162
- },
4163
- },
4164
- },
4165
- },
4166
- },
4167
- errors: [
4168
4943
  {
4169
- name: 'InvalidRequest',
4170
- description: 'HTTP 400: `actAs` or one of `alsoActAs` is not a DID, or more than 99 `alsoActAs`.',
4944
+ name: 'NotAuthorized',
4945
+ description: "The caller's bearer token is neither a device session nor an agent token, such as an app's OAuth token (HTTP 403).",
4171
4946
  },
4172
4947
  {
4173
- name: 'Forbidden',
4174
- description: 'HTTP 403: the caller may not write as `actAs` (with `alsoActAs`: as any of them).',
4175
- },
4176
- ],
4177
- },
4178
- holdView: {
4179
- type: 'object',
4180
- required: ['id', 'askedBy', 'collection', 'record', 'createdAt'],
4181
- properties: {
4182
- id: {
4183
- type: 'string',
4184
- },
4185
- actAs: {
4186
- type: 'string',
4187
- format: 'did',
4188
- description: 'The account the hold would write as.',
4189
- },
4190
- askedBy: {
4191
- type: 'string',
4192
- format: 'did',
4193
- },
4194
- app: {
4195
- type: 'string',
4196
- },
4197
- collection: {
4198
- type: 'string',
4199
- format: 'nsid',
4200
- },
4201
- rkey: {
4202
- type: 'string',
4203
- description: 'The record key template.',
4204
- },
4205
- space: {
4206
- type: 'string',
4948
+ name: 'ProgramRefused',
4949
+ description: "The caller is an agent token or a program's token: neither opens the account page (HTTP 403).",
4207
4950
  },
4208
- record: {
4209
- type: 'unknown',
4210
- description: 'The record template, slots unfilled.',
4951
+ {
4952
+ name: 'NotFound',
4953
+ 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.',
4211
4954
  },
4212
- createdAt: {
4213
- type: 'string',
4214
- format: 'datetime',
4955
+ {
4956
+ name: 'RateLimitExceeded',
4957
+ description: 'Too many links for this account (HTTP 429).',
4215
4958
  },
4216
- name: {
4217
- type: 'string',
4218
- 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.",
4959
+ {
4960
+ name: 'Unavailable',
4961
+ description: 'The PDS did not answer (HTTP 502). Open the account page without a link.',
4219
4962
  },
4220
- },
4963
+ ],
4221
4964
  },
4222
4965
  },
4223
4966
  },
@@ -4438,7 +5181,7 @@ export const schemaDict = {
4438
5181
  defs: {
4439
5182
  main: {
4440
5183
  type: 'procedure',
4441
- description: "A PDS's identity-resolver hook: which account, if any, a verified channel is bound to. Asked after the PDS has verified a one-time code for the channel and before it creates any account. Authenticated only by the `epds-signature` header (HMAC-SHA256 over `<t>\\n req\\n <path>\\n <body>` with the PDS's hook secret); no session, OAuth or service token is accepted. The response carries its own `epds-signature` (direction `res`), and a caller treats an unsigned or badly signed response as a failure. `bound` carries `did` only when the calling PDS hosts that account; otherwise the PDS must not create an account. `unavailable` (the account is deleted or taken down, or the issuer is not endorsed) never leads to creation.",
5184
+ description: "A PDS's identity-resolver hook: which account, if any, a verified channel is bound to. Asked after the PDS has verified a one-time code for the channel and before it creates any account. Authenticated only by the `epds-signature` header (HMAC-SHA256 over `<t>\\n req\\n <path>\\n <body>` with the PDS's hook secret); no session, OAuth or service token is accepted. The response carries its own `epds-signature` (direction `res`), and a caller treats an unsigned or badly signed response as a failure. `bound` carries `did` only when the calling PDS hosts that account; otherwise the PDS must not create an account. `unavailable` (the account is deleted or taken down, or the issuer is not endorsed) never leads to creation. `unbound` with `released` names a phone number its account removed: see `released`.",
4442
5185
  input: {
4443
5186
  encoding: 'application/json',
4444
5187
  schema: {
@@ -4479,6 +5222,30 @@ export const schemaDict = {
4479
5222
  format: 'did',
4480
5223
  description: 'Present only with `bound`, and only when the calling PDS hosts the account.',
4481
5224
  },
5225
+ released: {
5226
+ type: 'boolean',
5227
+ description: 'Present (true) only with `unbound`: the phone number was removed from an account (identity.unlinkMethod) and nobody has bound it since. The PDS must not sign the number in to an account it kept for it before (a placeholder from an earlier sign-in); it starts a new account instead. Email channels never carry it.',
5228
+ },
5229
+ releasedFrom: {
5230
+ type: 'string',
5231
+ format: 'did',
5232
+ 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`).",
5233
+ },
5234
+ frozen: {
5235
+ type: 'boolean',
5236
+ 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.",
5237
+ },
5238
+ frozenUntil: {
5239
+ type: 'string',
5240
+ format: 'datetime',
5241
+ description: 'Present only with `frozen`: when the freeze ends, unless a recovery method lifts it sooner.',
5242
+ },
5243
+ releaseId: {
5244
+ type: 'string',
5245
+ minLength: 1,
5246
+ maxLength: 64,
5247
+ description: "Present only with `releasedFrom`: the platform's id for that removal, fresh each time the number is removed. A PDS keys the number's next holder's account on `releasedFrom` and `releaseId` together, so an account that later removed the number itself is never handed on to the holder after it.",
5248
+ },
4482
5249
  },
4483
5250
  },
4484
5251
  },
@@ -4604,7 +5371,7 @@ export const schemaDict = {
4604
5371
  defs: {
4605
5372
  main: {
4606
5373
  type: 'procedure',
4607
- 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. Refused for the account's last method.",
5374
+ 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.",
4608
5375
  input: {
4609
5376
  encoding: 'application/json',
4610
5377
  schema: {
@@ -4627,6 +5394,14 @@ export const schemaDict = {
4627
5394
  ok: {
4628
5395
  type: 'boolean',
4629
5396
  },
5397
+ status: {
5398
+ type: 'string',
5399
+ knownValues: ['pending'],
5400
+ },
5401
+ pending: {
5402
+ type: 'ref',
5403
+ ref: 'lex:pub.techne.draft.identity.defs#pendingChange',
5404
+ },
4630
5405
  },
4631
5406
  },
4632
5407
  },
@@ -4641,7 +5416,11 @@ export const schemaDict = {
4641
5416
  },
4642
5417
  {
4643
5418
  name: 'LastMethod',
4644
- description: "It is the account's only sign-in method.",
5419
+ description: "It is the account's only sign-in method (counting those already waiting to be removed).",
5420
+ },
5421
+ {
5422
+ name: 'RecoveryProtected',
5423
+ description: 'It is a recovery method; only a recovery method removes it (identity.manageMethods).',
4645
5424
  },
4646
5425
  ],
4647
5426
  },
@@ -4869,7 +5648,7 @@ export const schemaDict = {
4869
5648
  addedBy: {
4870
5649
  type: 'string',
4871
5650
  format: 'did',
4872
- description: "The member on whose initiative the authority authored this claim. Attribution DATA carried in the claim body — stamped by the handler from the authenticated caller who passed the space's `manage` check, NEVER client-supplied, and read by NO policy predicate (the boundedness invariant is untouched: nothing evaluates access from this field). Meant for in-space (permissioned) rosters only; a firehose membership claim's `addedBy` would publish \"who recruited whom\" as a new world-readable social edge with no surface asking anyone's consent for that, so no PUBLIC-collective writer stamps it. Stamped by `proposeInvite` (`xrpc/invite.rs`) on in-space rosters only — carried forward from the pending claim at bind, never re-derived; never on a firehose claim. CAVEAT: deriving meaning from this field's ABSENCE would be fragile — any legacy or imported claim satisfies \"absent addedBy\" without having founded anything — so a future reader must not lean on absence; the intended fix, the day one is needed, is a positive `founder` marker, not stronger inference over this field's absence.",
5651
+ description: "The member on whose initiative the authority authored this claim. Attribution DATA carried in the claim body, read by NO policy predicate (the boundedness invariant is untouched: nothing evaluates access from this field). Who sets it: whoever writes the claim with the authority's pen. A writer holding only the write leg of a circle's member space (role 20-29, who may write adds and their own claim, nothing else) must name themselves or nobody on an add, and a re-put of their own claim keeps the stored value. A writer holding manage may put any DID here (the platform checks only that it is a DID); `proposeInvite` (`xrpc/invite.rs`) stamps the caller who passed `manage` and carries it forward from the pending claim at bind. A circle founder's own claim names themself (\"Started by\"); a collective made with identity.createCollective writes its founder's claim without addedBy. Meant for in-space (permissioned) rosters only; a firehose membership claim's `addedBy` would publish \"who recruited whom\" as a new world-readable social edge with no surface asking anyone's consent for that, so no PUBLIC-collective writer stamps it. CAVEAT: deriving meaning from this field's ABSENCE would be fragile (any legacy or imported claim satisfies \"absent addedBy\" without having founded anything), so a reader must not lean on absence; the intended fix, the day one is needed, is a positive `founder` marker.",
4873
5652
  },
4874
5653
  createdAt: {
4875
5654
  type: 'string',
@@ -5129,11 +5908,11 @@ export const schemaDict = {
5129
5908
  PubTechneDraftPermissionedDeleteRecord: {
5130
5909
  lexicon: 1,
5131
5910
  id: 'pub.techne.draft.permissioned.deleteRecord',
5132
- description: "Delete a record from the caller's own repo (a takedown, a mistake, or a `share` the owner withdraws, which stops that reader's future reads, with a 'revoke-read' receipt once no share in its source space names it). 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), or a collective the caller made that has nothing placed yet (for at most a day), else Forbidden; a caller whose account is being deleted, or is deleted, is refused (AccountDeleting). The body is removed; a tombstone receipt stays in listChanges, in the space the record counted in, so readers drop their copies. Deleting a record that does not exist is a no-op unless swapCid is given (then it is InvalidSwap). 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 2 MiB (2,097,152 bytes; it is not read past that); 415 for one not sent as application/json; 400 for one that is not JSON; 422 for JSON that is not the input (a field missing or of the wrong type). Such a refused write still spends one of the caller's writes (RateLimitExceeded). When the call's token carries space scopes from Techne's ePDS, the delete must name its `space`, and one the scopes do not cover is refused 403 Forbidden. Draft tier.",
5911
+ description: "Delete a record from the caller's own repo (a takedown, a mistake, or a `share` the owner withdraws, which stops that reader's future reads, with a 'revoke-read' receipt once no share in its source space names it). 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; a caller whose account is being deleted, or is deleted, is refused (AccountDeleting). The body is removed; a tombstone receipt stays in listChanges, in the space the record counted in, so readers drop their copies. Deleting a record that does not exist is a no-op unless swapCid is given (then it is InvalidSwap) or the delete names an app's space the caller may not delete in (then it is Forbidden). 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 2 MiB (2,097,152 bytes; it is not read past that); 415 for one not sent as application/json; 400 for one that is not JSON; 422 for JSON that is not the input (a field missing or of the wrong type). Such a refused write still spends one of the caller's writes (RateLimitExceeded). When the call's token carries space scopes from Techne's ePDS, the delete must name its `space`, and one the scopes do not cover is refused 403 Forbidden. A record written for an app's space (a pub.techne.draft.space.private space) is deleted only by the app its key names or a caller whose `space:` scopes cover a delete there; any other caller is refused 403 Forbidden and nothing is deleted, the record's own writer included when the record counted in no space, and even when nothing is at the key. That includes a session or agent token that names no app or another app (an agent token without `space:` scopes, a session cookie or device session minted for another app), so such a record is changed only by its app or under a grant covering it. Draft tier.",
5133
5912
  defs: {
5134
5913
  main: {
5135
5914
  type: 'procedure',
5136
- description: "Delete one of your own permissioned records (or a collective's or circle's whose own member space you manage). One key holds one record per space: `space` names which goes; without it, the key's one record, Conflict when there are several. A tombstone stays in listChanges so readers drop their copies. Deleting a missing record is a no-op unless swapCid is given (InvalidSwap). When the call's token carries space scopes from Techne's ePDS, the delete must name its `space`, and one the scopes do not cover is refused 403 Forbidden. Draft tier.",
5915
+ description: "Delete one of your own permissioned records (or a collective's or circle's whose own member space you manage). One key holds one record per space: `space` names which goes; without it, the key's one record, Conflict when there are several. A tombstone stays in listChanges so readers drop their copies. Deleting a missing record is a no-op unless swapCid is given (InvalidSwap), or it names an app's space the caller may not delete in (Forbidden). When the call's token carries space scopes from Techne's ePDS, the delete must name its `space`, and one the scopes do not cover is refused 403 Forbidden. A record written for an app's space is deleted only by the app its key names or under `space:` scopes covering it: anyone else, its writer included, is 403 Forbidden. Draft tier.",
5137
5916
  input: {
5138
5917
  encoding: 'application/json',
5139
5918
  schema: {
@@ -5187,7 +5966,11 @@ export const schemaDict = {
5187
5966
  },
5188
5967
  {
5189
5968
  name: 'Forbidden',
5190
- description: "HTTP 403. repo is not the caller's own.",
5969
+ 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); or the call's `space:` scopes do not cover the delete; or the record was written for an app's space (pub.techne.draft.space.private) and the caller is neither the app its key names nor holds `space:` scopes covering a delete there. Nothing is deleted.",
5970
+ },
5971
+ {
5972
+ name: 'LastManager',
5973
+ 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.',
5191
5974
  },
5192
5975
  {
5193
5976
  name: 'AccountDeleting',
@@ -5562,11 +6345,11 @@ export const schemaDict = {
5562
6345
  PubTechneDraftPermissionedPutRecord: {
5563
6346
  lexicon: 1,
5564
6347
  id: 'pub.techne.draft.permissioned.putRecord',
5565
- description: "Write a record into the caller's own repo, as a permissioned record (the generic private write). 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), or a collective the caller made that has nothing placed yet (for at most a day), else Forbidden: a record is only ever written into its writer's repo. There is no write gate and no collection check: any collection may be written, for any space. A write is never refused for its space. One collection is refused there: one of the platform's own record types named for an app's space (pub.techne.draft.space.private) is refused as InvalidRequest, since our own types keep their declared homes (the adopted community.lexicon.calendar.event and .rsvp are not refused there: they are the app's own data, and an RSVP there projects no claim). Otherwise what it counts for is the managing app's admission of the version as it is written: the record counts in the `space` it names only when that space's write policy admits the writer and, for a collection with a published lexicon, the space type declares the collection; it is then read by whoever the space's read policy admits. A record for a pub.techne.draft.space.private space counts there only when written by the app its key names (the managing app); written by any other app it is stored and counts in no space (the output has no `space`). Otherwise it is stored in the writer's repo, counts in no space, and only its writer reads it; write it again to ask again. A write into a space whose authority's account is being deleted, or is deleted, is stored the same way and counts in no space (the space goes with that account). A caller whose own account is being deleted, or is deleted, is refused (AccountDeleting). The output's `space` says where it counts. A source keeps what it does not publish in its own pub.techne.draft.space.source (at://{source}/pub.techne.draft.space.source/self): its permissioned descriptions, the `share`s naming its readers (writing one admits its subject, who gets a 'granted' receipt; deleting the last one naming a reader gives a 'revoke-read'. A share keeps one space per key, so it is never moved out of the space: writing it for another space is refused as Conflict), and a scraper's raw payloads and crawl state. A body in a collection with a published lexicon must satisfy it (InvalidRequest otherwise); any other collection is stored as written. Writing the current version again for the same space records no new version: if it counts there it is a no-op; if it was not admitted, admission is asked again, and a version admitted now is placed in the space with a receipt. 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 2 MiB (2,097,152 bytes; it is not read past that); 415 for one not sent as application/json; 400 for one that is not JSON; 422 for JSON that is not the input (a field missing or of the wrong type). Such a refused write still spends one of the caller's writes (RateLimitExceeded). When the call's token carries space scopes from Techne's ePDS, a write to a space they do not cover is refused 403 Forbidden. `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.",
6348
+ description: "Write a record into the caller's own repo, as a permissioned record (the generic private write). 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: a record is only ever written into its writer's repo. There is no write gate on a first write and no collection check: any collection may be written, for any space, and a first write is never refused for its space. Replacing a record already written for an app's space (a pub.techne.draft.space.private space) is: only the app its key names, or a caller whose `space:` scopes cover a put there, may replace it; any other caller is refused 403 Forbidden and nothing is written, the record's own writer included when the record counted in no space. That includes a session or agent token that names no app or another app (an agent token without `space:` scopes, a session cookie or device session minted for another app), so such a record is changed only by its app or under a grant covering it. One collection is refused there: one of the platform's own record types named for an app's space (pub.techne.draft.space.private) is refused as InvalidRequest, since our own types keep their declared homes (the adopted community.lexicon.calendar.event and .rsvp are not refused there: they are the app's own data, and an RSVP there projects no claim). Otherwise what it counts for is the managing app's admission of the version as it is written: the record counts in the `space` it names only when that space's write policy admits the writer and, for a collection with a published lexicon, the space type declares the collection; it is then read by whoever the space's read policy admits. A record for a pub.techne.draft.space.private space counts there only when written by the app its key names (the managing app) or by a caller whose `space:` scopes cover that space; written by anyone else it is stored and counts in no space (the output has no `space`). Otherwise it is stored in the writer's repo, counts in no space, and only its writer reads it; write it again to ask again (for an app's space only the callers that may replace a record there can). A write into a space whose authority's account is being deleted, or is deleted, is stored the same way and counts in no space (the space goes with that account). A caller whose own account is being deleted, or is deleted, is refused (AccountDeleting). The output's `space` says where it counts. A source keeps what it does not publish in its own pub.techne.draft.space.source (at://{source}/pub.techne.draft.space.source/self): its permissioned descriptions, the `share`s naming its readers (writing one admits its subject, who gets a 'granted' receipt; deleting the last one naming a reader gives a 'revoke-read'. A share keeps one space per key, so it is never moved out of the space: writing it for another space is refused as Conflict), and a scraper's raw payloads and crawl state. A body in a collection with a published lexicon must satisfy it (InvalidRequest otherwise); any other collection is stored as written. Writing the current version again for the same space records no new version: if it counts there it is a no-op; if it was not admitted, admission is asked again, and a version admitted now is placed in the space with a receipt. In an app's space this holds only for the callers that may replace a record there; anyone else's write of the same version is refused Forbidden. 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 2 MiB (2,097,152 bytes; it is not read past that); 415 for one not sent as application/json; 400 for one that is not JSON; 422 for JSON that is not the input (a field missing or of the wrong type). Such a refused write still spends one of the caller's writes (RateLimitExceeded). When the call's token carries space scopes from Techne's ePDS, a write to a space they do not cover is refused 403 Forbidden. `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.",
5566
6349
  defs: {
5567
6350
  main: {
5568
6351
  type: 'procedure',
5569
- description: "Write one record into your own repo (or a collective's or circle's whose own member space you manage) as a permissioned record, for the `space` it names (required: no space is InvalidRequest; public records go through com.atproto.repo.putRecord, and a record only you read goes in your space.personal). Any collection; a body of a collection with a published lexicon must satisfy it. It counts in that space only when the space's write policy admits you (and, for one of our own types, the space type declares the collection); otherwise it is stored and only you read it. A write is never refused for its space. A pub.techne.draft.space.private record counts there only when written by the app its key names; else it counts in no space. The output's `space` says where it counts. Writing the current version again is a no-op. One write of your rate (RateLimitExceeded). A token with space scopes from Techne's ePDS: a write to a space they do not cover is 403 Forbidden. Draft tier.",
6352
+ description: "Write one record into your own repo (or a collective's or circle's whose own member space you manage; a circle member holding only its write leg writes membership adds and their own claim) as a permissioned record, for the `space` it names (required: no space is InvalidRequest; public records go through com.atproto.repo.putRecord, and a record only you read goes in your space.personal). Any collection; a body of a collection with a published lexicon must satisfy it. It counts in that space only when the space's write policy admits you (and, for one of our own types, the space type declares the collection); otherwise it is stored and only you read it. A first write is never refused for its space. A pub.techne.draft.space.private record counts there only when written by the app its key names (or under `space:` scopes covering it); else it counts in no space. Replacing a record already written there needs that app or those scopes: anyone else, its writer included, is 403 Forbidden. The output's `space` says where it counts. Writing the current version again is a no-op (in an app's space, only for that app or under covering scopes; else Forbidden). One write of your rate (RateLimitExceeded). A token with space scopes from Techne's ePDS: a write to a space they do not cover is 403 Forbidden. Draft tier.",
5570
6353
  input: {
5571
6354
  encoding: 'application/json',
5572
6355
  schema: {
@@ -5648,7 +6431,11 @@ export const schemaDict = {
5648
6431
  },
5649
6432
  {
5650
6433
  name: 'Forbidden',
5651
- description: "HTTP 403. repo is not the caller's own.",
6434
+ 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); or the call's `space:` scopes do not cover the write; or the write replaces a record already written for an app's space (pub.techne.draft.space.private) and the caller is neither the app its key names nor holds `space:` scopes covering a put there. A first write is never refused for its space. Nothing is written.",
6435
+ },
6436
+ {
6437
+ name: 'LastManager',
6438
+ 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.',
5652
6439
  },
5653
6440
  {
5654
6441
  name: 'AccountDeleting',
@@ -5685,11 +6472,11 @@ export const schemaDict = {
5685
6472
  PubTechneDraftPermissionedPutRecords: {
5686
6473
  lexicon: 1,
5687
6474
  id: 'pub.techne.draft.permissioned.putRecords',
5688
- 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), 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, 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. `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.",
6475
+ 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.",
5689
6476
  defs: {
5690
6477
  main: {
5691
6478
  type: 'procedure',
5692
- 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. Space scopes and space.private apply to each write as in putRecord. Every write names its `space` (a write with none refuses the whole call, InvalidRequest; public records go through com.atproto.repo.putRecord). Draft tier.",
6479
+ 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.",
5693
6480
  input: {
5694
6481
  encoding: 'application/json',
5695
6482
  schema: {
@@ -5742,7 +6529,11 @@ export const schemaDict = {
5742
6529
  },
5743
6530
  {
5744
6531
  name: 'Forbidden',
5745
- description: "HTTP 403. repo is not the caller's own. Nothing is written.",
6532
+ 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.",
6533
+ },
6534
+ {
6535
+ name: 'LastManager',
6536
+ 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.',
5746
6537
  },
5747
6538
  {
5748
6539
  name: 'AccountDeleting',
@@ -5829,13 +6620,15 @@ export const schemaDict = {
5829
6620
  properties: {
5830
6621
  error: {
5831
6622
  type: 'string',
5832
- 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) or DuplicatePhone (a contact write introduces a number another of the caller's active contacts carries; see putRecord).",
6623
+ 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).",
5833
6624
  knownValues: [
5834
6625
  'InvalidRequest',
5835
6626
  'InvalidSwap',
5836
6627
  'Conflict',
5837
6628
  'IdentityConflict',
5838
6629
  'DuplicatePhone',
6630
+ 'RateLimitExceeded',
6631
+ 'Forbidden',
5839
6632
  ],
5840
6633
  },
5841
6634
  message: {
@@ -7596,7 +8389,7 @@ export const schemaDict = {
7596
8389
  defs: {
7597
8390
  main: {
7598
8391
  type: 'procedure',
7599
- 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.",
8392
+ 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.",
7600
8393
  input: {
7601
8394
  encoding: 'application/json',
7602
8395
  schema: {
@@ -7655,13 +8448,21 @@ export const schemaDict = {
7655
8448
  description: 'Blocking is a signed-in act.',
7656
8449
  },
7657
8450
  {
7658
- name: 'Forbidden',
7659
- description: 'The caller is not an operator of this platform.',
8451
+ name: 'NotAuthorized',
8452
+ description: 'The caller is not an operator of this platform, or the call does not carry the moderate scope (HTTP 403).',
8453
+ },
8454
+ {
8455
+ name: 'ProgramRefused',
8456
+ description: "The caller is a program's token: a program never reaches an operator method (HTTP 403).",
7660
8457
  },
7661
8458
  {
7662
8459
  name: 'UnknownType',
7663
8460
  description: '`nsid` names no community or requested type (our own types are not limited).',
7664
8461
  },
8462
+ {
8463
+ name: 'InvalidRequest',
8464
+ description: '`reason` is blank or over 1000 characters, or `author` is not a DID (HTTP 400).',
8465
+ },
7665
8466
  ],
7666
8467
  },
7667
8468
  },
@@ -8281,7 +9082,7 @@ export const schemaDict = {
8281
9082
  defs: {
8282
9083
  main: {
8283
9084
  type: 'procedure',
8284
- 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.",
9085
+ 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.",
8285
9086
  input: {
8286
9087
  encoding: 'application/json',
8287
9088
  schema: {
@@ -8331,13 +9132,21 @@ export const schemaDict = {
8331
9132
  description: 'Purging is a signed-in act.',
8332
9133
  },
8333
9134
  {
8334
- name: 'Forbidden',
8335
- description: 'The caller is not an operator of this platform.',
9135
+ name: 'NotAuthorized',
9136
+ description: 'The caller is not an operator of this platform, or the call does not carry the moderate scope (HTTP 403).',
9137
+ },
9138
+ {
9139
+ name: 'ProgramRefused',
9140
+ description: "The caller is a program's token: a program never reaches an operator method (HTTP 403).",
8336
9141
  },
8337
9142
  {
8338
9143
  name: 'UnknownType',
8339
9144
  description: '`nsid` names no community or requested type (our own types cannot be purged).',
8340
9145
  },
9146
+ {
9147
+ name: 'InvalidRequest',
9148
+ description: '`reason` is blank or over 1000 characters (HTTP 400).',
9149
+ },
8341
9150
  ],
8342
9151
  },
8343
9152
  },
@@ -8489,7 +9298,7 @@ export const schemaDict = {
8489
9298
  PubTechneDraftRsvpNote: {
8490
9299
  lexicon: 1,
8491
9300
  id: 'pub.techne.draft.rsvpNote',
8492
- description: "A short note a person writes with their response to a beacon (\"running 15 late\"). Authored by the responder, rkey = the rkey of the responder's own community.lexicon.calendar.rsvp, so there is at most one note per response and an edit is a re-put. Placed ONLY in the beacon's pub.techne.draft.space.beacon, beside the RSVP it annotates, so it has exactly the RSVP's audience. A separate record rather than a field on the community RSVP, which we adopt and never extend.",
9301
+ description: "A short note a person writes with their response to a beacon (\"running 15 late\"). Authored by the responder, rkey = the rkey of the responder's own community.lexicon.calendar.rsvp, so there is at most one note per response and an edit is a re-put. Placed beside the RSVP it annotates, so it has exactly the RSVP's audience: in the beacon's pub.techne.draft.space.beacon for a going or interested answer, or in the responder's own pub.techne.draft.space.beaconDecline for a #notgoing one; when the answer changes it moves with the RSVP into the beaconDecline space, and is deleted when the answer leaves that space (never re-published to the beacon's audience). A separate record rather than a field on the community RSVP, which we adopt and never extend.",
8493
9302
  defs: {
8494
9303
  main: {
8495
9304
  type: 'record',
@@ -8912,6 +9721,12 @@ export const schemaDict = {
8912
9721
  maxGraphemes: 100,
8913
9722
  description: 'The line, as plain text.',
8914
9723
  },
9724
+ emoji: {
9725
+ type: 'string',
9726
+ maxGraphemes: 1,
9727
+ maxLength: 64,
9728
+ description: 'Optional: one emoji for the record (a card mark and map pin glyph). A single emoji, no flags; readers fall back to their own when absent.',
9729
+ },
8915
9730
  createdAt: {
8916
9731
  type: 'string',
8917
9732
  format: 'datetime',
@@ -10520,6 +11335,7 @@ export const ids = {
10520
11335
  PubTechneDraftIdentityAccountsForPhones: 'pub.techne.draft.identity.accountsForPhones',
10521
11336
  PubTechneDraftIdentityAttest: 'pub.techne.draft.identity.attest',
10522
11337
  PubTechneDraftIdentityBeginAddMethod: 'pub.techne.draft.identity.beginAddMethod',
11338
+ PubTechneDraftIdentityCancelPendingChange: 'pub.techne.draft.identity.cancelPendingChange',
10523
11339
  PubTechneDraftIdentityCheckLinkToken: 'pub.techne.draft.identity.checkLinkToken',
10524
11340
  PubTechneDraftIdentityCreateCollective: 'pub.techne.draft.identity.createCollective',
10525
11341
  PubTechneDraftIdentityCreateLinkToken: 'pub.techne.draft.identity.createLinkToken',
@@ -10534,6 +11350,8 @@ export const ids = {
10534
11350
  PubTechneDraftIdentityListLinkTokens: 'pub.techne.draft.identity.listLinkTokens',
10535
11351
  PubTechneDraftIdentityListMethods: 'pub.techne.draft.identity.listMethods',
10536
11352
  PubTechneDraftIdentityListPhoneHolds: 'pub.techne.draft.identity.listPhoneHolds',
11353
+ PubTechneDraftIdentityManageMethods: 'pub.techne.draft.identity.manageMethods',
11354
+ PubTechneDraftIdentityOpenAccountPage: 'pub.techne.draft.identity.openAccountPage',
10537
11355
  PubTechneDraftIdentityRedeemLinkToken: 'pub.techne.draft.identity.redeemLinkToken',
10538
11356
  PubTechneDraftIdentityReleasePhoneHold: 'pub.techne.draft.identity.releasePhoneHold',
10539
11357
  PubTechneDraftIdentityResetLinkToken: 'pub.techne.draft.identity.resetLinkToken',