@kortix/sdk 0.13.38 → 0.13.40
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 +7 -2
- package/dist/browser/session-sync/server-transcript-mirror.d.ts +12 -0
- package/dist/browser/session-sync/server-transcript-mirror.d.ts.map +1 -1
- package/dist/browser/session-sync/server-transcript-mirror.js +22 -0
- package/dist/browser/session-sync/server-transcript-mirror.js.map +1 -1
- package/dist/browser/stores/sync-store.d.ts +7 -0
- package/dist/browser/stores/sync-store.d.ts.map +1 -1
- package/dist/browser/stores/sync-store.js +15 -0
- package/dist/browser/stores/sync-store.js.map +1 -1
- package/dist/core/cache/persisted-query-cache.d.ts +111 -0
- package/dist/core/cache/persisted-query-cache.d.ts.map +1 -0
- package/dist/core/cache/persisted-query-cache.js +264 -0
- package/dist/core/cache/persisted-query-cache.js.map +1 -0
- package/dist/core/client/kortix.d.ts +16 -0
- package/dist/core/client/kortix.d.ts.map +1 -1
- package/dist/core/client/kortix.js +8 -0
- package/dist/core/client/kortix.js.map +1 -1
- package/dist/core/rest/projects-client/connectors.d.ts +1 -2
- 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/sessions.d.ts +38 -0
- package/dist/core/rest/projects-client/sessions.d.ts.map +1 -1
- package/dist/core/rest/projects-client/sessions.js.map +1 -1
- package/dist/core/rest/projects-client/triggers.d.ts +0 -1
- package/dist/core/rest/projects-client/triggers.d.ts.map +1 -1
- package/dist/core/rest/projects-client/triggers.js.map +1 -1
- package/dist/core/runtime/client.d.ts +1 -2
- package/dist/core/runtime/client.d.ts.map +1 -1
- package/dist/core/runtime/client.js +1 -2
- package/dist/core/runtime/client.js.map +1 -1
- package/dist/core/session/connection.d.ts +12 -0
- package/dist/core/session/connection.d.ts.map +1 -1
- package/dist/core/session/connection.js +52 -0
- package/dist/core/session/connection.js.map +1 -1
- package/dist/core/session/index.d.ts +1 -0
- package/dist/core/session/index.d.ts.map +1 -1
- package/dist/core/session/index.js +1 -0
- package/dist/core/session/index.js.map +1 -1
- package/dist/core/session/open-bundle.d.ts +7 -1
- package/dist/core/session/open-bundle.d.ts.map +1 -1
- package/dist/core/session/open-bundle.js +17 -0
- package/dist/core/session/open-bundle.js.map +1 -1
- package/dist/core/session/server-store/url-helpers.d.ts +13 -8
- package/dist/core/session/server-store/url-helpers.d.ts.map +1 -1
- package/dist/core/session/server-store/url-helpers.js +15 -10
- package/dist/core/session/server-store/url-helpers.js.map +1 -1
- package/dist/core/session/status-vocabulary.d.ts +76 -0
- package/dist/core/session/status-vocabulary.d.ts.map +1 -0
- package/dist/core/session/status-vocabulary.js +112 -0
- package/dist/core/session/status-vocabulary.js.map +1 -0
- package/dist/core/session-sync/saved-copy-store.d.ts +68 -0
- package/dist/core/session-sync/saved-copy-store.d.ts.map +1 -0
- package/dist/core/session-sync/saved-copy-store.js +236 -0
- package/dist/core/session-sync/saved-copy-store.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/kortix.esm.min.js +36 -36
- package/dist/kortix.global.js +36 -36
- package/dist/react/opencode.d.ts +1 -0
- package/dist/react/opencode.d.ts.map +1 -1
- package/dist/react/opencode.js +1 -0
- package/dist/react/opencode.js.map +1 -1
- package/dist/react/session-cache-write.d.ts +8 -0
- package/dist/react/session-cache-write.d.ts.map +1 -1
- package/dist/react/session-cache-write.js +35 -4
- package/dist/react/session-cache-write.js.map +1 -1
- package/dist/react/session-title-sync.d.ts.map +1 -1
- package/dist/react/session-title-sync.js +12 -1
- package/dist/react/session-title-sync.js.map +1 -1
- package/dist/react/use-opencode-events/helpers.d.ts.map +1 -1
- package/dist/react/use-opencode-events/helpers.js +24 -24
- package/dist/react/use-opencode-events/helpers.js.map +1 -1
- package/dist/react/use-session-audit.d.ts +13 -0
- package/dist/react/use-session-audit.d.ts.map +1 -0
- package/dist/react/use-session-audit.js +52 -0
- package/dist/react/use-session-audit.js.map +1 -0
- package/dist/react/use-session-sync.d.ts.map +1 -1
- package/dist/react/use-session-sync.js +78 -18
- package/dist/react/use-session-sync.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,3 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ONE answer to "what is this session's runtime doing", for every surface that
|
|
3
|
+
* draws it.
|
|
4
|
+
*
|
|
5
|
+
* ## Why this exists
|
|
6
|
+
*
|
|
7
|
+
* The frontend had four independent sources for that question — the control
|
|
8
|
+
* plane's session row, a health probe, the runtime's SSE frames, and the
|
|
9
|
+
* control plane's turn ledger — and every surface picked its own subset. The
|
|
10
|
+
* composer's notice read the probe, the sidebar dot read the row, the Stop
|
|
11
|
+
* button read the ledger and the stream. Each source has its own latency and
|
|
12
|
+
* its own failure mode, so on a cold load they answer in an arbitrary order and
|
|
13
|
+
* the surfaces disagree with each other and with the screen.
|
|
14
|
+
*
|
|
15
|
+
* Worse, the composer's notice treated the ABSENCE of an answer as an answer.
|
|
16
|
+
* A page reload of a session whose sandbox is up and mid-turn showed "Waking
|
|
17
|
+
* this session up…" for seconds before the runtime replied (screen recording,
|
|
18
|
+
* sampleco 2026-08-24) — a negative claim asserted from having asked nobody.
|
|
19
|
+
*
|
|
20
|
+
* ## The rule
|
|
21
|
+
*
|
|
22
|
+
* A negative claim needs positive evidence. `unknown` is a real state and it is
|
|
23
|
+
* the honest one until something answers; nothing may render an alarm from it.
|
|
24
|
+
*
|
|
25
|
+
* Pure, so each rule below is a test rather than a habit.
|
|
26
|
+
*/
|
|
27
|
+
import { isRuntimeReady } from './health.js';
|
|
1
28
|
export function projectSessionConnection(input) {
|
|
2
29
|
// Content outranks every probe, including one that has given up: a runtime
|
|
3
30
|
// that is emitting parts is reachable by definition, whatever a health check
|
|
@@ -33,4 +60,29 @@ export function projectSessionConnection(input) {
|
|
|
33
60
|
export function connectionIsFaulted(connection) {
|
|
34
61
|
return connection === 'unreachable';
|
|
35
62
|
}
|
|
63
|
+
/**
|
|
64
|
+
* What ONE health probe (`getSessionHealth`) says about the session's
|
|
65
|
+
* computer, in this vocabulary. A host that probes on its own — mobile's
|
|
66
|
+
* thread does — reads it here instead of counting every non-200 as a fault:
|
|
67
|
+
* a parked box answers through the control plane, and a booting runtime
|
|
68
|
+
* answers `starting`. Neither is unreachable.
|
|
69
|
+
*
|
|
70
|
+
* A network error never reaches this: the caller that caught it knows the
|
|
71
|
+
* probe got no answer, which is `unreachable`.
|
|
72
|
+
*/
|
|
73
|
+
export function connectionFromHealth(result) {
|
|
74
|
+
// No runtime to probe, or no probe yet: nothing is known, and nothing is said.
|
|
75
|
+
if (!result || result.status === 0)
|
|
76
|
+
return 'unknown';
|
|
77
|
+
if (result.ok && isRuntimeReady(result.health))
|
|
78
|
+
return 'live';
|
|
79
|
+
// The platform answered from its own row: the box is not up, and it was
|
|
80
|
+
// never dialled. That is a sleeping or starting computer, not a lost one.
|
|
81
|
+
if (result.hop === 'control_plane')
|
|
82
|
+
return 'waking';
|
|
83
|
+
// The runtime itself answered, and said it is still booting.
|
|
84
|
+
if (result.ok || result.health?.status === 'starting')
|
|
85
|
+
return 'connecting';
|
|
86
|
+
return 'unreachable';
|
|
87
|
+
}
|
|
36
88
|
//# sourceMappingURL=connection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection.js","sourceRoot":"","sources":["../../../src/core/session/connection.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"connection.js","sourceRoot":"","sources":["../../../src/core/session/connection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EAAE,cAAc,EAA4B,MAAM,UAAU,CAAC;AA8CpE,MAAM,UAAU,wBAAwB,CAAC,KAA8B;IACrE,2EAA2E;IAC3E,6EAA6E;IAC7E,iCAAiC;IACjC,IAAI,KAAK,CAAC,aAAa;QAAE,OAAO,MAAM,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CAAC,MAAM,EAAE,MAAM,KAAK,UAAU;QAAE,OAAO,YAAY,CAAC;IAC3E,OAAO,aAAa,CAAC;AACvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/session/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/session/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/session/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/session/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC"}
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
* empty queue, an idle turn, an empty thread — because a default rendered as an
|
|
40
40
|
* answer is the defect the bundle exists to remove.
|
|
41
41
|
*/
|
|
42
|
-
import { type SessionOpenBundle, type SessionPrompt, type SessionTranscriptSyncEnvelope, type SessionTurn, type SessionTurnEnded, type SessionTurnFailure } from '../rest/projects-client/sessions.js';
|
|
42
|
+
import { type SessionAudit, type SessionOpenBundle, type SessionPrompt, type SessionTranscriptSyncEnvelope, type SessionTurn, type SessionTurnEnded, type SessionTurnFailure } from '../rest/projects-client/sessions.js';
|
|
43
43
|
/**
|
|
44
44
|
* How long a resolved bundle keeps answering claims.
|
|
45
45
|
*
|
|
@@ -100,6 +100,12 @@ export declare function openBundleTurn(bundle: SessionOpenBundle): OpenBundleTur
|
|
|
100
100
|
/** Project the queue leg. `null` for an unknown leg — never `[]`, which would
|
|
101
101
|
* render as "nothing queued" for a queue nobody could read. */
|
|
102
102
|
export declare function openBundleQueue(bundle: SessionOpenBundle): SessionPrompt[] | null;
|
|
103
|
+
/** Project the audit leg onto the exact shape `getSessionAudit(...,
|
|
104
|
+
* { includeEvents: false })` returns — `events`/`next_cursor` simply absent,
|
|
105
|
+
* which `SessionAudit` already declares optional. `null` for an unknown leg
|
|
106
|
+
* — never `{ actions: [] }`, which would read as "nothing pending" for a
|
|
107
|
+
* leg that could not answer. */
|
|
108
|
+
export declare function openBundleAudit(bundle: SessionOpenBundle): SessionAudit | null;
|
|
103
109
|
/**
|
|
104
110
|
* Take the mirrored transcript this open fetched, ONCE.
|
|
105
111
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"open-bundle.d.ts","sourceRoot":"","sources":["../../../src/core/session/open-bundle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,6BAA6B,EAClC,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EAExB,MAAM,kCAAkC,CAAC;AAE1C;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,OAAQ,CAAC;AAE1C;;kEAEkE;AAClE,eAAO,MAAM,6BAA6B,QAAS,CAAC;AAEpD;0CAC0C;AAC1C,eAAO,MAAM,4BAA4B,KAAK,CAAC;AA2B/C;gDACgD;AAChD,wBAAgB,uBAAuB,IAAI,IAAI,CAI9C;AAED,MAAM,WAAW,wBAAwB;IACvC;oDACgD;IAChD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iCAAiC;IACjC,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;CACpB;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE,wBAA6B,GACrC,IAAI,CAyBN;AASD;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,KAAK,GAAE,MAAmB,GACzB,OAAO,CAAC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AAI,CAOtC"}
|
|
@@ -156,6 +156,23 @@ export function openBundleQueue(bundle) {
|
|
|
156
156
|
return null;
|
|
157
157
|
return queue.prompts ?? [];
|
|
158
158
|
}
|
|
159
|
+
/** Project the audit leg onto the exact shape `getSessionAudit(...,
|
|
160
|
+
* { includeEvents: false })` returns — `events`/`next_cursor` simply absent,
|
|
161
|
+
* which `SessionAudit` already declares optional. `null` for an unknown leg
|
|
162
|
+
* — never `{ actions: [] }`, which would read as "nothing pending" for a
|
|
163
|
+
* leg that could not answer. */
|
|
164
|
+
export function openBundleAudit(bundle) {
|
|
165
|
+
const audit = bundle.audit;
|
|
166
|
+
if (!audit || audit.known !== true)
|
|
167
|
+
return null;
|
|
168
|
+
return {
|
|
169
|
+
session_id: audit.session_id,
|
|
170
|
+
agent: audit.agent,
|
|
171
|
+
audit_access: audit.audit_access,
|
|
172
|
+
count: audit.count,
|
|
173
|
+
actions: audit.actions,
|
|
174
|
+
};
|
|
175
|
+
}
|
|
159
176
|
function stashTranscript(key, bundle, nowMs) {
|
|
160
177
|
const transcript = bundle.transcript;
|
|
161
178
|
if (!transcript || transcript.known !== true || transcript.requested !== true)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"open-bundle.js","sourceRoot":"","sources":["../../../src/core/session/open-bundle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"open-bundle.js","sourceRoot":"","sources":["../../../src/core/session/open-bundle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,EAQL,oBAAoB,GACrB,MAAM,kCAAkC,CAAC;AAE1C;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,CAAC;AAE1C;;kEAEkE;AAClE,MAAM,CAAC,MAAM,6BAA6B,GAAG,MAAM,CAAC;A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,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IACxB,WAAW,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACxB,IAAI,KAAK,GAAG,KAAK,CAAC,WAAW,GAAG,6BAA6B;QAAE,OAAO,IAAI,CAAC;IAC3E,OAAO,KAAK,CAAC,QAAQ,CAAC;AACxB,CAAC"}
|
|
@@ -14,17 +14,22 @@
|
|
|
14
14
|
export declare function getBackendUrl(): string;
|
|
15
15
|
export declare function getDefaultSandboxUrl(): string;
|
|
16
16
|
/**
|
|
17
|
-
* Derive the proxy URL for a cloud sandbox by its provider sandbox id
|
|
18
|
-
*
|
|
17
|
+
* Derive the proxy URL for a cloud sandbox by its provider sandbox id, for a
|
|
18
|
+
* given sandbox port. Defaults to 8000 (the OpenCode server). Always computed
|
|
19
|
+
* fresh — never persisted — so route renames can't go stale.
|
|
19
20
|
*/
|
|
20
|
-
export declare function getSandboxServerUrl(sandboxId: string): string;
|
|
21
|
+
export declare function getSandboxServerUrl(sandboxId: string, port?: number): string;
|
|
21
22
|
/**
|
|
22
|
-
* Derive the
|
|
23
|
-
* (a project session's `external_id`).
|
|
24
|
-
*
|
|
25
|
-
*
|
|
23
|
+
* Derive the authenticated proxy URL for a sandbox port by its provider
|
|
24
|
+
* sandbox id (a project session's `external_id`). Defaults to 8000 (the
|
|
25
|
+
* OpenCode server); pass any other sandbox port (e.g. a dev server the agent
|
|
26
|
+
* started) to get the same authenticated `/p/{externalId}/{port}` proxy for
|
|
27
|
+
* it — this is what session-scoped port forwarding (`SessionHandle.sandboxPortUrl`)
|
|
28
|
+
* builds on. Pure function of the id — no dependency on the active server —
|
|
29
|
+
* so we can connect to several session sandboxes in parallel (e.g. background
|
|
30
|
+
* SSE streams for every open session tab).
|
|
26
31
|
*/
|
|
27
|
-
export declare function getSandboxUrlForExternalId(externalId: string): string;
|
|
32
|
+
export declare function getSandboxUrlForExternalId(externalId: string, port?: number): string;
|
|
28
33
|
/**
|
|
29
34
|
* Derive the base URL for the backend's UNAUTHENTICATED public-share proxy
|
|
30
35
|
* (`/v1/p/public-share/{token}/{port}` — see
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url-helpers.d.ts","sourceRoot":"","sources":["../../../../src/core/session/server-store/url-helpers.ts"],"names":[],"mappings":"AAUA;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED,wBAAgB,oBAAoB,IAAI,MAAM,CAM7C;AAED
|
|
1
|
+
{"version":3,"file":"url-helpers.d.ts","sourceRoot":"","sources":["../../../../src/core/session/server-store/url-helpers.ts"],"names":[],"mappings":"AAUA;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED,wBAAgB,oBAAoB,IAAI,MAAM,CAM7C;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,SAAO,GAAG,MAAM,CAE1E;AAED;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,SAAO,GAAG,MAAM,CAElF;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAE7E"}
|
|
@@ -32,20 +32,25 @@ export function getDefaultSandboxUrl() {
|
|
|
32
32
|
return `${getBackendUrl()}/p/${sandboxId}/8000`;
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
|
-
* Derive the proxy URL for a cloud sandbox by its provider sandbox id
|
|
36
|
-
*
|
|
35
|
+
* Derive the proxy URL for a cloud sandbox by its provider sandbox id, for a
|
|
36
|
+
* given sandbox port. Defaults to 8000 (the OpenCode server). Always computed
|
|
37
|
+
* fresh — never persisted — so route renames can't go stale.
|
|
37
38
|
*/
|
|
38
|
-
export function getSandboxServerUrl(sandboxId) {
|
|
39
|
-
return `${getBackendUrl()}/p/${sandboxId}
|
|
39
|
+
export function getSandboxServerUrl(sandboxId, port = 8000) {
|
|
40
|
+
return `${getBackendUrl()}/p/${sandboxId}/${port}`;
|
|
40
41
|
}
|
|
41
42
|
/**
|
|
42
|
-
* Derive the
|
|
43
|
-
* (a project session's `external_id`).
|
|
44
|
-
*
|
|
45
|
-
*
|
|
43
|
+
* Derive the authenticated proxy URL for a sandbox port by its provider
|
|
44
|
+
* sandbox id (a project session's `external_id`). Defaults to 8000 (the
|
|
45
|
+
* OpenCode server); pass any other sandbox port (e.g. a dev server the agent
|
|
46
|
+
* started) to get the same authenticated `/p/{externalId}/{port}` proxy for
|
|
47
|
+
* it — this is what session-scoped port forwarding (`SessionHandle.sandboxPortUrl`)
|
|
48
|
+
* builds on. Pure function of the id — no dependency on the active server —
|
|
49
|
+
* so we can connect to several session sandboxes in parallel (e.g. background
|
|
50
|
+
* SSE streams for every open session tab).
|
|
46
51
|
*/
|
|
47
|
-
export function getSandboxUrlForExternalId(externalId) {
|
|
48
|
-
return getSandboxServerUrl(externalId);
|
|
52
|
+
export function getSandboxUrlForExternalId(externalId, port = 8000) {
|
|
53
|
+
return getSandboxServerUrl(externalId, port);
|
|
49
54
|
}
|
|
50
55
|
/**
|
|
51
56
|
* Derive the base URL for the backend's UNAUTHENTICATED public-share proxy
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url-helpers.js","sourceRoot":"","sources":["../../../../src/core/session/server-store/url-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,mEAAmE;AACnE,mEAAmE;AACnE,SAAS,oBAAoB,CAAC,CAAS;IACrC,IAAI,GAAG,GAAG,CAAC,CAAC,MAAM,CAAC;IACnB,OAAO,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,GAAG,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,SAAS;QAAE,GAAG,EAAE,CAAC;IAChE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;AACzB,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,aAAa;IAC3B,OAAO,oBAAoB,CAAC,cAAc,EAAE,CAAC,UAAU,IAAI,0BAA0B,CAAC,CAAC;AACzF,CAAC;AAED,MAAM,UAAU,oBAAoB;IAClC,4EAA4E;IAC5E,mEAAmE;IACnE,MAAM,SAAS,GAAG,cAAc,EAAE,CAAC,SAAS,CAAC;IAC7C,IAAI,CAAC,SAAS;QAAE,OAAO,EAAE,CAAC;IAC1B,OAAO,GAAG,aAAa,EAAE,MAAM,SAAS,OAAO,CAAC;AAClD,CAAC;AAED
|
|
1
|
+
{"version":3,"file":"url-helpers.js","sourceRoot":"","sources":["../../../../src/core/session/server-store/url-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,mEAAmE;AACnE,mEAAmE;AACnE,SAAS,oBAAoB,CAAC,CAAS;IACrC,IAAI,GAAG,GAAG,CAAC,CAAC,MAAM,CAAC;IACnB,OAAO,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,GAAG,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,SAAS;QAAE,GAAG,EAAE,CAAC;IAChE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;AACzB,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,aAAa;IAC3B,OAAO,oBAAoB,CAAC,cAAc,EAAE,CAAC,UAAU,IAAI,0BAA0B,CAAC,CAAC;AACzF,CAAC;AAED,MAAM,UAAU,oBAAoB;IAClC,4EAA4E;IAC5E,mEAAmE;IACnE,MAAM,SAAS,GAAG,cAAc,EAAE,CAAC,SAAS,CAAC;IAC7C,IAAI,CAAC,SAAS;QAAE,OAAO,EAAE,CAAC;IAC1B,OAAO,GAAG,aAAa,EAAE,MAAM,SAAS,OAAO,CAAC;AAClD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,mBAAmB,CAAC,SAAiB,EAAE,IAAI,GAAG,IAAI;IAChE,OAAO,GAAG,aAAa,EAAE,MAAM,SAAS,IAAI,IAAI,EAAE,CAAC;AACrD,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,0BAA0B,CAAC,UAAkB,EAAE,IAAI,GAAG,IAAI;IACxE,OAAO,mBAAmB,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;AAC/C,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,yBAAyB,CAAC,KAAa,EAAE,IAAY;IACnE,OAAO,GAAG,aAAa,EAAE,mBAAmB,KAAK,IAAI,IAAI,EAAE,CAAC;AAC9D,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One vocabulary for the state of a session, read by every host.
|
|
3
|
+
*
|
|
4
|
+
* Web and mobile each derived and worded these states themselves, and they
|
|
5
|
+
* drifted: a finished session read "Done" in the web sidebar, "Completed" on
|
|
6
|
+
* the web Sessions page and "Stopped" on mobile; the machine behind a session
|
|
7
|
+
* was a "sandbox", a "runtime", a "workspace" or a "computer" depending on the
|
|
8
|
+
* screen, and mobile called a booting box "Unreachable".
|
|
9
|
+
*
|
|
10
|
+
* The STATE models live beside this file (`connection.ts` for the session's
|
|
11
|
+
* computer, the server's `ProjectSessionStatus` for its lifecycle). This module
|
|
12
|
+
* only answers "what do we call it, and how loud is it". Labels are English
|
|
13
|
+
* sentence case; a host with a translation catalog maps the same keys.
|
|
14
|
+
*
|
|
15
|
+
* Tone rule: green means live or actionable, and nothing else. A finished
|
|
16
|
+
* session is muted, never green.
|
|
17
|
+
*/
|
|
18
|
+
import type { ProjectSession } from '../rest/projects-client/sessions.js';
|
|
19
|
+
import type { SessionConnection } from './connection.js';
|
|
20
|
+
/** How loud a status is. Hosts map tones to colors; they never pick a color per status. */
|
|
21
|
+
export type StatusTone = 'actionable' | 'live' | 'progress' | 'muted' | 'danger';
|
|
22
|
+
export interface StatusWording {
|
|
23
|
+
label: string;
|
|
24
|
+
tone: StatusTone;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* What a list shows for a session, as opposed to what its sandbox is doing.
|
|
28
|
+
* `queued`, `branching` and `provisioning` are one idea to a user: starting.
|
|
29
|
+
*/
|
|
30
|
+
export type SessionListStatus = 'needs-you' | 'starting' | 'running' | 'done' | 'stopped' | 'failed' | 'legacy';
|
|
31
|
+
export declare const SESSION_LIST_STATUS: Readonly<Record<SessionListStatus, StatusWording & {
|
|
32
|
+
description: string;
|
|
33
|
+
}>>;
|
|
34
|
+
/**
|
|
35
|
+
* A session created by the account migration. Its chat history is restored
|
|
36
|
+
* into the computer when the session is opened. Stamped as
|
|
37
|
+
* `metadata.legacy_migration`.
|
|
38
|
+
*/
|
|
39
|
+
export declare function isLegacyMigratedSession(session: Pick<ProjectSession, 'metadata'>): boolean;
|
|
40
|
+
/**
|
|
41
|
+
* The list status of a session. A pending review wins outright: a finished
|
|
42
|
+
* session with items awaiting the human is actionable, and actionable outranks
|
|
43
|
+
* finished.
|
|
44
|
+
*
|
|
45
|
+
* A status this build has never seen reads `stopped`: `ProjectSessionStatus` is
|
|
46
|
+
* a published union, so a newer API can send an eighth member, and "not live"
|
|
47
|
+
* is true of it where `failed` would invent a failure.
|
|
48
|
+
*/
|
|
49
|
+
export declare function sessionListStatus(session: Pick<ProjectSession, 'status' | 'metadata'>, reviewCount?: number): SessionListStatus;
|
|
50
|
+
/**
|
|
51
|
+
* A short label for the session's computer, for a status pill. `null` means
|
|
52
|
+
* say nothing: `unknown` is a cold load, not a fault, and `live` needs no word.
|
|
53
|
+
*/
|
|
54
|
+
export declare function sessionConnectionLabel(connection: SessionConnection): StatusWording | null;
|
|
55
|
+
/**
|
|
56
|
+
* The sentence a composer shows while the session's computer is not ready. It
|
|
57
|
+
* says what is happening AND what a send does, because the send button stays
|
|
58
|
+
* live: without the second half, pressing it looks like nothing happened.
|
|
59
|
+
*/
|
|
60
|
+
export declare const SESSION_NOTICE: {
|
|
61
|
+
/** The computer stopped answering, and no turn is open. */
|
|
62
|
+
readonly unreachable: "Lost contact with this session's computer. Messages you send are queued until it reconnects.";
|
|
63
|
+
/** The computer stopped answering while a turn is still open. */
|
|
64
|
+
readonly unreachableMidTurn: "Lost contact with this session's computer while a turn is still open. Messages you send stay queued until it answers.";
|
|
65
|
+
/** A wake is taking longer than its usual budget. */
|
|
66
|
+
readonly stalled: "Waking this session's computer is taking longer than usual. Messages you send are queued.";
|
|
67
|
+
/** A first prompt is waiting for a new computer. */
|
|
68
|
+
readonly starting: "Starting this session's computer. Your message sends automatically.";
|
|
69
|
+
/** The computer sleeps while the session is idle; a send wakes it. */
|
|
70
|
+
readonly idle: "This session is idle. The next message you send wakes its computer and is delivered.";
|
|
71
|
+
/** The computer is waking. */
|
|
72
|
+
readonly waking: "Waking this session's computer. Messages you send are queued and go out automatically.";
|
|
73
|
+
};
|
|
74
|
+
/** The waiting row of a turn that failed and will be retried. `null`: no countdown known. */
|
|
75
|
+
export declare function turnRetryLabel(secondsLeft: number | null): string;
|
|
76
|
+
//# sourceMappingURL=status-vocabulary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status-vocabulary.d.ts","sourceRoot":"","sources":["../../../src/core/session/status-vocabulary.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEtD,2FAA2F;AAC3F,MAAM,MAAM,UAAU,GAAG,YAAY,GAAG,MAAM,GAAG,UAAU,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEjF,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,UAAU,CAAC;CAClB;AAID;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GACzB,WAAW,GACX,UAAU,GACV,SAAS,GACT,MAAM,GACN,SAAS,GACT,QAAQ,GACR,QAAQ,CAAC;AAEb,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CACxC,MAAM,CAAC,iBAAiB,EAAE,aAAa,GAAG;IAAE,WAAW,EAAE,MAAM,CAAA;CAAE,CAAC,CAUnE,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC,GAAG,OAAO,CAG1F;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,IAAI,CAAC,cAAc,EAAE,QAAQ,GAAG,UAAU,CAAC,EACpD,WAAW,SAAI,GACd,iBAAiB,CAoBnB;AAID;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,iBAAiB,GAAG,aAAa,GAAG,IAAI,CAW1F;AAED;;;;GAIG;AACH,eAAO,MAAM,cAAc;IACzB,2DAA2D;;IAE3D,iEAAiE;;IAGjE,qDAAqD;;IAErD,oDAAoD;;IAEpD,sEAAsE;;IAEtE,8BAA8B;;CAEtB,CAAC;AAIX,6FAA6F;AAC7F,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAGjE"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One vocabulary for the state of a session, read by every host.
|
|
3
|
+
*
|
|
4
|
+
* Web and mobile each derived and worded these states themselves, and they
|
|
5
|
+
* drifted: a finished session read "Done" in the web sidebar, "Completed" on
|
|
6
|
+
* the web Sessions page and "Stopped" on mobile; the machine behind a session
|
|
7
|
+
* was a "sandbox", a "runtime", a "workspace" or a "computer" depending on the
|
|
8
|
+
* screen, and mobile called a booting box "Unreachable".
|
|
9
|
+
*
|
|
10
|
+
* The STATE models live beside this file (`connection.ts` for the session's
|
|
11
|
+
* computer, the server's `ProjectSessionStatus` for its lifecycle). This module
|
|
12
|
+
* only answers "what do we call it, and how loud is it". Labels are English
|
|
13
|
+
* sentence case; a host with a translation catalog maps the same keys.
|
|
14
|
+
*
|
|
15
|
+
* Tone rule: green means live or actionable, and nothing else. A finished
|
|
16
|
+
* session is muted, never green.
|
|
17
|
+
*/
|
|
18
|
+
export const SESSION_LIST_STATUS = {
|
|
19
|
+
'needs-you': { label: 'Needs you', tone: 'actionable', description: 'Waiting for your review' },
|
|
20
|
+
starting: { label: 'Starting', tone: 'progress', description: 'Its computer is starting' },
|
|
21
|
+
// Never "Active": `running` means the computer is up, not that the agent is working.
|
|
22
|
+
running: { label: 'Running', tone: 'live', description: 'Its computer is up' },
|
|
23
|
+
done: { label: 'Done', tone: 'muted', description: 'Finished' },
|
|
24
|
+
stopped: { label: 'Stopped', tone: 'muted', description: 'Asleep. Opening it wakes its computer' },
|
|
25
|
+
failed: { label: 'Failed', tone: 'danger', description: "Its computer didn't start" },
|
|
26
|
+
legacy: { label: 'Legacy', tone: 'muted', description: 'Imported. Open it to restore' },
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* A session created by the account migration. Its chat history is restored
|
|
30
|
+
* into the computer when the session is opened. Stamped as
|
|
31
|
+
* `metadata.legacy_migration`.
|
|
32
|
+
*/
|
|
33
|
+
export function isLegacyMigratedSession(session) {
|
|
34
|
+
const meta = (session.metadata ?? {});
|
|
35
|
+
return Boolean(meta.legacy_migration);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* The list status of a session. A pending review wins outright: a finished
|
|
39
|
+
* session with items awaiting the human is actionable, and actionable outranks
|
|
40
|
+
* finished.
|
|
41
|
+
*
|
|
42
|
+
* A status this build has never seen reads `stopped`: `ProjectSessionStatus` is
|
|
43
|
+
* a published union, so a newer API can send an eighth member, and "not live"
|
|
44
|
+
* is true of it where `failed` would invent a failure.
|
|
45
|
+
*/
|
|
46
|
+
export function sessionListStatus(session, reviewCount = 0) {
|
|
47
|
+
if (reviewCount > 0)
|
|
48
|
+
return 'needs-you';
|
|
49
|
+
switch (session.status) {
|
|
50
|
+
case 'queued':
|
|
51
|
+
case 'branching':
|
|
52
|
+
case 'provisioning':
|
|
53
|
+
return 'starting';
|
|
54
|
+
case 'running':
|
|
55
|
+
return 'running';
|
|
56
|
+
case 'completed':
|
|
57
|
+
case 'stopped':
|
|
58
|
+
// A dormant migrated session is not "done": nothing ran; its chat is
|
|
59
|
+
// waiting to be restored.
|
|
60
|
+
if (isLegacyMigratedSession(session))
|
|
61
|
+
return 'legacy';
|
|
62
|
+
return session.status === 'completed' ? 'done' : 'stopped';
|
|
63
|
+
case 'failed':
|
|
64
|
+
return 'failed';
|
|
65
|
+
default:
|
|
66
|
+
return 'stopped';
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
// ── The session's computer ──────────────────────────────────────────────────
|
|
70
|
+
/**
|
|
71
|
+
* A short label for the session's computer, for a status pill. `null` means
|
|
72
|
+
* say nothing: `unknown` is a cold load, not a fault, and `live` needs no word.
|
|
73
|
+
*/
|
|
74
|
+
export function sessionConnectionLabel(connection) {
|
|
75
|
+
switch (connection) {
|
|
76
|
+
case 'waking':
|
|
77
|
+
return { label: 'Waking computer', tone: 'progress' };
|
|
78
|
+
case 'connecting':
|
|
79
|
+
return { label: 'Connecting', tone: 'progress' };
|
|
80
|
+
case 'unreachable':
|
|
81
|
+
return { label: "Can't reach computer", tone: 'danger' };
|
|
82
|
+
default:
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* The sentence a composer shows while the session's computer is not ready. It
|
|
88
|
+
* says what is happening AND what a send does, because the send button stays
|
|
89
|
+
* live: without the second half, pressing it looks like nothing happened.
|
|
90
|
+
*/
|
|
91
|
+
export const SESSION_NOTICE = {
|
|
92
|
+
/** The computer stopped answering, and no turn is open. */
|
|
93
|
+
unreachable: "Lost contact with this session's computer. Messages you send are queued until it reconnects.",
|
|
94
|
+
/** The computer stopped answering while a turn is still open. */
|
|
95
|
+
unreachableMidTurn: "Lost contact with this session's computer while a turn is still open. Messages you send stay queued until it answers.",
|
|
96
|
+
/** A wake is taking longer than its usual budget. */
|
|
97
|
+
stalled: "Waking this session's computer is taking longer than usual. Messages you send are queued.",
|
|
98
|
+
/** A first prompt is waiting for a new computer. */
|
|
99
|
+
starting: "Starting this session's computer. Your message sends automatically.",
|
|
100
|
+
/** The computer sleeps while the session is idle; a send wakes it. */
|
|
101
|
+
idle: 'This session is idle. The next message you send wakes its computer and is delivered.',
|
|
102
|
+
/** The computer is waking. */
|
|
103
|
+
waking: "Waking this session's computer. Messages you send are queued and go out automatically.",
|
|
104
|
+
};
|
|
105
|
+
// ── A turn ──────────────────────────────────────────────────────────────────
|
|
106
|
+
/** The waiting row of a turn that failed and will be retried. `null`: no countdown known. */
|
|
107
|
+
export function turnRetryLabel(secondsLeft) {
|
|
108
|
+
if (secondsLeft === null)
|
|
109
|
+
return 'Waiting to retry';
|
|
110
|
+
return secondsLeft > 0 ? `Retrying in ${secondsLeft}s` : 'Retrying now';
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=status-vocabulary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status-vocabulary.js","sourceRoot":"","sources":["../../../src/core/session/status-vocabulary.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AA4BH,MAAM,CAAC,MAAM,mBAAmB,GAE5B;IACF,WAAW,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,YAAY,EAAE,WAAW,EAAE,yBAAyB,EAAE;IAC/F,QAAQ,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,0BAA0B,EAAE;IAC1F,qFAAqF;IACrF,OAAO,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,oBAAoB,EAAE;IAC9E,IAAI,E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CAAC;AAED,+EAA+E;AAE/E;;;GAGG;AACH,MAAM,UAAU,sBAAsB,CAAC,UAA6B;IAClE,QAAQ,UAAU,EAAE,CAAC;QACnB,KAAK,QAAQ;YACX,OAAO,EAAE,KAAK,EAAE,iBAAiB,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;QACxD,KAAK,YAAY;YACf,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;QACnD,KAAK,aAAa;YAChB,OAAO,EAAE,KAAK,EAAE,sBAAsB,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;QAC3D;YACE,OAAO,IAAI,CAAC;IAChB,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,2DAA2D;IAC3D,WAAW,EAAE,8FAA8F;IAC3G,iEAAiE;IACjE,kBAAkB,EAChB,uHAAuH;IACzH,qDAAqD;IACrD,OAAO,EAAE,2FAA2F;IACpG,oDAAoD;IACpD,QAAQ,EAAE,qEAAqE;IAC/E,sEAAsE;IACtE,IAAI,EAAE,sFAAsF;IAC5F,8BAA8B;IAC9B,MAAM,EAAE,wFAAwF;CACxF,CAAC;AAEX,+EAA+E;AAE/E,6FAA6F;AAC7F,MAAM,UAAU,cAAc,CAAC,WAA0B;IACvD,IAAI,WAAW,KAAK,IAAI;QAAE,OAAO,kBAAkB,CAAC;IACpD,OAAO,WAAW,GAAG,CAAC,CAAC,CAAC,CAAC,eAAe,WAAW,GAAG,CAAC,CAAC,CAAC,cAAc,CAAC;AAC1E,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The last saved copies of a user's sessions, kept on the device.
|
|
3
|
+
*
|
|
4
|
+
* Opening a session painted nothing until the control plane answered with the
|
|
5
|
+
* saved copy it captured at the last turn end: skeleton rows for 0.3-2.3 s on
|
|
6
|
+
* every cold open, and for as long as the backend took when it was slow. With
|
|
7
|
+
* this store the next open paints the last copy in the first frame, and the
|
|
8
|
+
* fresh one reconciles into it by message id.
|
|
9
|
+
*
|
|
10
|
+
* WHAT IT STORES, AND WHY THAT IS SAFE. Only envelopes the SERVER sent: the
|
|
11
|
+
* transcript mirror, which the API writes because a turn ended, carrying
|
|
12
|
+
* OpenCode's `info` verbatim (`time.completed` and `error` included) and the
|
|
13
|
+
* OpenCode root it was captured from. It never stores the live transcript. An
|
|
14
|
+
* IndexedDB mirror of the live store was deleted (`5a7a43517f`) because its
|
|
15
|
+
* write test read the transcript's shape, missed a Stop, and painted a stopped
|
|
16
|
+
* turn as running. A server capture has no client-side freshness test to get
|
|
17
|
+
* wrong, and the painting side keeps its root-identity guard
|
|
18
|
+
* (`shouldHydrateFromMirror`).
|
|
19
|
+
*
|
|
20
|
+
* Framework-free: the host passes the storage (`localStorage` on web,
|
|
21
|
+
* AsyncStorage on mobile) and the signed-in user. Every failure — a full,
|
|
22
|
+
* corrupt or missing store — costs only the old cold open; nothing throws.
|
|
23
|
+
*/
|
|
24
|
+
import type { KeyValueStorage } from '../cache/persisted-query-cache.js';
|
|
25
|
+
import type { SessionTranscriptSyncEnvelope } from '../rest/projects-client/sessions.js';
|
|
26
|
+
export interface SavedCopyStoreOptions {
|
|
27
|
+
storage: KeyValueStorage;
|
|
28
|
+
/** The signed-in user. Only this user's copies are read or written. */
|
|
29
|
+
userId: string;
|
|
30
|
+
/** How many sessions to keep. Default: 12. */
|
|
31
|
+
maxSessions?: number;
|
|
32
|
+
/** Upper bound of all copies together, in UTF-16 code units. Default: 1,500,000. */
|
|
33
|
+
maxBytes?: number;
|
|
34
|
+
/** A copy larger than this is not kept. Default: 300,000. */
|
|
35
|
+
maxEnvelopeBytes?: number;
|
|
36
|
+
/** A copy older than this is not painted. Default: 14 days. */
|
|
37
|
+
maxAgeMs?: number;
|
|
38
|
+
/** Storage key prefix. Default: `kortix.saved-copy`. */
|
|
39
|
+
namespace?: string;
|
|
40
|
+
now?: () => number;
|
|
41
|
+
}
|
|
42
|
+
export interface SavedCopyStore {
|
|
43
|
+
/** The storage key of one session's copy. */
|
|
44
|
+
keyFor(projectId: string, sessionId: string): string;
|
|
45
|
+
/** The last saved copy, synchronously when the storage is synchronous. */
|
|
46
|
+
read(projectId: string, sessionId: string): SessionTranscriptSyncEnvelope | null | Promise<SessionTranscriptSyncEnvelope | null>;
|
|
47
|
+
/**
|
|
48
|
+
* Keep `envelope` as this session's copy. An envelope that cannot be painted
|
|
49
|
+
* (unavailable, empty, rootless) removes the copy instead: the server no
|
|
50
|
+
* longer vouches for one. An older capture never replaces a newer one.
|
|
51
|
+
*/
|
|
52
|
+
write(projectId: string, sessionId: string, envelope: SessionTranscriptSyncEnvelope): Promise<void>;
|
|
53
|
+
remove(projectId: string, sessionId: string): Promise<void>;
|
|
54
|
+
/** Forget every copy of this user. */
|
|
55
|
+
clear(): Promise<void>;
|
|
56
|
+
}
|
|
57
|
+
/** A copy worth painting: a non-empty mirror window that names its OpenCode root. */
|
|
58
|
+
export declare function isPaintableSavedCopy(envelope: SessionTranscriptSyncEnvelope | null | undefined): envelope is SessionTranscriptSyncEnvelope;
|
|
59
|
+
export declare function createSavedCopyStore(options: SavedCopyStoreOptions): SavedCopyStore;
|
|
60
|
+
/**
|
|
61
|
+
* The store the session transcript paints from and writes to. The host sets it
|
|
62
|
+
* when a user signs in and sets `null` on sign-out (after `clear()`), because
|
|
63
|
+
* only the host knows who is signed in. With no store, opening a session
|
|
64
|
+
* behaves exactly as before: nothing is read or written on the device.
|
|
65
|
+
*/
|
|
66
|
+
export declare function setSavedCopyStore(store: SavedCopyStore | null): void;
|
|
67
|
+
export declare function currentSavedCopyStore(): SavedCopyStore | null;
|
|
68
|
+
//# sourceMappingURL=saved-copy-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"saved-copy-store.d.ts","sourceRoot":"","sources":["../../../src/core/session-sync/saved-copy-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;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