@kortix/sdk 0.12.8 → 0.13.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.
- package/README.md +3 -6
- package/dist/browser/session-sync/session-sync-registry.d.ts +7 -2
- package/dist/browser/session-sync/session-sync-registry.d.ts.map +1 -1
- package/dist/browser/session-sync/session-sync-registry.js +33 -44
- package/dist/browser/session-sync/session-sync-registry.js.map +1 -1
- package/dist/browser/stores/opencode-compaction-store.d.ts +9 -3
- package/dist/browser/stores/opencode-compaction-store.d.ts.map +1 -1
- package/dist/browser/stores/opencode-compaction-store.js +5 -12
- package/dist/browser/stores/opencode-compaction-store.js.map +1 -1
- package/dist/browser/stores/sandbox-connection-store.d.ts +28 -17
- package/dist/browser/stores/sandbox-connection-store.d.ts.map +1 -1
- package/dist/browser/stores/sandbox-connection-store.js +32 -84
- package/dist/browser/stores/sandbox-connection-store.js.map +1 -1
- package/dist/browser/stores/session-working-store.d.ts +73 -0
- package/dist/browser/stores/session-working-store.d.ts.map +1 -0
- package/dist/browser/stores/session-working-store.js +86 -0
- package/dist/browser/stores/session-working-store.js.map +1 -0
- package/dist/browser/stores/sync-store/types.d.ts +14 -4
- package/dist/browser/stores/sync-store/types.d.ts.map +1 -1
- package/dist/browser/stores/sync-store.d.ts +140 -3
- package/dist/browser/stores/sync-store.d.ts.map +1 -1
- package/dist/browser/stores/sync-store.js +425 -36
- package/dist/browser/stores/sync-store.js.map +1 -1
- package/dist/core/client/kortix.d.ts +102 -1
- package/dist/core/client/kortix.d.ts.map +1 -1
- package/dist/core/client/kortix.js +78 -0
- package/dist/core/client/kortix.js.map +1 -1
- package/dist/core/files/client.d.ts +50 -2
- package/dist/core/files/client.d.ts.map +1 -1
- package/dist/core/files/client.js +253 -44
- package/dist/core/files/client.js.map +1 -1
- package/dist/core/files/types.d.ts +11 -0
- package/dist/core/files/types.d.ts.map +1 -1
- package/dist/core/http/abort-error.d.ts +89 -0
- package/dist/core/http/abort-error.d.ts.map +1 -0
- package/dist/core/http/abort-error.js +190 -0
- package/dist/core/http/abort-error.js.map +1 -0
- package/dist/core/http/api-client.d.ts.map +1 -1
- package/dist/core/http/api-client.js +18 -4
- package/dist/core/http/api-client.js.map +1 -1
- package/dist/core/rest/platform-client/github-app.d.ts +13 -0
- package/dist/core/rest/platform-client/github-app.d.ts.map +1 -1
- package/dist/core/rest/platform-client/github-app.js +2 -0
- package/dist/core/rest/platform-client/github-app.js.map +1 -1
- package/dist/core/rest/platform-client/members.d.ts +10 -64
- package/dist/core/rest/platform-client/members.d.ts.map +1 -1
- package/dist/core/rest/platform-client/members.js +10 -28
- package/dist/core/rest/platform-client/members.js.map +1 -1
- package/dist/core/rest/projects-client/accounts.d.ts +30 -1
- package/dist/core/rest/projects-client/accounts.d.ts.map +1 -1
- package/dist/core/rest/projects-client/accounts.js +1 -1
- package/dist/core/rest/projects-client/accounts.js.map +1 -1
- package/dist/core/rest/projects-client/apps.d.ts +13 -0
- package/dist/core/rest/projects-client/apps.d.ts.map +1 -1
- package/dist/core/rest/projects-client/apps.js.map +1 -1
- package/dist/core/rest/projects-client/assignments.d.ts +114 -0
- package/dist/core/rest/projects-client/assignments.d.ts.map +1 -0
- package/dist/core/rest/projects-client/assignments.js +91 -0
- package/dist/core/rest/projects-client/assignments.js.map +1 -0
- package/dist/core/rest/projects-client/billing.d.ts +10 -1
- package/dist/core/rest/projects-client/billing.d.ts.map +1 -1
- package/dist/core/rest/projects-client/billing.js +11 -2
- package/dist/core/rest/projects-client/billing.js.map +1 -1
- package/dist/core/rest/projects-client/connectors.d.ts +2 -0
- package/dist/core/rest/projects-client/connectors.d.ts.map +1 -1
- package/dist/core/rest/projects-client/connectors.js.map +1 -1
- package/dist/core/rest/projects-client/files.js +2 -2
- package/dist/core/rest/projects-client/files.js.map +1 -1
- package/dist/core/rest/projects-client/gateway.d.ts +51 -0
- package/dist/core/rest/projects-client/gateway.d.ts.map +1 -1
- package/dist/core/rest/projects-client/gateway.js.map +1 -1
- package/dist/core/rest/projects-client/iam.d.ts +51 -3
- package/dist/core/rest/projects-client/iam.d.ts.map +1 -1
- package/dist/core/rest/projects-client/iam.js +18 -1
- package/dist/core/rest/projects-client/iam.js.map +1 -1
- package/dist/core/rest/projects-client/index.d.ts +1 -0
- package/dist/core/rest/projects-client/index.d.ts.map +1 -1
- package/dist/core/rest/projects-client/index.js +1 -0
- package/dist/core/rest/projects-client/index.js.map +1 -1
- package/dist/core/rest/projects-client/projects.d.ts +1 -1
- package/dist/core/rest/projects-client/projects.d.ts.map +1 -1
- package/dist/core/rest/projects-client/projects.js +3 -0
- package/dist/core/rest/projects-client/projects.js.map +1 -1
- package/dist/core/rest/projects-client/secrets.d.ts +11 -0
- package/dist/core/rest/projects-client/secrets.d.ts.map +1 -1
- package/dist/core/rest/projects-client/secrets.js +1 -1
- package/dist/core/rest/projects-client/secrets.js.map +1 -1
- package/dist/core/rest/projects-client/session-costs.d.ts +33 -0
- package/dist/core/rest/projects-client/session-costs.d.ts.map +1 -1
- package/dist/core/rest/projects-client/session-costs.js.map +1 -1
- package/dist/core/rest/projects-client/sessions.d.ts +226 -2
- package/dist/core/rest/projects-client/sessions.d.ts.map +1 -1
- package/dist/core/rest/projects-client/sessions.js +101 -4
- package/dist/core/rest/projects-client/sessions.js.map +1 -1
- package/dist/core/rest/projects-client/shared.d.ts +10 -1
- package/dist/core/rest/projects-client/shared.d.ts.map +1 -1
- package/dist/core/rest/projects-client/shared.js.map +1 -1
- package/dist/core/rest/projects-client/tokens.d.ts +13 -1
- package/dist/core/rest/projects-client/tokens.d.ts.map +1 -1
- package/dist/core/rest/projects-client/tokens.js +7 -2
- package/dist/core/rest/projects-client/tokens.js.map +1 -1
- package/dist/core/rest/projects-client/triggers.d.ts +69 -2
- package/dist/core/rest/projects-client/triggers.d.ts.map +1 -1
- package/dist/core/rest/projects-client/triggers.js +1 -1
- package/dist/core/rest/projects-client/triggers.js.map +1 -1
- package/dist/core/session/compaction.d.ts +98 -0
- package/dist/core/session/compaction.d.ts.map +1 -0
- package/dist/core/session/compaction.js +108 -0
- package/dist/core/session/compaction.js.map +1 -0
- package/dist/core/session/health.d.ts +22 -0
- package/dist/core/session/health.d.ts.map +1 -1
- package/dist/core/session/health.js +31 -5
- package/dist/core/session/health.js.map +1 -1
- package/dist/core/session/index.d.ts +2 -0
- package/dist/core/session/index.d.ts.map +1 -1
- package/dist/core/session/index.js +2 -0
- package/dist/core/session/index.js.map +1 -1
- package/dist/core/session/message-queue.d.ts +79 -15
- package/dist/core/session/message-queue.d.ts.map +1 -1
- package/dist/core/session/message-queue.js +73 -27
- package/dist/core/session/message-queue.js.map +1 -1
- package/dist/core/session/rewind.d.ts +76 -10
- package/dist/core/session/rewind.d.ts.map +1 -1
- package/dist/core/session/rewind.js +68 -11
- package/dist/core/session/rewind.js.map +1 -1
- package/dist/core/session/working.d.ts +241 -0
- package/dist/core/session/working.d.ts.map +1 -0
- package/dist/core/session/working.js +261 -0
- package/dist/core/session/working.js.map +1 -0
- package/dist/core/session-sync/session-sync-controller.d.ts +35 -20
- package/dist/core/session-sync/session-sync-controller.d.ts.map +1 -1
- package/dist/core/session-sync/session-sync-controller.js +48 -115
- package/dist/core/session-sync/session-sync-controller.js.map +1 -1
- package/dist/core/stream/event-stream.d.ts +22 -0
- package/dist/core/stream/event-stream.d.ts.map +1 -1
- package/dist/core/stream/event-stream.js +132 -36
- package/dist/core/stream/event-stream.js.map +1 -1
- package/dist/core/turns/grouping.d.ts +32 -2
- package/dist/core/turns/grouping.d.ts.map +1 -1
- package/dist/core/turns/grouping.js +31 -2
- package/dist/core/turns/grouping.js.map +1 -1
- package/dist/core/turns/index.d.ts +1 -0
- package/dist/core/turns/index.d.ts.map +1 -1
- package/dist/core/turns/index.js +1 -0
- package/dist/core/turns/index.js.map +1 -1
- package/dist/core/turns/open-turn.d.ts +81 -0
- package/dist/core/turns/open-turn.d.ts.map +1 -0
- package/dist/core/turns/open-turn.js +77 -0
- package/dist/core/turns/open-turn.js.map +1 -0
- package/dist/core/turns/state.js +26 -26
- package/dist/core/turns/state.js.map +1 -1
- package/dist/core/turns/types.d.ts +5 -0
- package/dist/core/turns/types.d.ts.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/kortix.esm.min.js +25 -25
- package/dist/kortix.global.js +25 -25
- package/dist/node/server.d.ts.map +1 -1
- package/dist/node/server.js +14 -2
- package/dist/node/server.js.map +1 -1
- package/dist/react/index.d.ts +2 -1
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +7 -1
- package/dist/react/index.js.map +1 -1
- package/dist/react/initial-session-pin.d.ts +17 -0
- package/dist/react/initial-session-pin.d.ts.map +1 -1
- package/dist/react/initial-session-pin.js +58 -0
- package/dist/react/initial-session-pin.js.map +1 -1
- package/dist/react/opencode.d.ts +6 -2
- package/dist/react/opencode.d.ts.map +1 -1
- package/dist/react/opencode.js +5 -1
- package/dist/react/opencode.js.map +1 -1
- package/dist/react/prefetch-session-start.d.ts +10 -4
- package/dist/react/prefetch-session-start.d.ts.map +1 -1
- package/dist/react/prefetch-session-start.js +10 -4
- package/dist/react/prefetch-session-start.js.map +1 -1
- package/dist/react/query-keys.d.ts +8 -2
- package/dist/react/query-keys.d.ts.map +1 -1
- package/dist/react/query-keys.js +8 -2
- package/dist/react/query-keys.js.map +1 -1
- package/dist/react/session-start-stash.d.ts +25 -0
- package/dist/react/session-start-stash.d.ts.map +1 -1
- package/dist/react/session-start-stash.js +34 -3
- package/dist/react/session-start-stash.js.map +1 -1
- package/dist/react/session-title-sync.d.ts +5 -1
- package/dist/react/session-title-sync.d.ts.map +1 -1
- package/dist/react/session-title-sync.js +16 -4
- package/dist/react/session-title-sync.js.map +1 -1
- package/dist/react/use-can.d.ts +105 -0
- package/dist/react/use-can.d.ts.map +1 -0
- package/dist/react/use-can.js +190 -0
- package/dist/react/use-can.js.map +1 -0
- package/dist/react/use-canonical-opencode-session.d.ts +6 -1
- package/dist/react/use-canonical-opencode-session.d.ts.map +1 -1
- package/dist/react/use-canonical-opencode-session.js +46 -3
- package/dist/react/use-canonical-opencode-session.js.map +1 -1
- package/dist/react/use-opencode-events/handle-event.d.ts +10 -0
- package/dist/react/use-opencode-events/handle-event.d.ts.map +1 -1
- package/dist/react/use-opencode-events/handle-event.js +76 -7
- package/dist/react/use-opencode-events/handle-event.js.map +1 -1
- package/dist/react/use-opencode-events/helpers.d.ts +21 -8
- package/dist/react/use-opencode-events/helpers.d.ts.map +1 -1
- package/dist/react/use-opencode-events/helpers.js +25 -26
- package/dist/react/use-opencode-events/helpers.js.map +1 -1
- package/dist/react/use-opencode-events/index.d.ts.map +1 -1
- package/dist/react/use-opencode-events/index.js +43 -26
- package/dist/react/use-opencode-events/index.js.map +1 -1
- package/dist/react/use-opencode-events/use-event-stream-refs.d.ts.map +1 -1
- package/dist/react/use-opencode-events/use-event-stream-refs.js +66 -3
- package/dist/react/use-opencode-events/use-event-stream-refs.js.map +1 -1
- package/dist/react/use-opencode-local.d.ts +17 -0
- package/dist/react/use-opencode-local.d.ts.map +1 -1
- package/dist/react/use-opencode-local.js +41 -7
- package/dist/react/use-opencode-local.js.map +1 -1
- package/dist/react/use-opencode-sessions/messages.d.ts +101 -1
- package/dist/react/use-opencode-sessions/messages.d.ts.map +1 -1
- package/dist/react/use-opencode-sessions/messages.js +481 -63
- package/dist/react/use-opencode-sessions/messages.js.map +1 -1
- package/dist/react/use-project-apps.d.ts +24 -1
- package/dist/react/use-project-apps.d.ts.map +1 -1
- package/dist/react/use-project-apps.js +5 -3
- package/dist/react/use-project-apps.js.map +1 -1
- package/dist/react/use-runtime-boot-stalled.d.ts +32 -0
- package/dist/react/use-runtime-boot-stalled.d.ts.map +1 -0
- package/dist/react/use-runtime-boot-stalled.js +48 -0
- package/dist/react/use-runtime-boot-stalled.js.map +1 -0
- package/dist/react/use-runtime-reconnect.d.ts +67 -1
- package/dist/react/use-runtime-reconnect.d.ts.map +1 -1
- package/dist/react/use-runtime-reconnect.js +116 -18
- package/dist/react/use-runtime-reconnect.js.map +1 -1
- package/dist/react/use-session-prompts.d.ts +113 -0
- package/dist/react/use-session-prompts.d.ts.map +1 -0
- package/dist/react/use-session-prompts.js +242 -0
- package/dist/react/use-session-prompts.js.map +1 -0
- package/dist/react/use-session-send.d.ts +169 -20
- package/dist/react/use-session-send.d.ts.map +1 -1
- package/dist/react/use-session-send.js +178 -29
- package/dist/react/use-session-send.js.map +1 -1
- package/dist/react/use-session-sync.d.ts +35 -2
- package/dist/react/use-session-sync.d.ts.map +1 -1
- package/dist/react/use-session-sync.js +46 -9
- package/dist/react/use-session-sync.js.map +1 -1
- package/dist/react/use-session-working.d.ts +57 -0
- package/dist/react/use-session-working.d.ts.map +1 -0
- package/dist/react/use-session-working.js +178 -0
- package/dist/react/use-session-working.js.map +1 -0
- package/dist/react/use-session.d.ts +122 -5
- package/dist/react/use-session.d.ts.map +1 -1
- package/dist/react/use-session.js +343 -69
- package/dist/react/use-session.js.map +1 -1
- package/package.json +2 -2
- package/dist/browser/stores/tab-store.d.ts +0 -91
- package/dist/browser/stores/tab-store.d.ts.map +0 -1
- package/dist/browser/stores/tab-store.js +0 -369
- package/dist/browser/stores/tab-store.js.map +0 -1
- package/dist/core/session/send-queue.d.ts +0 -70
- package/dist/core/session/send-queue.d.ts.map +0 -1
- package/dist/core/session/send-queue.js +0 -116
- package/dist/core/session/send-queue.js.map +0 -1
|
@@ -1,18 +1,84 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Client-side projection of a staged/committed session rewind.
|
|
3
|
+
*
|
|
4
|
+
* `session.revert` is a STAGED pointer server-side — OpenCode never deletes
|
|
5
|
+
* anything until the next prompt COMMITS it (and `unrevert` restores it while
|
|
6
|
+
* staged). Nothing here talks to the network; this module is the pure math
|
|
7
|
+
* the sync store and `useSession` share for two questions:
|
|
8
|
+
*
|
|
9
|
+
* 1. Which locally-known messages does a staged rewind hide?
|
|
10
|
+
* 2. When is a message id inside the range a committed rewind must delete?
|
|
11
|
+
*
|
|
12
|
+
* `watermark` exists to fix a real bug: hiding used to be "everything at-or-
|
|
13
|
+
* after the boundary id", recomputed on every render off the CURRENT message
|
|
14
|
+
* list. A message minted AFTER staging — the user's replacement prompt, its
|
|
15
|
+
* answer — sorts above the boundary by id exactly like every OTHER later
|
|
16
|
+
* message, so it fell inside "everything after the boundary" too and never
|
|
17
|
+
* rendered until an unrelated remount flooded the whole transcript back,
|
|
18
|
+
* interleaved. `watermark` freezes the upper edge of the hide window at the
|
|
19
|
+
* newest message id known AT STAGE TIME, so only messages that were already
|
|
20
|
+
* part of the abandoned trajectory are ever hidden — anything newer always
|
|
21
|
+
* renders.
|
|
22
|
+
*/
|
|
6
23
|
export interface SessionRewindState {
|
|
24
|
+
/** The message the rewind pointer sits at — hidden along with everything
|
|
25
|
+
* up to `watermark`. */
|
|
7
26
|
messageId: string;
|
|
27
|
+
/**
|
|
28
|
+
* The newest message id known locally at the moment this rewind was staged
|
|
29
|
+
* (or first observed). The upper bound of the hide window — fixed once,
|
|
30
|
+
* never recomputed against a later, larger message list.
|
|
31
|
+
*/
|
|
32
|
+
watermark: string;
|
|
33
|
+
/**
|
|
34
|
+
* False once the replacement prompt has been sent (or a
|
|
35
|
+
* `session.next.revert.committed` wire event says the server has). The
|
|
36
|
+
* hide window still applies while this is false — what stops being offered
|
|
37
|
+
* is Restore (`unrevert`), not the hiding. A committed rewind's window is
|
|
38
|
+
* deleted outright once the store observes it, not merely hidden — see
|
|
39
|
+
* `applyCommittedRevert` on the sync store.
|
|
40
|
+
*/
|
|
8
41
|
staged: boolean;
|
|
9
42
|
}
|
|
10
|
-
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export declare function
|
|
43
|
+
/** Whether `id` falls inside the [messageId, watermark] hide range — both
|
|
44
|
+
* bounds inclusive: the boundary message itself is part of what an edit
|
|
45
|
+
* replaces, and the watermark is the last message known at stage time. */
|
|
46
|
+
export declare function isWithinRewindWindow(id: string, rewind: SessionRewindState): boolean;
|
|
47
|
+
/**
|
|
48
|
+
* The newest (highest sort-order) message id in `messages`, or `null` for an
|
|
49
|
+
* empty list. Deliberately a max-scan, not "the last element" — most callers
|
|
50
|
+
* pass an ascending-sorted list, but an optimistic entry appended out of
|
|
51
|
+
* order must never win the max by position alone.
|
|
52
|
+
*/
|
|
53
|
+
export declare function newestMessageId<T extends {
|
|
14
54
|
info: {
|
|
15
55
|
id: string;
|
|
16
56
|
};
|
|
17
|
-
}>(messages: T[]
|
|
57
|
+
}>(messages: T[]): string | null;
|
|
58
|
+
/**
|
|
59
|
+
* Build the state for a freshly staged (or freshly discovered) rewind.
|
|
60
|
+
* `watermark` is captured HERE, from the message list at this exact moment —
|
|
61
|
+
* never recomputed later. Falls back to `messageId` itself when nothing is
|
|
62
|
+
* known locally yet (a cross-tab or reload discovery with no synced messages
|
|
63
|
+
* for this session), which hides only the boundary message and nothing
|
|
64
|
+
* else — the narrowest correct answer with no other information available.
|
|
65
|
+
*/
|
|
66
|
+
export declare function stageSessionRewind<T extends {
|
|
67
|
+
info: {
|
|
68
|
+
id: string;
|
|
69
|
+
};
|
|
70
|
+
}>(messages: T[], messageId: string): SessionRewindState;
|
|
71
|
+
/** Hide the target message and every message up to the staged watermark.
|
|
72
|
+
* Returns the SAME array reference when nothing is actually hidden — a
|
|
73
|
+
* fresh array on every call would defeat memoization in every consumer. */
|
|
74
|
+
export declare function messagesBeforeRewind<T extends {
|
|
75
|
+
info: {
|
|
76
|
+
id: string;
|
|
77
|
+
};
|
|
78
|
+
}>(messages: T[], rewind: SessionRewindState | null): T[];
|
|
79
|
+
/** Mark the rewind as committed while its removed path remains hidden
|
|
80
|
+
* locally (the actual deletion is a separate, explicit store action driven
|
|
81
|
+
* by the wire's `.committed` event — see `applyCommittedRevert`). Returns
|
|
82
|
+
* the SAME reference when already committed or when `rewind` is `null`. */
|
|
83
|
+
export declare function commitSessionRewind(rewind: SessionRewindState | null): SessionRewindState | null;
|
|
18
84
|
//# sourceMappingURL=rewind.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rewind.d.ts","sourceRoot":"","sources":["../../../src/core/session/rewind.ts"],"names":[],"mappings":"AAAA,wBAAgB,oBAAoB,CAAC,CAAC,SAAS;IAAE,IAAI,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"rewind.d.ts","sourceRoot":"","sources":["../../../src/core/session/rewind.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,MAAM,WAAW,kBAAkB;IACjC;6BACyB;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;;;;;;OAOG;IACH,MAAM,EAAE,OAAO,CAAC;CACjB;AAED;;2EAE2E;AAC3E,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAEpF;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS;IAAE,IAAI,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,EAChE,QAAQ,EAAE,CAAC,EAAE,GACZ,MAAM,GAAG,IAAI,CAMf;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS;IAAE,IAAI,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,EACnE,QAAQ,EAAE,CAAC,EAAE,EACb,SAAS,EAAE,MAAM,GAChB,kBAAkB,CAMpB;AAED;;4EAE4E;AAC5E,wBAAgB,oBAAoB,CAAC,CAAC,SAAS;IAAE,IAAI,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,EACrE,QAAQ,EAAE,CAAC,EAAE,EACb,MAAM,EAAE,kBAAkB,GAAG,IAAI,GAChC,CAAC,EAAE,CAIL;AAED;;;4EAG4E;AAC5E,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,kBAAkB,GAAG,IAAI,GAChC,kBAAkB,GAAG,IAAI,CAE3B"}
|
|
@@ -1,17 +1,74 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Client-side projection of a staged/committed session rewind.
|
|
3
|
+
*
|
|
4
|
+
* `session.revert` is a STAGED pointer server-side — OpenCode never deletes
|
|
5
|
+
* anything until the next prompt COMMITS it (and `unrevert` restores it while
|
|
6
|
+
* staged). Nothing here talks to the network; this module is the pure math
|
|
7
|
+
* the sync store and `useSession` share for two questions:
|
|
8
|
+
*
|
|
9
|
+
* 1. Which locally-known messages does a staged rewind hide?
|
|
10
|
+
* 2. When is a message id inside the range a committed rewind must delete?
|
|
11
|
+
*
|
|
12
|
+
* `watermark` exists to fix a real bug: hiding used to be "everything at-or-
|
|
13
|
+
* after the boundary id", recomputed on every render off the CURRENT message
|
|
14
|
+
* list. A message minted AFTER staging — the user's replacement prompt, its
|
|
15
|
+
* answer — sorts above the boundary by id exactly like every OTHER later
|
|
16
|
+
* message, so it fell inside "everything after the boundary" too and never
|
|
17
|
+
* rendered until an unrelated remount flooded the whole transcript back,
|
|
18
|
+
* interleaved. `watermark` freezes the upper edge of the hide window at the
|
|
19
|
+
* newest message id known AT STAGE TIME, so only messages that were already
|
|
20
|
+
* part of the abandoned trajectory are ever hidden — anything newer always
|
|
21
|
+
* renders.
|
|
22
|
+
*/
|
|
23
|
+
/** Whether `id` falls inside the [messageId, watermark] hide range — both
|
|
24
|
+
* bounds inclusive: the boundary message itself is part of what an edit
|
|
25
|
+
* replaces, and the watermark is the last message known at stage time. */
|
|
26
|
+
export function isWithinRewindWindow(id, rewind) {
|
|
27
|
+
return id >= rewind.messageId && id <= rewind.watermark;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* The newest (highest sort-order) message id in `messages`, or `null` for an
|
|
31
|
+
* empty list. Deliberately a max-scan, not "the last element" — most callers
|
|
32
|
+
* pass an ascending-sorted list, but an optimistic entry appended out of
|
|
33
|
+
* order must never win the max by position alone.
|
|
34
|
+
*/
|
|
35
|
+
export function newestMessageId(messages) {
|
|
36
|
+
let max = null;
|
|
37
|
+
for (const message of messages) {
|
|
38
|
+
if (max === null || message.info.id > max)
|
|
39
|
+
max = message.info.id;
|
|
40
|
+
}
|
|
41
|
+
return max;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Build the state for a freshly staged (or freshly discovered) rewind.
|
|
45
|
+
* `watermark` is captured HERE, from the message list at this exact moment —
|
|
46
|
+
* never recomputed later. Falls back to `messageId` itself when nothing is
|
|
47
|
+
* known locally yet (a cross-tab or reload discovery with no synced messages
|
|
48
|
+
* for this session), which hides only the boundary message and nothing
|
|
49
|
+
* else — the narrowest correct answer with no other information available.
|
|
50
|
+
*/
|
|
51
|
+
export function stageSessionRewind(messages, messageId) {
|
|
52
|
+
return {
|
|
53
|
+
messageId,
|
|
54
|
+
watermark: newestMessageId(messages) ?? messageId,
|
|
55
|
+
staged: true,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
/** Hide the target message and every message up to the staged watermark.
|
|
59
|
+
* Returns the SAME array reference when nothing is actually hidden — a
|
|
60
|
+
* fresh array on every call would defeat memoization in every consumer. */
|
|
61
|
+
export function messagesBeforeRewind(messages, rewind) {
|
|
62
|
+
if (!rewind)
|
|
3
63
|
return messages;
|
|
4
|
-
const
|
|
5
|
-
return
|
|
64
|
+
const kept = messages.filter((message) => !isWithinRewindWindow(message.info.id, rewind));
|
|
65
|
+
return kept.length === messages.length ? messages : kept;
|
|
6
66
|
}
|
|
7
|
-
/** Mark the rewind as committed while its removed path remains hidden
|
|
67
|
+
/** Mark the rewind as committed while its removed path remains hidden
|
|
68
|
+
* locally (the actual deletion is a separate, explicit store action driven
|
|
69
|
+
* by the wire's `.committed` event — see `applyCommittedRevert`). Returns
|
|
70
|
+
* the SAME reference when already committed or when `rewind` is `null`. */
|
|
8
71
|
export function commitSessionRewind(rewind) {
|
|
9
72
|
return rewind?.staged ? { ...rewind, staged: false } : rewind;
|
|
10
73
|
}
|
|
11
|
-
/** Drop the local boundary after runtime synchronization confirms cleanup. */
|
|
12
|
-
export function reconcileCommittedSessionRewind(messages, rewind) {
|
|
13
|
-
if (!rewind || rewind.staged)
|
|
14
|
-
return rewind;
|
|
15
|
-
return messages.some((message) => message.info.id === rewind.messageId) ? rewind : null;
|
|
16
|
-
}
|
|
17
74
|
//# sourceMappingURL=rewind.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rewind.js","sourceRoot":"","sources":["../../../src/core/session/rewind.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,oBAAoB,
|
|
1
|
+
{"version":3,"file":"rewind.js","sourceRoot":"","sources":["../../../src/core/session/rewind.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAuBH;;2EAE2E;AAC3E,MAAM,UAAU,oBAAoB,CAAC,EAAU,EAAE,MAA0B;IACzE,OAAO,EAAE,IAAI,MAAM,CAAC,SAAS,IAAI,EAAE,IAAI,MAAM,CAAC,SAAS,CAAC;AAC1D,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAC7B,QAAa;IAEb,IAAI,GAAG,GAAkB,IAAI,CAAC;IAC9B,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,IAAI,GAAG,KAAK,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,EAAE,GAAG,GAAG;YAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;IACnE,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,kBAAkB,CAChC,QAAa,EACb,SAAiB;IAEjB,OAAO;QACL,SAAS;QACT,SAAS,EAAE,eAAe,CAAC,QAAQ,CAAC,IAAI,SAAS;QACjD,MAAM,EAAE,IAAI;KACb,CAAC;AACJ,CAAC;AAED;;4EAE4E;AAC5E,MAAM,UAAU,oBAAoB,CAClC,QAAa,EACb,MAAiC;IAEjC,IAAI,CAAC,MAAM;QAAE,OAAO,QAAQ,CAAC;IAC7B,MAAM,IAAI,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,oBAAoB,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC;IAC1F,OAAO,IAAI,CAAC,MAAM,KAAK,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC;AAC3D,CAAC;AAED;;;4EAG4E;AAC5E,MAAM,UAAU,mBAAmB,CACjC,MAAiC;IAEjC,OAAO,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,GAAG,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC;AAChE,CAAC"}
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import type { SessionPrompt, SessionTurn, SessionTurnEnded } from '../rest/projects-client/sessions.js';
|
|
2
|
+
/**
|
|
3
|
+
* WHICH observation decided the state.
|
|
4
|
+
*
|
|
5
|
+
* `server` — `GET .../turn`, the control plane's lifecycle authority, or the
|
|
6
|
+
* session's durable prompt inbox. Both are rows the server owns.
|
|
7
|
+
* `stream` — a `session.status` / `session.idle` frame off the live SSE stream.
|
|
8
|
+
* `optimistic` — this tab's own send receipt, which no server source has
|
|
9
|
+
* answered yet.
|
|
10
|
+
*
|
|
11
|
+
* Provenance is part of the answer because the failure this replaces was a
|
|
12
|
+
* projection nobody could attribute: three machines wrote "busy" into one
|
|
13
|
+
* slot — a stall timer, a 30s safety timeout, a status latch — and when the
|
|
14
|
+
* session stayed busy forever, no one could say which of them was lying.
|
|
15
|
+
*/
|
|
16
|
+
export type WorkingSource = 'server' | 'stream' | 'optimistic';
|
|
17
|
+
export interface WorkingProjection {
|
|
18
|
+
state: 'idle' | 'working';
|
|
19
|
+
/** WHICH observation decided this. Never inferred, never fabricated. */
|
|
20
|
+
source: WorkingSource;
|
|
21
|
+
/** The wire message id (server) or the optimistic receipt id. */
|
|
22
|
+
turnId: string | null;
|
|
23
|
+
/** ms epoch at which THIS state began, from the deciding observation. */
|
|
24
|
+
since: number;
|
|
25
|
+
/**
|
|
26
|
+
* The `turn_token` of the turn the control plane is holding open in the
|
|
27
|
+
* freshest read we have, EVEN WHEN something newer outranked it above.
|
|
28
|
+
*
|
|
29
|
+
* `state` is the answer; this is the raw fact behind one of its inputs, and
|
|
30
|
+
* the two are deliberately separable. A caller that must not act while the
|
|
31
|
+
* server still holds authority — a `/` command, which goes straight at
|
|
32
|
+
* OpenCode with no admission gate in front of it — needs to see that
|
|
33
|
+
* authority even in the window where a fresher status frame is (correctly)
|
|
34
|
+
* deciding `idle`. `null` when no fresh read reports one, so a read too old
|
|
35
|
+
* to decide cannot latch it.
|
|
36
|
+
*
|
|
37
|
+
* The TOKEN, never `message_id`. `message_id` is the WIRE id of the prompt
|
|
38
|
+
* that opened the turn, and most producers send none: `postPrompt` omits
|
|
39
|
+
* `messageID` for triggers, Slack/Teams/Telegram, approval-resume and email,
|
|
40
|
+
* and `buildSessionCommandInput` omits it for every `/` command. `GET
|
|
41
|
+
* .../turn` answers `message_id: null` for all of them (the field is
|
|
42
|
+
* `z.string().nullable()`), so an authority check keyed on it read "the
|
|
43
|
+
* server holds nothing" over turns that were streaming. `turn_token` is
|
|
44
|
+
* minted by the control plane for every turn and is never null.
|
|
45
|
+
*/
|
|
46
|
+
serverOpenTurnToken: string | null;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* How long an unanswered optimistic receipt may claim `working` on its own.
|
|
50
|
+
*
|
|
51
|
+
* Bounded because a send whose response never arrives must not latch the UI —
|
|
52
|
+
* the failure this whole phase exists to end. Released the moment a server
|
|
53
|
+
* source that CAN know about the send answers; the cap only covers the case
|
|
54
|
+
* where none ever does.
|
|
55
|
+
*/
|
|
56
|
+
export declare const OPTIMISTIC_RECEIPT_MAX_MS = 60000;
|
|
57
|
+
/**
|
|
58
|
+
* How long a server observation keeps deciding anything.
|
|
59
|
+
*
|
|
60
|
+
* `useSessionWorking` polls `GET .../turn` every 5s while working and every
|
|
61
|
+
* 15s while idle, and react-query hands back the last SUCCESSFUL read for as
|
|
62
|
+
* long as the ones after it fail. Without this bound, one successful read of an
|
|
63
|
+
* open turn followed by a dev-api 503, an expired JWT, or a closed laptop lid
|
|
64
|
+
* pinned the composer on "working" for the lifetime of the tab — literally the
|
|
65
|
+
* reported bug. Three idle cadences is long enough that an ordinary retry or a
|
|
66
|
+
* backgrounded tab never trips it, and short enough that a dead poll stops
|
|
67
|
+
* being believed.
|
|
68
|
+
*/
|
|
69
|
+
export declare const SERVER_OBSERVATION_MAX_MS = 45000;
|
|
70
|
+
/**
|
|
71
|
+
* How long a status frame keeps deciding anything.
|
|
72
|
+
*
|
|
73
|
+
* The stream needs its own bound for the same reason the server read does, and
|
|
74
|
+
* the failure it covers is the SAME one: the SSE stream reaches this tab
|
|
75
|
+
* through the API that serves `/turn`, so when that API drains they stop
|
|
76
|
+
* together. The stream does not go `null` when it stops — the last `busy`
|
|
77
|
+
* frame this tab ever observed stays in the store — so bounding only the
|
|
78
|
+
* server read moved the latch one source over instead of ending it.
|
|
79
|
+
*
|
|
80
|
+
* Equal to the server bound on purpose: while the API answers at all, a fresh
|
|
81
|
+
* `/turn` read decides and this bound is never reached; once it stops
|
|
82
|
+
* answering, both observations are equally blind and neither may stand.
|
|
83
|
+
*/
|
|
84
|
+
export declare const STREAM_OBSERVATION_MAX_MS = 45000;
|
|
85
|
+
/**
|
|
86
|
+
* How long ONE reading of the durable inbox keeps deciding.
|
|
87
|
+
*
|
|
88
|
+
* Three cadences of the prompt list's own poll (3s), not of `/turn`'s. A
|
|
89
|
+
* reading says "the server still intends to run N rows", and that claim decays
|
|
90
|
+
* fast: the row it counted may already have been delivered, run, and finished.
|
|
91
|
+
* Held for the server bound instead, a finished prompt left the composer on
|
|
92
|
+
* Stop with its reply on screen for up to 45s.
|
|
93
|
+
*/
|
|
94
|
+
export declare const INBOX_OBSERVATION_MAX_MS = 10000;
|
|
95
|
+
/**
|
|
96
|
+
* How long a stop this tab issued may bar a server read from reporting the
|
|
97
|
+
* turn it is ending.
|
|
98
|
+
*
|
|
99
|
+
* Bounded for the same reason the send receipt is, in the other direction: an
|
|
100
|
+
* abort whose acknowledgement never comes must not pin the composer on `idle`
|
|
101
|
+
* over a turn that is genuinely still running. Generous next to the ~1.6s a
|
|
102
|
+
* cancel takes to reach the daemon, and far below the send receipt's cap
|
|
103
|
+
* because the evidence arrives sooner.
|
|
104
|
+
*/
|
|
105
|
+
export declare const OPTIMISTIC_ABORT_MAX_MS = 15000;
|
|
106
|
+
/** This tab's own record that a prompt went out. */
|
|
107
|
+
export interface SendReceipt {
|
|
108
|
+
/** The submission's tab-local name — never sent anywhere. It exists so a
|
|
109
|
+
* `working` state can say WHICH send it is standing on. */
|
|
110
|
+
messageId: string;
|
|
111
|
+
/** ms epoch at which the send left this tab. */
|
|
112
|
+
atMs: number;
|
|
113
|
+
/**
|
|
114
|
+
* ms epoch at which the SERVER durably accepted the send (`POST .../prompts`
|
|
115
|
+
* returned, or the REST prompt was acknowledged), or null while the request
|
|
116
|
+
* is still on the wire.
|
|
117
|
+
*
|
|
118
|
+
* This is the instant from which a server read can speak for the send AT ALL.
|
|
119
|
+
* A `/turn` read issued while the POST is still in flight is stamped after
|
|
120
|
+
* the receipt and honestly answers "no turns" — because there is nothing for
|
|
121
|
+
* it to see yet. Believing it swapped the composer's Stop back to Send in the
|
|
122
|
+
* middle of the send and opened the queue drain into the turn about to start.
|
|
123
|
+
*/
|
|
124
|
+
acceptedAtMs?: number | null;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* This tab's own record that it asked the running turn to END.
|
|
128
|
+
*
|
|
129
|
+
* The mirror of `SendReceipt`, and it exists for the mirror-image failure. Stop
|
|
130
|
+
* paints the session idle and issues the cancel; the cancel needs a round trip
|
|
131
|
+
* through the control plane and the daemon (~1.6s measured) before the turn
|
|
132
|
+
* authority is actually released. Every `/turn` read issued inside that window
|
|
133
|
+
* still reports the doomed turn — including the one the optimistic idle FRAME
|
|
134
|
+
* itself triggers — so the composer swapped Send back to Stop about 120ms
|
|
135
|
+
* after the click and stayed there for the whole abort.
|
|
136
|
+
*/
|
|
137
|
+
export interface AbortReceipt {
|
|
138
|
+
/** ms epoch at which the cancel left this tab. */
|
|
139
|
+
atMs: number;
|
|
140
|
+
/**
|
|
141
|
+
* ms epoch at which the server acknowledged the cancel, or null while it is
|
|
142
|
+
* still on the wire.
|
|
143
|
+
*
|
|
144
|
+
* This is the instant from which a server read can see the abort's EFFECT.
|
|
145
|
+
* A read issued before it is honest and out of date, exactly like a `/turn`
|
|
146
|
+
* read issued before `POST .../prompts` returns.
|
|
147
|
+
*/
|
|
148
|
+
settledAtMs?: number | null;
|
|
149
|
+
}
|
|
150
|
+
/** One read of `GET .../turn`, stamped with the instant the read was ISSUED —
|
|
151
|
+
* not when it landed. An answer is only as fresh as the moment it was asked. */
|
|
152
|
+
export interface WorkingServerInput {
|
|
153
|
+
turns: SessionTurn[];
|
|
154
|
+
lastEnded?: SessionTurnEnded;
|
|
155
|
+
atMs: number;
|
|
156
|
+
}
|
|
157
|
+
/** One observed runtime status frame, stamped when this tab observed it. */
|
|
158
|
+
export interface WorkingStreamInput {
|
|
159
|
+
type: 'busy' | 'retry' | 'idle';
|
|
160
|
+
atMs: number;
|
|
161
|
+
}
|
|
162
|
+
/** One read of the session's durable prompt inbox: how many rows the server is
|
|
163
|
+
* still going to run, and when that list was read. */
|
|
164
|
+
export interface WorkingInboxInput {
|
|
165
|
+
pending: number;
|
|
166
|
+
atMs: number;
|
|
167
|
+
}
|
|
168
|
+
export interface WorkingInputs {
|
|
169
|
+
optimistic: SendReceipt | null;
|
|
170
|
+
/** This tab's pending stop. `null`/absent means it is not stopping. */
|
|
171
|
+
abort?: AbortReceipt | null;
|
|
172
|
+
/** The durable inbox. `null`/absent means it has never been read here. */
|
|
173
|
+
inbox?: WorkingInboxInput | null;
|
|
174
|
+
server: WorkingServerInput | null;
|
|
175
|
+
stream: WorkingStreamInput | null;
|
|
176
|
+
nowMs: number;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* How many inbox rows are work the server still intends to run.
|
|
180
|
+
*
|
|
181
|
+
* `held` is excluded on purpose: it is the Stop button's own state — the row
|
|
182
|
+
* stays, deliberately not due, until the user sends something or presses "send
|
|
183
|
+
* now". Counting it would leave the composer on Stop with nothing running.
|
|
184
|
+
* `failed` is excluded for the same reason in the other direction: it is over.
|
|
185
|
+
*/
|
|
186
|
+
export declare function countLiveInboxPrompts(prompts: readonly SessionPrompt[]): number;
|
|
187
|
+
/**
|
|
188
|
+
* The one place a session's working state is decided.
|
|
189
|
+
*
|
|
190
|
+
* Pure, so every rule below is asserted rather than observed by hand. No
|
|
191
|
+
* timers, no latch, no fabricated `SessionStatus` write — a caller that wants
|
|
192
|
+
* to re-evaluate simply calls again with a newer `nowMs`.
|
|
193
|
+
*
|
|
194
|
+
* Precedence:
|
|
195
|
+
*
|
|
196
|
+
* 1. The server is holding a turn open, and no NEWER stream frame contradicts
|
|
197
|
+
* it → working. `GET .../turn` reads the lifecycle authority rather than the
|
|
198
|
+
* ledger, so it is the strongest answer there is — but it is still a read
|
|
199
|
+
* taken at an instant, and an SSE frame from after that instant knows more.
|
|
200
|
+
* 2. The server holds durable inbox rows for this session → working. A prompt
|
|
201
|
+
* is accepted long before it is a turn: the row has to be drained, the box
|
|
202
|
+
* may have to resume (18.9s Daytona / 24.5s Platinum, measured), and only
|
|
203
|
+
* then does `beginSandboxTurn` run. "No turn is running" and "nothing of
|
|
204
|
+
* yours is in flight" stopped being the same statement when the inbox
|
|
205
|
+
* landed.
|
|
206
|
+
* 3. The server says no turns, and its read is at least as new as the stream's
|
|
207
|
+
* last frame → idle. (A dropped end-of-turn frame is exactly why the server
|
|
208
|
+
* has to be able to outrank a stale stream busy.)
|
|
209
|
+
* 4. The stream's own frame decides.
|
|
210
|
+
* 5. A live optimistic receipt → working.
|
|
211
|
+
* 6. Nothing observed → idle.
|
|
212
|
+
*
|
|
213
|
+
* With TWO cross-cutting freshness rules:
|
|
214
|
+
*
|
|
215
|
+
* * An observation that could not yet know about a live LOCAL action cannot
|
|
216
|
+
* answer for it — the send's floors (`SendReceipt.acceptedAtMs`) and the
|
|
217
|
+
* stop's (`AbortReceipt.settledAtMs`), all built the same way.
|
|
218
|
+
* * EVERY observation has a maximum age, and past it decides nothing at all in
|
|
219
|
+
* either direction: `SERVER_OBSERVATION_MAX_MS`, `STREAM_OBSERVATION_MAX_MS`,
|
|
220
|
+
* `INBOX_OBSERVATION_MAX_MS`. An observation the poll has failed to refresh
|
|
221
|
+
* for that long is not evidence, and standing on one is the latch. Callers
|
|
222
|
+
* must re-evaluate at those instants — see `workingExpiryAtMs`.
|
|
223
|
+
*/
|
|
224
|
+
export declare function projectWorking(inputs: WorkingInputs): WorkingProjection;
|
|
225
|
+
/**
|
|
226
|
+
* The next instant at which `projectWorking` could answer differently on its
|
|
227
|
+
* own — i.e. when the OLDEST-lived input ages past its bound.
|
|
228
|
+
*
|
|
229
|
+
* The projection is pure and moves with `nowMs`, which means something has to
|
|
230
|
+
* ask it again at that instant or the bound is never applied. Nothing did: the
|
|
231
|
+
* hook re-renders when react-query hands it new `data`, and a run of failed
|
|
232
|
+
* reads hands back the SAME retained `data` — the observer does not even
|
|
233
|
+
* notify. `SERVER_OBSERVATION_MAX_MS` was therefore evaluated only on renders
|
|
234
|
+
* that happened for some unrelated reason, and in the exact outage it was
|
|
235
|
+
* written for (one success, then a run of 503s) there are none.
|
|
236
|
+
*
|
|
237
|
+
* `null` when nothing is left to expire. Deadlines already in the past are
|
|
238
|
+
* skipped, so re-arming from the timer this returns terminates.
|
|
239
|
+
*/
|
|
240
|
+
export declare function workingExpiryAtMs(inputs: WorkingInputs): number | null;
|
|
241
|
+
//# sourceMappingURL=working.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"working.d.ts","sourceRoot":"","sources":["../../../src/core/session/working.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,WAAW,EACX,gBAAgB,EACjB,MAAM,kCAAkC,CAAC;AAE1C;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,QAAQ,GAAG,YAAY,CAAC;AAE/D,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,wEAAwE;IACxE,MAAM,EAAE,aAAa,CAAC;IACtB,iEAAiE;IACjE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,yEAAyE;IACzE,KAAK,EAAE,MAAM,CAAC;IACd;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;CACpC;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,QAAS,CAAC;AAEhD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,yBAAyB,QAAS,CAAC;AAEhD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,yBAAyB,QAAS,CAAC;AAEhD;;;;;;;;GAQG;AACH,eAAO,MAAM,wBAAwB,QAAS,CAAC;AAE/C;;;;;;;;;GASG;AACH,eAAO,MAAM,uBAAuB,QAAS,CAAC;AAE9C,oDAAoD;AACpD,MAAM,WAAW,WAAW;IAC1B;gEAC4D;IAC5D,SAAS,EAAE,MAAM,CAAC;IAClB,gDAAgD;IAChD,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;;;;;OAUG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,YAAY;IAC3B,kDAAkD;IAClD,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED;iFACiF;AACjF,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC;CACd;AAED,4EAA4E;AAC5E,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;IAChC,IAAI,EAAE,MAAM,CAAC;CACd;AAED;uDACuD;AACvD,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/B,uEAAuE;IACvE,KAAK,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;IAC5B,0EAA0E;IAC1E,KAAK,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACjC,MAAM,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAClC,MAAM,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAClC,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,SAAS,aAAa,EAAE,GAAG,MAAM,CAO/E;AASD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,aAAa,GAAG,iBAAiB,CAmHvE;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,GAAG,IAAI,CAetE"}
|