@flipstream/sdk 0.15.0 → 0.16.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 (98) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/dist/api/datasets.js +8 -8
  3. package/dist/api/datasets.js.map +1 -1
  4. package/dist/api/log.js +6 -10
  5. package/dist/api/log.js.map +1 -1
  6. package/dist/api/pathArgument.d.ts +7 -0
  7. package/dist/api/pathArgument.js +12 -0
  8. package/dist/api/pathArgument.js.map +1 -0
  9. package/dist/first-party/attempts.d.ts +1 -1
  10. package/dist/first-party/authProxyMark.d.ts +5 -2
  11. package/dist/first-party/authProxyMark.js +5 -2
  12. package/dist/first-party/authProxyMark.js.map +1 -1
  13. package/dist/first-party/calls/consent.d.ts +30 -18
  14. package/dist/first-party/calls/consent.js.map +1 -1
  15. package/dist/first-party/calls/device.d.ts +42 -20
  16. package/dist/first-party/calls/device.js.map +1 -1
  17. package/dist/first-party/calls/invitation.d.ts +99 -53
  18. package/dist/first-party/calls/invitation.js +23 -5
  19. package/dist/first-party/calls/invitation.js.map +1 -1
  20. package/dist/first-party/calls/logIn.d.ts +30 -10
  21. package/dist/first-party/calls/logIn.js.map +1 -1
  22. package/dist/first-party/calls/reset.d.ts +4 -1
  23. package/dist/first-party/calls/reset.js.map +1 -1
  24. package/dist/first-party/calls/signUp.d.ts +1 -1
  25. package/dist/first-party/calls/signUp.js +1 -1
  26. package/dist/first-party/calls/signUp.js.map +1 -1
  27. package/dist/first-party/calls/twoStepSetup.d.ts +28 -5
  28. package/dist/first-party/calls/twoStepSetup.js.map +1 -1
  29. package/dist/first-party/entry.d.ts +223 -199
  30. package/dist/first-party/entry.js +21 -19
  31. package/dist/first-party/entry.js.map +1 -1
  32. package/dist/first-party/hooks.d.ts +22 -7
  33. package/dist/first-party/hooks.js.map +1 -1
  34. package/dist/first-party/linkToken.d.ts +2 -3
  35. package/dist/first-party/linkToken.js +2 -3
  36. package/dist/first-party/linkToken.js.map +1 -1
  37. package/dist/first-party/links.d.ts +3 -3
  38. package/dist/first-party/links.js +4 -4
  39. package/dist/first-party/links.js.map +1 -1
  40. package/dist/first-party/proxy/app.d.ts +15 -8
  41. package/dist/first-party/proxy/app.js.map +1 -1
  42. package/dist/first-party/proxy/cases.d.ts +34 -17
  43. package/dist/first-party/proxy/cases.js +2 -3
  44. package/dist/first-party/proxy/cases.js.map +1 -1
  45. package/dist/first-party/proxy/decide.d.ts +6 -4
  46. package/dist/first-party/proxy/decide.js +2 -3
  47. package/dist/first-party/proxy/decide.js.map +1 -1
  48. package/dist/first-party/proxy/headers.d.ts +2 -3
  49. package/dist/first-party/proxy/headers.js.map +1 -1
  50. package/dist/first-party/proxy/pass-back.d.ts +14 -9
  51. package/dist/first-party/proxy/pass-back.js +2 -6
  52. package/dist/first-party/proxy/pass-back.js.map +1 -1
  53. package/dist/first-party/proxy/paths.d.ts +5 -7
  54. package/dist/first-party/proxy/paths.js +5 -7
  55. package/dist/first-party/proxy/paths.js.map +1 -1
  56. package/dist/first-party/proxy/stand-in.d.ts +2 -0
  57. package/dist/first-party/proxy/stand-in.js +28 -5
  58. package/dist/first-party/proxy/stand-in.js.map +1 -1
  59. package/dist/first-party/report.d.ts +20 -11
  60. package/dist/first-party/report.js.map +1 -1
  61. package/dist/first-party/result.d.ts +86 -18
  62. package/dist/first-party/result.js.map +1 -1
  63. package/dist/first-party/session/cell.d.ts +29 -5
  64. package/dist/first-party/session/cell.js +16 -2
  65. package/dist/first-party/session/cell.js.map +1 -1
  66. package/dist/first-party/session/closed.d.ts +6 -3
  67. package/dist/first-party/session/closed.js +6 -3
  68. package/dist/first-party/session/closed.js.map +1 -1
  69. package/dist/first-party/session/logout.d.ts +25 -5
  70. package/dist/first-party/session/logout.js +241 -43
  71. package/dist/first-party/session/logout.js.map +1 -1
  72. package/dist/first-party/session/owed.d.ts +85 -10
  73. package/dist/first-party/session/owed.js +111 -10
  74. package/dist/first-party/session/owed.js.map +1 -1
  75. package/dist/first-party/session/refresh.js +13 -6
  76. package/dist/first-party/session/refresh.js.map +1 -1
  77. package/dist/first-party/session/session.js +3 -6
  78. package/dist/first-party/session/session.js.map +1 -1
  79. package/dist/first-party/session/shared.js +49 -8
  80. package/dist/first-party/session/shared.js.map +1 -1
  81. package/dist/first-party/session/signIn.d.ts +10 -5
  82. package/dist/first-party/session/signIn.js +56 -10
  83. package/dist/first-party/session/signIn.js.map +1 -1
  84. package/dist/first-party/session/signInThrough.d.ts +2 -1
  85. package/dist/first-party/session/signInThrough.js +67 -18
  86. package/dist/first-party/session/signInThrough.js.map +1 -1
  87. package/dist/first-party/session/sync.js +39 -8
  88. package/dist/first-party/session/sync.js.map +1 -1
  89. package/dist/first-party/signInHooks.d.ts +43 -15
  90. package/dist/first-party/state.d.ts +20 -0
  91. package/dist/first-party/state.js +3 -0
  92. package/dist/first-party/state.js.map +1 -1
  93. package/dist/flipstream.d.ts +29 -10
  94. package/dist/flipstream.js +69 -20
  95. package/dist/flipstream.js.map +1 -1
  96. package/dist/version.gen.js +1 -1
  97. package/docs/first-party.md +52 -30
  98. package/package.json +1 -1
@@ -27,7 +27,20 @@ export const Message = z.discriminatedUnion('type', [
27
27
  */
28
28
  export function adoptNewer(cell, state) {
29
29
  cell.known = state;
30
- cell.owedStored = null;
30
+ cell.owedFor = null;
31
+ cell.slotFor = null;
32
+ }
33
+ /**
34
+ * The logout still owed, or null when nothing is. A paid `owedFor` is read by the give-way
35
+ * check and the write-down (sdk#586, SDK-D2050); this reader treats it as null (sdk#572, SDK-D2047).
36
+ */
37
+ export function owedLogout(cell) {
38
+ const owed = cell.owedFor;
39
+ if (owed === null)
40
+ return null;
41
+ if (cell.known.logoutPending?.generation !== cell.known.generation)
42
+ return null;
43
+ return owed;
31
44
  }
32
45
  /**
33
46
  * Ends this tab's code screen because something else moved the session on: another tab's sign-in
@@ -66,7 +79,8 @@ export function createCell(supported) {
66
79
  principalKey: null,
67
80
  revision: 0,
68
81
  known: NO_RECORD,
69
- owedStored: null,
82
+ owedFor: null,
83
+ slotFor: null,
70
84
  paidLogout: null,
71
85
  refreshInFlight: null,
72
86
  refreshTimer: undefined,
@@ -1 +1 @@
1
- {"version":3,"file":"cell.js","sourceRoot":"","sources":["../../../src/first-party/session/cell.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,OAAO,EAAE,SAAS,EAAkB,MAAM,aAAa,CAAA;AAoBvD,gGAAgG;AAChG,MAAM,UAAU,SAAS,CAAC,IAAuB,EAAE,KAA+C;IAChG,OAAO,IAAI,KAAK,IAAI,IAAI,IAAI,CAAC,UAAU,KAAK,KAAK,CAAC,UAAU,IAAI,IAAI,CAAC,MAAM,KAAK,KAAK,CAAC,MAAM,CAAA;AAC9F,CAAC;AAED,4FAA4F;AAC5F,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,CAAA;AACzC,iEAAiE;AACjE,MAAM,CAAC,MAAM,UAAU,GAAsB,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;AACzF,4EAA4E;AAC5E,MAAM,CAAC,MAAM,0BAA0B,GAAG,MAAM,CAAA;AAEhD,oDAAoD;AACpD,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IAClD,CAAC,CAAC,MAAM,CAAC;QACP,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;QACxB,UAAU,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QAC1B,MAAM,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QACtB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;KACxB,CAAC;IACF,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,UA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IAAI,CAAA;IAC7B,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAA;AAC/B,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,qBAAqB,CAAC,IAAiB;IACrD,YAAY,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAA;IACnC,IAAI,CAAC,gBAAgB,GAAG,SAAS,CAAA;IACjC,IAAI,CAAC,iBAAiB,GAAG,CAAC,CAAA;IAC1B,IAAI,CAAC,UAAU,GAAG,IAAI,CAAA;AACxB,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,SAAkB;IAC3C,OAAO;QACL,SAAS;QACT,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,aAAa,EAAE;QACvE,IAAI,EAAE,IAAI;QACV,YAAY,EAAE,IAAI;QAClB,QAAQ,EAAE,CAAC;QACX,KAAK,EAAE,SAAS;QAChB,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,IAAI;QACb,UAAU,EAAE,IAAI;QAChB,eAAe,EAAE,IAAI;QACrB,YAAY,EAAE,SAAS;QACvB,YAAY,EAAE,SAAS;QACvB,WAAW,EAAE,CAAC;QACd,iBAAiB,EAAE,MAAM,CAAC,iBAAiB;QAC3C,gBAAgB,EAAE,SAAS;QAC3B,iBAAiB,EAAE,CAAC;QACpB,UAAU,EAAE,IAAI;QAChB,aAAa,EAAE,CAAC;QAChB,UAAU,EAAE,IAAI,OAAO,EAAE;QACzB,OAAO,EAAE,IAAI;QACb,iBAAiB,EAAE,KAAK;QACxB,iBAAiB,EAAE,KAAK;QACxB,OAAO,EAAE,IAAI,GAAG,EAAE;QAClB,SAAS,EAAE,IAAI,GAAG,EAAE;QACpB,MAAM,EAAE,KAAK;KACd,CAAA;AACH,CAAC"}
@@ -1,8 +1,11 @@
1
1
  /**
2
- * A call on a session after its `close()` (#464): a programming error, never an outcome. It is
3
- * thrown, or rejected with, before anything is sent, so a closed session can't come back to
4
- * life, signed in with no timer to renew it and no ear for the other tabs.
2
+ * A call on a session after its `close()` (#464): a programming error, never an outcome.
3
+ * @see https://github.com/flipstream-io/sdk/blob/main/sdks/typescript/docs/first-party.md#close
5
4
  */
6
5
  export declare class SessionClosedError extends Error {
6
+ /**
7
+ * Names the call that was made after `close()`.
8
+ * @see https://github.com/flipstream-io/sdk/blob/main/sdks/typescript/docs/first-party.md#close
9
+ */
7
10
  constructor(call: string);
8
11
  }
@@ -1,9 +1,12 @@
1
1
  /**
2
- * A call on a session after its `close()` (#464): a programming error, never an outcome. It is
3
- * thrown, or rejected with, before anything is sent, so a closed session can't come back to
4
- * life, signed in with no timer to renew it and no ear for the other tabs.
2
+ * A call on a session after its `close()` (#464): a programming error, never an outcome.
3
+ * @see https://github.com/flipstream-io/sdk/blob/main/sdks/typescript/docs/first-party.md#close
5
4
  */
6
5
  export class SessionClosedError extends Error {
6
+ /**
7
+ * Names the call that was made after `close()`.
8
+ * @see https://github.com/flipstream-io/sdk/blob/main/sdks/typescript/docs/first-party.md#close
9
+ */
7
10
  constructor(call) {
8
11
  super(`${call} was called on a closed session: make a new one`);
9
12
  this.name = 'SessionClosedError';
@@ -1 +1 @@
1
- {"version":3,"file":"closed.js","sourceRoot":"","sources":["../../../src/first-party/session/closed.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,OAAO,kBAAmB,SAAQ,KAAK;IAC3C,YAAY,IAAY;QACtB,KAAK,CAAC,GAAG,IAAI,iDAAiD,CAAC,CAAA;QAC/D,IAAI,CAAC,IAAI,GAAG,oBAAoB,CAAA;IAClC,CAAC;CACF"}
1
+ {"version":3,"file":"closed.js","sourceRoot":"","sources":["../../../src/first-party/session/closed.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,OAAO,kBAAmB,SAAQ,KAAK;IAC3C;;;OAGG;IACH,YAAY,IAAY;QACtB,KAAK,CAAC,GAAG,IAAI,iDAAiD,CAAC,CAAA;QAC/D,IAAI,CAAC,IAAI,GAAG,oBAAoB,CAAA;IAClC,CAAC;CACF"}
@@ -3,6 +3,16 @@ import { type SessionCell } from './cell.js';
3
3
  import { type SharedState } from './shared.js';
4
4
  import type { Tokens } from './tokens.js';
5
5
  import type { SessionDeps, Told } from './types.js';
6
+ /**
7
+ * Whose cookie a sign-out's logout is owed for: the person signed in here (`sign-out`), or the person
8
+ * of a sign-in this tab must revoke (`revoke`; null when its answer couldn't be read).
9
+ */
10
+ export type Owing = {
11
+ readonly kind: 'sign-out';
12
+ } | {
13
+ readonly kind: 'revoke';
14
+ readonly person: string | null;
15
+ };
6
16
  /**
7
17
  * What `recordSignOut` landed: the signed-out generation, whose pending logout `oweRevoke` revokes
8
18
  * through, and the record's serial then, which `signOut()` pins (SDK-D2022). A sign-out keeps the
@@ -27,9 +37,10 @@ export interface Logout {
27
37
  * is written down at the next logout try storage takes, or, for a logout kept with no timer, at the
28
38
  * next `sync()` storage takes (`writeDown`, SDK-D2012). Answers the new generation and the
29
39
  * record's serial with it (`SignedOut`). `landed` runs as the sign-out lands, written or kept in
30
- * memory, before the tabs are told.
40
+ * memory, before the tabs are told. `owing`: whose cookie the logout is owed for, kept beside it
41
+ * when storage refuses (owed.ts).
31
42
  */
32
- readonly recordSignOut: (landed?: () => void) => Promise<SignedOut>;
43
+ readonly recordSignOut: (owing: Owing, landed?: () => void) => Promise<SignedOut>;
33
44
  /**
34
45
  * A closed session leaves a sign-out storage never took in the page's slot, for whichever session
35
46
  * in the page looks next (owed.ts, sdk#483). Called by `close()`, and by a sign-out made after it.
@@ -58,8 +69,9 @@ export interface Logout {
58
69
  * backing off, since that may be gone in seconds. Refused (a 401 or 403) or outside the contract
59
70
  * (`broken`, a host routed or deployed wrongly): time doesn't mend either, so it stays owed with
60
71
  * no timer. It is sent again at the next page load, at a sign-in, at a restore this tab runs
61
- * (`retry()`, `start()`, `refreshAfterUnauthorized()`), and when another tab posts a token this
62
- * tab can't read: each sends an owed logout first anyway. `sync()` only writes it down (SDK-D2012),
72
+ * (`retry()`, `start()`, `refreshAfterUnauthorized()`), and, unless a sign-out is still owed here
73
+ * (its own or the page's slot), when another tab posts a token this tab can't read: each sends an
74
+ * owed logout first anyway. `sync()` only writes it down (SDK-D2012),
63
75
  * unless a record written since this tab's unrecorded sign-out ended the kept mark, this
64
76
  * sign-out's own record included (written down by a tab that heard it): the next `sync()` then
65
77
  * sends it once (`dropUnrecordedSignOut`). `generation` and `serial` name the cookie the logout
@@ -74,9 +86,17 @@ export interface Logout {
74
86
  /**
75
87
  * Writes down a state only this tab's memory holds, once storage takes it, with no request: how
76
88
  * a logout kept with no timer, which no try in this tab writes down, reaches a reload (SDK-D2012).
89
+ * A copy another session has confirmed since is paid first, so the pending flag is not written
90
+ * back over that confirm (sdk#586).
77
91
  */
78
92
  readonly writeDown: () => Promise<void>;
79
- /** Clears a paid logout's flag in storage, when storage takes the write (sdk#506). */
93
+ /**
94
+ * Writes a paid sign-out down once storage takes it, with no request (sdk#586). The sdk#506
95
+ * branch stays first: a flag storage already holds. The other branch writes over the base
96
+ * record, its generation, serial and person, or over a lower record that is not signed in and
97
+ * owes no logout (SDK-D2053). A heard sign-out, or one whose serial is unknown, writes only
98
+ * over that lower record. A paid entry is read here and by the give-way check (SDK-D2050).
99
+ */
80
100
  readonly writeDownPaid: () => Promise<void>;
81
101
  }
82
102
  export declare function createLogout(deps: SessionDeps, cell: SessionCell, { shared, withState, withCookie, broadcast }: SharedState, { release }: Pick<Tokens, 'release'>): Logout;
@@ -1,6 +1,6 @@
1
1
  import { readState } from '../state.js';
2
- import { BACKOFF_MS, isKeptFor } from './cell.js';
3
- import { leaveOwed } from './owed.js';
2
+ import { BACKOFF_MS, isKeptFor, owedLogout } from './cell.js';
3
+ import { leaveOwed, revokedOn } from './owed.js';
4
4
  import { isNewer } from './shared.js';
5
5
  const CONFIRMED = { kind: 'confirmed' };
6
6
  const NOT_ASKED = { kind: 'unconfirmed', reason: 'unavailable' };
@@ -81,27 +81,34 @@ export function createLogout(deps, cell, { shared, withState, withCookie, broadc
81
81
  // the slot's included, whatever generation an object counted for it.
82
82
  if (deps.owed !== null)
83
83
  deps.owed.left = null;
84
- const cleared = await withState((state) => ({
85
- write: state.logoutPending?.generation === generation
84
+ const cleared = await withState((state) => {
85
+ const write = state.logoutPending?.generation === generation
86
86
  ? { ...state, logoutPending: null }
87
- : null,
88
- result: undefined,
89
- }));
90
- // Storage refused: the confirmation is kept in memory, so this tab, and the slot it would
91
- // leave when closed, don't owe it again (sdk#483). A flag storage holds is remembered as paid
92
- // by its stored generation and serial, so a tie with the record doesn't bring it back (sdk#506).
93
- if (!cleared.ran) {
94
- // Read after the refused write let go of the state lock, so another tab may have written
95
- // since. Safe: the only write that sets a flag at the same generation (a redeem's revoke)
96
- // runs under the cookie lock, which every caller of sendLogout holds now.
87
+ : null;
88
+ // A landed clear drops `owedFor` (`adoptNewer`). A refused clear, or a confirm that
89
+ // wrote nothing because a newer sign-out moved the flag, keeps it (sdk#572).
90
+ return { write, result: write !== null };
91
+ });
92
+ // The clear did not land: storage refused the write, or this confirm wrote nothing because
93
+ // a newer sign-out had moved the flag. The confirmation is kept in memory, so this tab, and
94
+ // the slot it would leave when closed, don't owe it again (sdk#483). A flag storage holds at
95
+ // this generation is remembered as paid, so a tie with the record doesn't bring it back (sdk#506).
96
+ if (!cleared.ran || cleared.value !== true) {
97
+ // Read after the clear let go of the state lock, so another tab may have written since.
98
+ // Safe: the only write that sets a flag at the same generation (a redeem's revoke) runs
99
+ // under the cookie lock, which every caller of sendLogout holds now.
97
100
  const stored = storage === null ? null : readState(storage);
98
101
  if (stored?.generation === generation && stored.logoutPending?.generation === generation) {
99
102
  cell.paidLogout = { generation, serial: stored.serial };
100
103
  }
101
104
  if (cell.known.logoutPending?.generation === generation)
102
105
  cell.known = { ...cell.known, logoutPending: null };
106
+ // The write did not land. Keep what this sign-out was made against, so a record written
107
+ // since can end it (sdk#572, SDK-D1967). A write that lands drops it, below.
108
+ }
109
+ else {
110
+ cell.owedFor = null;
103
111
  }
104
- cell.owedStored = null;
105
112
  cell.logoutKept = null;
106
113
  }
107
114
  return answer;
@@ -134,10 +141,10 @@ export function createLogout(deps, cell, { shared, withState, withCookie, broadc
134
141
  }
135
142
  }
136
143
  };
137
- const recordSignOut = async (landed) => {
144
+ const recordSignOut = async (owing, landed) => {
138
145
  const signedOut = (state) => {
139
146
  const generation = state.generation + 1;
140
- return { ...state, generation, signedIn: false, logoutPending: { generation }, principal: null, person: null };
147
+ return { ...state, generation, signedIn: false, logoutPending: { generation }, principal: null, person: null, madeBy: 'sign-out' };
141
148
  };
142
149
  const told = (generation) => {
143
150
  landed?.();
@@ -157,9 +164,36 @@ export function createLogout(deps, cell, { shared, withState, withCookie, broadc
157
164
  // close() the channel is closed: the sign-out reaches this page's slot and no other tab.
158
165
  // What storage read now is what the slot carries if this object closes first (SDK-D1977).
159
166
  // Read before the number is set: shared() adopting a record ends any earlier one (SDK-D2005).
160
- const next = signedOut(shared());
161
- cell.owedStored ??= storage === null ? 0 : readState(storage).generation;
167
+ const before = shared();
168
+ const next = signedOut(before);
169
+ // Whose cookie the logout is owed for: a revoke names its own sign-in's person (null when its
170
+ // answer couldn't be read); a sign-out, the person signed in here, from the record or, on a
171
+ // record without one, the token this tab holds at that generation (as a refresh compares,
172
+ // refresh.ts). Unknown: null.
173
+ const held = cell.held;
174
+ const person = owing.kind === 'revoke'
175
+ ? owing.person
176
+ : before.person ?? (held !== null && held.generation === before.generation ? held.access.person : null);
177
+ const record = storage === null ? null : readState(storage);
178
+ const stored = record === null ? 0 : record.generation;
179
+ const serial = record === null ? 0 : record.serial;
180
+ // The record's person, not whose cookie the logout is owed for. A ride renames that other
181
+ // field and leaves this one (SDK-D2053).
182
+ const basePerson = record === null ? null : record.person;
183
+ // A paid entry is not owed (SDK-D2047): this sign-out starts its own. An unpaid one already
184
+ // owed here (heard while this waited for the state lock): this revoke rides on it, as
185
+ // `oweRevoke` would have, so it is renamed as a ride (PR 566 O1).
186
+ const open = owedLogout(cell);
187
+ cell.owedFor = open === null
188
+ ? person === null
189
+ ? { stored, serial, basePerson, person, revoke: null }
190
+ : { stored, serial, basePerson, person, revoke: owing.kind === 'revoke' ? 'made' : null }
191
+ : owing.kind === 'revoke'
192
+ ? revokedOn(open, person, stored)
193
+ : open;
162
194
  cell.known = next;
195
+ // This session's own sign-out now: `owedFor` decides, never the slot's entry (sdk#567).
196
+ cell.slotFor = null;
163
197
  told(cell.known.generation);
164
198
  // Closed already (a sign-in answered after close(), or a signOut() that waited for the state
165
199
  // lock): close() left nothing, so this does (sdk#483 finding 1).
@@ -171,23 +205,74 @@ export function createLogout(deps, cell, { shared, withState, withCookie, broadc
171
205
  // for, with that number: a sign-in recorded since then drops the slot (SDK-D1977). Memory against
172
206
  // memory, never the count against a stored number (SDK-D1967, SDK-D2005).
173
207
  const leaveIfOwed = () => {
174
- if (deps.owed === null || cell.owedStored === null)
208
+ // A paid entry is not owed, so a close does not leave it (SDK-D2047).
209
+ const owedFor = owedLogout(cell);
210
+ if (deps.owed === null || owedFor === null || cell.known.signedIn)
175
211
  return;
176
212
  const known = cell.known;
177
- if (known.signedIn || known.logoutPending?.generation !== known.generation)
213
+ const left = deps.owed.left;
214
+ // The ride is already in the slot, and a later ride renamed it in place under the cookie
215
+ // lock. Merging this ride again is two riders, and that merge is not associative (SDK-D2046).
216
+ if (owedFor.revoke === 'rode' &&
217
+ left !== null &&
218
+ left.revoke === 'rode' &&
219
+ left.generation === known.generation &&
220
+ left.stored === owedFor.stored)
178
221
  return;
179
- leaveOwed(deps.owed, { generation: cell.known.generation, stored: cell.owedStored });
222
+ leaveOwed(deps.owed, { generation: known.generation, ...owedFor });
180
223
  };
181
224
  /**
182
- * Clears a paid logout's flag in storage, at the first write it takes: no request (sdk#506).
183
- * What is written is what this tab knows: the paid record with its flag cleared, or a newer
184
- * state only memory holds (a sign-out storage refused, or one heard from another tab), which
185
- * `writeDown` would write at the same moment. Only while the stored record is still the paid one.
225
+ * Writes a paid sign-out down once storage takes it, with no request. The sdk#506 branch stays
226
+ * first: a flag storage already holds, cleared while that record is still the paid one. The other
227
+ * branch is derived, not a second field: the flag is already clear, `owedFor` or else `slotFor`
228
+ * is still set, and known is newer than storage (sdk#586). The base is that generation, that
229
+ * serial and that record's person (`basePerson`), not the person the logout is owed for: a ride
230
+ * renames the owed person and leaves the record's (SDK-D2053). A heard sign-out names no owed
231
+ * person and still matches its base, because the entry kept the record's person. A null serial
232
+ * names no record, so it writes only over a lower record that is not signed in and owes no
233
+ * logout. The same person signed in again after a lost record, then renewed until the serial
234
+ * matches, is the one this cannot see. The slot is read inside the state lock, after reconcile,
235
+ * and neither branch writes while it holds an entry. A refused write leaves the mark, and the
236
+ * next sync tries again.
186
237
  */
238
+ const paidMark = () => {
239
+ if (cell.known.logoutPending?.generation === cell.known.generation)
240
+ return null;
241
+ const owed = cell.owedFor ?? cell.slotFor;
242
+ if (owed === null || storage === null || !isNewer(cell.known, readState(storage)))
243
+ return null;
244
+ return { stored: owed.stored, serial: owed.serial, basePerson: owed.basePerson };
245
+ };
187
246
  const writeDownPaid = async () => {
188
- if (cell.paidLogout === null)
247
+ if (cell.paidLogout !== null) {
248
+ await withState((state) => ({
249
+ write: (deps.owed?.left ?? null) !== null || cell.paidLogout === null ? null : state,
250
+ result: undefined,
251
+ }));
252
+ return;
253
+ }
254
+ if (paidMark() === null || storage === null)
189
255
  return;
190
- await withState((state) => ({ write: cell.paidLogout === null ? null : state, result: undefined }));
256
+ const recordStore = storage;
257
+ await withState((state) => {
258
+ const mark = paidMark();
259
+ const record = readState(recordStore);
260
+ const slotHeld = (deps.owed?.left ?? null) !== null;
261
+ // The record's person, kept where the entry was made. The person the logout is owed for is
262
+ // a different field, and a ride renames that one (SDK-D2053).
263
+ const onBase = mark !== null &&
264
+ !slotHeld &&
265
+ record.generation === mark.stored &&
266
+ mark.serial !== null &&
267
+ record.serial === mark.serial &&
268
+ record.person === mark.basePerson;
269
+ const lowerQuiet = mark !== null &&
270
+ !slotHeld &&
271
+ record.generation < mark.stored &&
272
+ !record.signedIn &&
273
+ record.logoutPending?.generation !== record.generation;
274
+ return { write: onBase || lowerQuiet ? state : null, result: undefined };
275
+ });
191
276
  };
192
277
  /**
193
278
  * Writes down a state only this tab's memory holds (a sign-out storage refused, or one
@@ -201,6 +286,73 @@ export function createLogout(deps, cell, { shared, withState, withCookie, broadc
201
286
  result: undefined,
202
287
  }));
203
288
  };
289
+ // Whether this call can pay, decided before any wait. `send` when it cannot: the try then writes
290
+ // the pending sign-out as its first wait, which is when `sync()` sees it (sdk#542 O1). Awaiting
291
+ // a helper that already knows the answer is `send` lets that caller continue before the write.
292
+ const payCopyEarly = () => {
293
+ const state = shared();
294
+ const owed = state.logoutPending;
295
+ const copy = cell.slotFor;
296
+ if (owed === null ||
297
+ owed.generation !== state.generation ||
298
+ copy === null ||
299
+ owedLogout(cell) !== null ||
300
+ (deps.owed?.left ?? null) !== null ||
301
+ storage === null)
302
+ return 'send';
303
+ return 'look';
304
+ };
305
+ const SEND = { kind: 'send' };
306
+ /**
307
+ * Pay this tab's copy of a logout another session already confirmed, before anything writes the
308
+ * pending sign-out. One helper for the try and for a call that shares it (sdk#583, SDK-D2049).
309
+ * `paid`: nothing is sent, and the generation and serial are the state the pay cleared. `send`:
310
+ * the try re-reads and may send. A second call finds the copy gone only after that write landed.
311
+ * A refused pay leaves the copy, so the next call sends, and the re-read finds nothing owed.
312
+ */
313
+ const payCopy = async () => {
314
+ if (payCopyEarly() === 'send')
315
+ return SEND;
316
+ const state = shared();
317
+ const owed = state.logoutPending;
318
+ const copy = cell.slotFor;
319
+ // Once more, after the early check: a reconcile since can drop the copy. The callback decides the rest.
320
+ if (owed === null || owed.generation !== state.generation || copy === null || storage === null)
321
+ return SEND;
322
+ const generation = owed.generation;
323
+ const recordStore = storage;
324
+ // A holder, not a `let` the callback assigns: TypeScript would keep that `let` at `null` (TS#9998).
325
+ // `null` means the callback never ran. That is not a refused write, which ran and decided `pay`.
326
+ const decision = { value: null };
327
+ const cleared = await withState((current) => {
328
+ // `current` is known after reconcile, under the lock. The copy's base is the stored record
329
+ // it was made against. A lower record is a lost one: the sign-out stands, so it pays. A
330
+ // record past that base is not the confirm, and the try sends (SDK-D2049).
331
+ const record = readState(recordStore);
332
+ const slotStill = (deps.owed?.left ?? null) === null && cell.slotFor === copy;
333
+ const notPast = record.generation <= copy.stored;
334
+ if (slotStill &&
335
+ current.generation === generation &&
336
+ current.logoutPending?.generation === generation &&
337
+ notPast) {
338
+ decision.value = { kind: 'pay', generation: current.generation, serial: current.serial };
339
+ return { write: { ...current, logoutPending: null }, result: 'pay' };
340
+ }
341
+ decision.value = 'send';
342
+ return { write: null, result: 'send' };
343
+ });
344
+ const paid = decision.value;
345
+ if (paid !== null && paid !== 'send' && !cleared.ran) {
346
+ if (cell.known.logoutPending?.generation === generation) {
347
+ cell.known = { ...cell.known, logoutPending: null };
348
+ }
349
+ }
350
+ if (paid !== null && paid !== 'send' && isKeptFor(cell.logoutKept, cell.known))
351
+ cell.logoutKept = null;
352
+ return paid !== null && paid !== 'send'
353
+ ? { kind: 'paid', generation: paid.generation, serial: paid.serial }
354
+ : SEND;
355
+ };
204
356
  /**
205
357
  * Sends the logout the shared state still owes, under the cookie lock. `answered`: what
206
358
  * pulse-auth said to the logout `generation` owed, or, for a try queued behind this tab's own send
@@ -213,26 +365,43 @@ export function createLogout(deps, cell, { shared, withState, withCookie, broadc
213
365
  // The mark as this try starts: one set later is a send this try queued behind.
214
366
  const before = cell.logoutKept;
215
367
  const locked = await withCookie(async () => {
368
+ // The copy is paid before persistKnown. Writing the pending flag first drops the copy, and
369
+ // the try then sends a logout the confirm already paid (sdk#583 round 1).
370
+ const pay = payCopyEarly() === 'send' ? SEND : await payCopy();
371
+ if (pay.kind === 'paid') {
372
+ // A sign-out past the one just paid is still owed: write it and send it. The answer
373
+ // otherwise is the state the pay cleared, not a later read of whatever landed since.
374
+ const now = shared();
375
+ const newer = now.logoutPending;
376
+ if (newer === null || newer.generation !== now.generation || newer.generation <= pay.generation) {
377
+ read({ kind: 'nothing-owed' });
378
+ return { kind: 'nothing-owed', generation: pay.generation, serial: pay.serial };
379
+ }
380
+ }
216
381
  await persistKnown();
217
- // Closed while this waited for the lock: nothing new is sent (SDK-D1930). The flag stays
218
- // recorded, for another tab or the next page load; close() set no retry timer.
382
+ // Closed while this waited: nothing new is sent (SDK-D1930). The flag stays recorded, for
383
+ // another tab or the next page load; close() set no retry timer. The check sits after the
384
+ // write. One before it drops a pending sign-out storage had refused. The pay needs no check
385
+ // of its own: a paid copy writes the clear and sends nothing, and a send falls through to
386
+ // this write and then this check.
219
387
  if (cell.closed)
220
388
  return NOT_SENT;
221
- const state = shared();
222
- const owed = state.logoutPending;
223
- if (owed !== null && owed.generation === state.generation) {
224
- read({ kind: 'sends', generation: owed.generation });
389
+ // Re-read after the wait. The generation, the kept mark and the serial are this read's.
390
+ const again = shared();
391
+ const still = again.logoutPending;
392
+ if (still !== null && still.generation === again.generation) {
393
+ read({ kind: 'sends', generation: still.generation });
225
394
  // Kept while this waited for the lock, for this same cookie (this tab's restore or sign-in
226
395
  // sent it): pulse-auth's answer stands, and is this try's too. Sending it again would ask
227
396
  // the same question (sdk#531). A mark this try saw as it started is an older send: the
228
397
  // timer's try and any later one send, as before (PR 547 round 1).
229
398
  const kept = cell.logoutKept;
230
- if (kept !== before && isKeptFor(kept, state))
231
- return { kind: 'answered', answer: kept.answer, generation: owed.generation, serial: state.serial };
232
- return { kind: 'answered', answer: await sendLogout(owed.generation), generation: owed.generation, serial: state.serial };
399
+ if (kept !== before && isKeptFor(kept, again))
400
+ return { kind: 'answered', answer: kept.answer, generation: still.generation, serial: again.serial };
401
+ return { kind: 'answered', answer: await sendLogout(still.generation), generation: still.generation, serial: again.serial };
233
402
  }
234
403
  read({ kind: 'nothing-owed' });
235
- return { kind: 'nothing-owed', generation: state.generation, serial: state.serial };
404
+ return { kind: 'nothing-owed', generation: again.generation, serial: again.serial };
236
405
  });
237
406
  return locked.ran ? locked.value : NOT_SENT;
238
407
  };
@@ -300,10 +469,21 @@ export function createLogout(deps, cell, { shared, withState, withCookie, broadc
300
469
  // a reload in between doesn't restore the session (SDK-D2012). No request is sent. A write-down
301
470
  // that throws is reported, and the call still takes the shared try's outcome: that try's settle
302
471
  // owns the timer and the kept mark, so a sharer never arms the back-off (SDK-D1963).
303
- const share = (outcome) => persistKnown().then(() => outcome, (error) => {
304
- report({ kind: 'threw', step: 'logout', cause: error });
305
- return outcome;
306
- });
472
+ const share = (outcome) => {
473
+ const wrote = (error) => {
474
+ report({ kind: 'threw', step: 'logout', cause: error });
475
+ return outcome;
476
+ };
477
+ const writeThen = () => persistKnown().then(() => outcome, wrote);
478
+ // No copy to pay: the write is this call's first wait, as it was before the gate (sdk#542 O1).
479
+ if (payCopyEarly() === 'send')
480
+ return writeThen();
481
+ return payCopy().then((pay) => (pay.kind === 'paid' ? outcome : writeThen()), (error) => {
482
+ // A throw is not a pay. The pending flag is still written down (sdk#583 round 2).
483
+ report({ kind: 'threw', step: 'logout', cause: error });
484
+ return writeThen();
485
+ });
486
+ };
307
487
  const tryLogout = (pinnedSerial) => {
308
488
  const state = shared();
309
489
  const owed = state.logoutPending !== null && state.logoutPending.generation === state.generation
@@ -323,6 +503,24 @@ export function createLogout(deps, cell, { shared, withState, withCookie, broadc
323
503
  void tryLogout();
324
504
  }, delay);
325
505
  };
326
- return { sendLogout, recordSignOut, leaveIfOwed, tryLogout, notConfirmed, scheduleLogoutRetry, writeDown: persistKnown, writeDownPaid };
506
+ // The kept branch's write. A copy another session confirmed since that answer is paid first, so
507
+ // the pending flag is not written back over the confirm (sdk#586). Either way nothing is sent.
508
+ const writeDown = async () => {
509
+ if (payCopyEarly() !== 'send') {
510
+ try {
511
+ const pay = await payCopy();
512
+ // A paid answer is written by the next sync, under the write-down's guards, as share()
513
+ // leaves it (sdk#586 round 2). persistKnown would write it by newness alone.
514
+ if (pay.kind === 'paid')
515
+ return;
516
+ }
517
+ catch (error) {
518
+ // A throw is not a pay. The pending flag is still written down, as share() does (sdk#586).
519
+ report({ kind: 'threw', step: 'logout', cause: error });
520
+ }
521
+ }
522
+ await persistKnown();
523
+ };
524
+ return { sendLogout, recordSignOut, leaveIfOwed, tryLogout, notConfirmed, scheduleLogoutRetry, writeDown, writeDownPaid };
327
525
  }
328
526
  //# sourceMappingURL=logout.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"logout.js","sourceRoot":"","sources":["../../../src/first-party/session/logout.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAkB,MAAM,aAAa,CAAA;AACvD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAqC,MAAM,WAAW,CAAA;AACpF,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AACrC,OAAO,EAAE,OAAO,EAAoB,MAAM,aAAa,CAAA;AAIvD,MAAM,SAAS,GAAS,EAAE,IAAI,EAAE,WAAW,EAAE,CAAA;AAC7C,MAAM,SAAS,GAAS,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,aAAa,EAAE,CAAA;AACtE,MAAM,UAAU,GAAS,EAAE,IAAI,EAAE,YAAY,EAAE,CAAA;AAE/C,SAAS,MAAM,CAAC,MAAoB;IAClC,QAAQ,MAAM,CAAC,IAAI,EAAE,CAAC;QACpB,KAAK,WAAW;YACd,OAAO,SAAS,CAAA;QAClB,KAAK,aAAa;YAChB,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAA;QACvD,KAAK,QAAQ;YACX,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,SAAS,EAAE,CAAA;QACnD,OAAO,CAAC,CAAC,CAAC;YACR,MAAM,UAAU,GAAU,MAAM,CAAA;YAChC,OAAO,UAAU,CAAA;QACnB,CAAC;IACH,CAAC;AACH,CAAC;AAsBD,MAAM,QAAQ,GAAc,EAAE,IAAI,EAAE,WAAW,EAAE,CAAA;AAWjD,M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