gestalt-mobile 0.65.5 → 0.65.7
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/dist/client/assets/index-CKJWzSwH.js +128 -0
- package/dist/client/index.html +1 -1
- package/dist/server/client/features/chat/chat-projection.js +1 -0
- package/dist/server/server/composition.contracts.js +98 -0
- package/dist/server/server/composition.js +148 -389
- package/dist/server/server/features/org-plan-attention/application/acknowledgement.js +43 -0
- package/dist/server/server/features/org-plan-attention/application/resolve.js +130 -0
- package/dist/server/server/features/org-plan-checkpoint/application/coordinate.js +191 -0
- package/dist/server/server/platform/codex/json-rpc-client.js +4 -4
- package/package.json +2 -1
- package/dist/client/assets/index-CohraBWu.js +0 -128
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2026 Dyne.org foundation
|
|
3
|
+
* Designed by Denis Roio <jaromil@dyne.org>
|
|
4
|
+
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
5
|
+
*/
|
|
6
|
+
/** Owns only process-local acknowledgement deadlines, never durable attention. */
|
|
7
|
+
export class AttentionAcknowledgement {
|
|
8
|
+
ports;
|
|
9
|
+
timers = new Map();
|
|
10
|
+
constructor(ports) {
|
|
11
|
+
this.ports = ports;
|
|
12
|
+
}
|
|
13
|
+
arm(sessionId, requestId) {
|
|
14
|
+
this.responseSettled(sessionId, requestId);
|
|
15
|
+
const key = `${sessionId}:${requestId}`;
|
|
16
|
+
const token = Symbol(key);
|
|
17
|
+
const cancel = this.ports.schedule(() => {
|
|
18
|
+
if (this.timers.get(key)?.token !== token)
|
|
19
|
+
return;
|
|
20
|
+
this.timers.delete(key);
|
|
21
|
+
this.ports.recoverWriter(sessionId, requestId);
|
|
22
|
+
}, this.ports.deadlineMs);
|
|
23
|
+
this.timers.set(key, { cancel, token });
|
|
24
|
+
}
|
|
25
|
+
/** Every transport settlement releases the acknowledgement deadline. */
|
|
26
|
+
responseSettled(sessionId, requestId) {
|
|
27
|
+
const key = `${sessionId}:${requestId}`;
|
|
28
|
+
const timer = this.timers.get(key);
|
|
29
|
+
if (!timer)
|
|
30
|
+
return false;
|
|
31
|
+
timer.cancel();
|
|
32
|
+
this.timers.delete(key);
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
disposeSession(sessionId) {
|
|
36
|
+
for (const [key, timer] of this.timers) {
|
|
37
|
+
if (!key.startsWith(`${sessionId}:`))
|
|
38
|
+
continue;
|
|
39
|
+
timer.cancel();
|
|
40
|
+
this.timers.delete(key);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2026 Dyne.org foundation
|
|
3
|
+
* Designed by Denis Roio <jaromil@dyne.org>
|
|
4
|
+
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
5
|
+
*/
|
|
6
|
+
import { parseOrgPlanAttention, parseOrgPlanAttentionToolResponse, } from '../../../../shared/contracts/org-plan-attention.js';
|
|
7
|
+
/** One relay-local promise owner; durable claims and replay remain authoritative. */
|
|
8
|
+
export class AttentionResolution {
|
|
9
|
+
ports;
|
|
10
|
+
operations = new Map();
|
|
11
|
+
constructor(ports) {
|
|
12
|
+
this.ports = ports;
|
|
13
|
+
}
|
|
14
|
+
async resolve(input) {
|
|
15
|
+
const { sessionId, requestId, operationKey } = input;
|
|
16
|
+
const scope = `org-plan-attention:${sessionId}:${requestId}`;
|
|
17
|
+
const stored = this.ports.replay.find(scope, operationKey);
|
|
18
|
+
if (stored)
|
|
19
|
+
return JSON.parse(stored.body);
|
|
20
|
+
const terminal = this.ports.operations.terminalOperation(sessionId, requestId);
|
|
21
|
+
if (terminal)
|
|
22
|
+
return terminal.operationKey === operationKey
|
|
23
|
+
? terminal.outcome === 'failed'
|
|
24
|
+
? { kind: 'writerCleared', resolvedAt: terminal.resolvedAt }
|
|
25
|
+
: { kind: 'replayed', resolvedAt: terminal.resolvedAt }
|
|
26
|
+
: { kind: 'staleOperation' };
|
|
27
|
+
const key = `${scope}:${operationKey}`;
|
|
28
|
+
const inFlight = this.operations.get(key);
|
|
29
|
+
if (inFlight)
|
|
30
|
+
return inFlight;
|
|
31
|
+
const operation = this.deliver(input, scope);
|
|
32
|
+
this.operations.set(key, operation);
|
|
33
|
+
try {
|
|
34
|
+
return await operation;
|
|
35
|
+
}
|
|
36
|
+
finally {
|
|
37
|
+
this.operations.delete(key);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
async deliver({ sessionId, requestId, operationKey, response }, scope) {
|
|
41
|
+
const { operations, writer, policy } = this.ports;
|
|
42
|
+
const interaction = operations.find(sessionId, requestId);
|
|
43
|
+
if (!interaction || interaction.kind !== 'orgPlanAttention')
|
|
44
|
+
return { kind: 'noActive' };
|
|
45
|
+
const decision = parseOrgPlanAttentionToolResponse(response);
|
|
46
|
+
const attention = parseOrgPlanAttention(interaction.payload);
|
|
47
|
+
if (!decision || !attention)
|
|
48
|
+
return { kind: 'staleOperation' };
|
|
49
|
+
const claim = operations.claimOperation(sessionId, requestId, operationKey);
|
|
50
|
+
if (claim === 'resolved') {
|
|
51
|
+
const resolved = operations.resolved(sessionId, requestId);
|
|
52
|
+
return resolved
|
|
53
|
+
? { kind: 'replayed', resolvedAt: resolved.resolvedAt }
|
|
54
|
+
: { kind: 'staleOperation' };
|
|
55
|
+
}
|
|
56
|
+
if (claim === 'stale')
|
|
57
|
+
return { kind: 'staleOperation' };
|
|
58
|
+
if (claim === 'missing')
|
|
59
|
+
return { kind: 'noActive' };
|
|
60
|
+
const acknowledged = operations.resolutionState(sessionId, requestId) === 'acknowledged';
|
|
61
|
+
if (acknowledged) {
|
|
62
|
+
if (!operations.beginDelivery(sessionId, requestId, operationKey))
|
|
63
|
+
return { kind: 'staleOperation' };
|
|
64
|
+
if (decision.action === 'resume' &&
|
|
65
|
+
attention.executorReplacement &&
|
|
66
|
+
!policy.authorizeReplacement(sessionId, attention.executorReplacement.canonicalTaskName)) {
|
|
67
|
+
operations.retryDelivery(sessionId, requestId, operationKey, 'acknowledged');
|
|
68
|
+
return { kind: 'replacementRejected' };
|
|
69
|
+
}
|
|
70
|
+
// The tool acknowledgement already returned; guidance is new supervisor input.
|
|
71
|
+
if (decision.action === 'resume' && decision.guidance) {
|
|
72
|
+
const deliver = writer.guidance(sessionId);
|
|
73
|
+
if (!deliver) {
|
|
74
|
+
operations.retryDelivery(sessionId, requestId, operationKey, 'acknowledged');
|
|
75
|
+
return { kind: 'writerUnavailable' };
|
|
76
|
+
}
|
|
77
|
+
try {
|
|
78
|
+
const text = `The user resolved the Autopilot attention request. Guidance:\n${decision.guidance}`;
|
|
79
|
+
await deliver(text, operationKey);
|
|
80
|
+
}
|
|
81
|
+
catch {
|
|
82
|
+
operations.retryDelivery(sessionId, requestId, operationKey, 'acknowledged');
|
|
83
|
+
return { kind: 'writerUnavailable' };
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return this.settleAnswered(sessionId, requestId, operationKey, scope, decision.action);
|
|
87
|
+
}
|
|
88
|
+
// Durable capability belongs to the session/thread, not the relay process.
|
|
89
|
+
if (!writer.capable(sessionId))
|
|
90
|
+
return { kind: 'legacyUnsupported' };
|
|
91
|
+
if (!writer.available())
|
|
92
|
+
return { kind: 'writerUnavailable' };
|
|
93
|
+
if (!operations.beginDelivery(sessionId, requestId, operationKey))
|
|
94
|
+
return { kind: 'staleOperation' };
|
|
95
|
+
if (decision.action === 'resume' &&
|
|
96
|
+
attention.executorReplacement &&
|
|
97
|
+
!policy.authorizeReplacement(sessionId, attention.executorReplacement.canonicalTaskName)) {
|
|
98
|
+
operations.retryDelivery(sessionId, requestId, operationKey);
|
|
99
|
+
return { kind: 'replacementRejected' };
|
|
100
|
+
}
|
|
101
|
+
const state = writer.state(sessionId, requestId);
|
|
102
|
+
if (state === 'unavailable') {
|
|
103
|
+
operations.retryDelivery(sessionId, requestId, operationKey);
|
|
104
|
+
return { kind: 'writerUnavailable' };
|
|
105
|
+
}
|
|
106
|
+
const resolvedAt = this.ports.now();
|
|
107
|
+
if (state === 'cleared') {
|
|
108
|
+
if (!operations.settleOperation(sessionId, requestId, operationKey, resolvedAt, 'failed'))
|
|
109
|
+
return { kind: 'staleOperation' };
|
|
110
|
+
this.ports.publishSettlement(sessionId, requestId, resolvedAt, 'failed');
|
|
111
|
+
return { kind: 'writerCleared', resolvedAt };
|
|
112
|
+
}
|
|
113
|
+
if (!writer.resolve(sessionId, requestId, response)) {
|
|
114
|
+
operations.retryDelivery(sessionId, requestId, operationKey);
|
|
115
|
+
return { kind: 'writerUnavailable' };
|
|
116
|
+
}
|
|
117
|
+
return this.settleAnswered(sessionId, requestId, operationKey, scope, decision.action, resolvedAt);
|
|
118
|
+
}
|
|
119
|
+
settleAnswered(sessionId, requestId, operationKey, scope, action, resolvedAt = this.ports.now()) {
|
|
120
|
+
if (!this.ports.operations.settleOperation(sessionId, requestId, operationKey, resolvedAt, 'answered'))
|
|
121
|
+
return { kind: 'staleOperation' };
|
|
122
|
+
this.ports.replay.remember(scope, operationKey, JSON.stringify({ kind: 'replayed', resolvedAt }));
|
|
123
|
+
this.ports.publishSettlement(sessionId, requestId, resolvedAt, 'answered');
|
|
124
|
+
if (action === 'disableAutopilot')
|
|
125
|
+
this.ports.policy.disable(sessionId);
|
|
126
|
+
else
|
|
127
|
+
this.ports.policy.enable(sessionId);
|
|
128
|
+
return { kind: 'accepted', resolvedAt };
|
|
129
|
+
}
|
|
130
|
+
}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2026 Dyne.org foundation
|
|
3
|
+
* Designed by Denis Roio <jaromil@dyne.org>
|
|
4
|
+
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
5
|
+
*/
|
|
6
|
+
import { parseOrgPlanCheckpoint, toOrgPlanCheckpointToolResponse, } from '../../../../shared/contracts/org-plan-checkpoint.js';
|
|
7
|
+
import { RelaySession, } from '../../sessions/model/relay-session.js';
|
|
8
|
+
import { hasActiveL1Writer, resolveOrgPlanCheckpointSignal, validateOrgPlanCheckpoint, } from './validate.js';
|
|
9
|
+
/** One lifetime owner for checkpoint deadlines and in-progress writer recoveries. */
|
|
10
|
+
export class CheckpointCoordination {
|
|
11
|
+
ports;
|
|
12
|
+
timers = new Map();
|
|
13
|
+
recoveries = new Set();
|
|
14
|
+
constructor(ports) {
|
|
15
|
+
this.ports = ports;
|
|
16
|
+
}
|
|
17
|
+
/** null means the read barrier succeeded; otherwise return the exact transport outcome. */
|
|
18
|
+
async refresh(sessionId, requestId) {
|
|
19
|
+
if (await this.ports.plans.refresh(sessionId))
|
|
20
|
+
return null;
|
|
21
|
+
return this.replyFailure(sessionId, requestId, 'planProjectionUnavailable');
|
|
22
|
+
}
|
|
23
|
+
expand(sessionId, requestId, kind) {
|
|
24
|
+
const retained = this.ports.plans.find(sessionId);
|
|
25
|
+
const identity = this.ports.plans.identity(sessionId);
|
|
26
|
+
const checkpoint = retained && identity
|
|
27
|
+
? resolveOrgPlanCheckpointSignal(kind, retained, identity, this.ports.plans.publicationReason(sessionId), this.ports.plans.completedTargets(sessionId), this.ports.plans.pendingTarget(sessionId))
|
|
28
|
+
: null;
|
|
29
|
+
return checkpoint
|
|
30
|
+
? { interaction: { requestId, kind: 'orgPlanCheckpoint', payload: checkpoint } }
|
|
31
|
+
: {
|
|
32
|
+
handled: this.ports.writer.resolve(sessionId, requestId, toOrgPlanCheckpointToolResponse('failed', {
|
|
33
|
+
reasonCode: 'checkpointBoundaryAmbiguous',
|
|
34
|
+
})),
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
accept(sessionId, interaction, authority) {
|
|
38
|
+
const checkpoint = parseOrgPlanCheckpoint(interaction.payload);
|
|
39
|
+
const retained = this.ports.plans.find(sessionId);
|
|
40
|
+
const identity = this.ports.plans.identity(sessionId);
|
|
41
|
+
const { activeTurnId, rootOwned, compactKind } = authority;
|
|
42
|
+
if (!checkpoint || !retained || !identity || checkpoint.planIdentity !== identity || !rootOwned)
|
|
43
|
+
return this.replyFailure(sessionId, interaction.requestId, !checkpoint
|
|
44
|
+
? compactKind === 'l1Accepted'
|
|
45
|
+
? 'acceptedL1NotResolved'
|
|
46
|
+
: 'checkpointPayloadInvalid'
|
|
47
|
+
: !retained
|
|
48
|
+
? 'planProjectionUnavailable'
|
|
49
|
+
: !identity || checkpoint.planIdentity !== identity
|
|
50
|
+
? 'planIdentityMismatch'
|
|
51
|
+
: 'rootNotOwner');
|
|
52
|
+
const validation = validateOrgPlanCheckpoint({
|
|
53
|
+
checkpoint,
|
|
54
|
+
plan: retained,
|
|
55
|
+
planIdentity: identity,
|
|
56
|
+
rootOwned,
|
|
57
|
+
hasActiveL1Writer: (position) => hasActiveL1Writer(this.ports.activity(sessionId), position),
|
|
58
|
+
});
|
|
59
|
+
if (!validation.valid || !activeTurnId)
|
|
60
|
+
return this.replyFailure(sessionId, interaction.requestId, validation.valid ? 'rootTurnNotActive' : validation.reasonCode, {
|
|
61
|
+
...(!validation.valid && validation.expected ? { expected: validation.expected } : {}),
|
|
62
|
+
...(!validation.valid && validation.observed ? { observed: validation.observed } : {}),
|
|
63
|
+
});
|
|
64
|
+
let recordStatus = 'failed';
|
|
65
|
+
try {
|
|
66
|
+
recordStatus = this.ports.autopilot.accept(sessionId, checkpoint, activeTurnId, this.ports.now());
|
|
67
|
+
}
|
|
68
|
+
catch {
|
|
69
|
+
if (!this.ports.autopilot.failed(sessionId, activeTurnId))
|
|
70
|
+
return this.replyFailure(sessionId, interaction.requestId, 'checkpointPersistenceFailed');
|
|
71
|
+
this.ports.pending.add(sessionId, {
|
|
72
|
+
...interaction,
|
|
73
|
+
turnId: activeTurnId,
|
|
74
|
+
requestedAt: this.ports.now(),
|
|
75
|
+
});
|
|
76
|
+
this.fail(sessionId, interaction.requestId, activeTurnId);
|
|
77
|
+
return true;
|
|
78
|
+
}
|
|
79
|
+
if (recordStatus === 'failed')
|
|
80
|
+
return this.replyFailure(sessionId, interaction.requestId, 'checkpointStateConflict');
|
|
81
|
+
if (recordStatus === 'alreadyRecorded')
|
|
82
|
+
return this.ports.writer.resolve(sessionId, interaction.requestId, toOrgPlanCheckpointToolResponse('alreadyRecorded'));
|
|
83
|
+
this.ports.pending.add(sessionId, {
|
|
84
|
+
...interaction,
|
|
85
|
+
turnId: activeTurnId,
|
|
86
|
+
requestedAt: this.ports.now(),
|
|
87
|
+
});
|
|
88
|
+
this.arm(sessionId, interaction.requestId, activeTurnId);
|
|
89
|
+
try {
|
|
90
|
+
this.ports.writer.resolve(sessionId, interaction.requestId, toOrgPlanCheckpointToolResponse('recorded'));
|
|
91
|
+
}
|
|
92
|
+
catch {
|
|
93
|
+
// The accepted hold remains owned by the bounded deadline.
|
|
94
|
+
}
|
|
95
|
+
return true;
|
|
96
|
+
}
|
|
97
|
+
responseSettled(sessionId, requestId, outcome) {
|
|
98
|
+
const interaction = this.ports.pending.find(sessionId, requestId);
|
|
99
|
+
if (interaction?.kind !== 'orgPlanCheckpoint')
|
|
100
|
+
return;
|
|
101
|
+
if (outcome !== 'resultWritten') {
|
|
102
|
+
this.fail(sessionId, requestId, interaction.turnId ?? null);
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
this.cancel(sessionId, requestId);
|
|
106
|
+
const occurredAt = this.ports.now();
|
|
107
|
+
if (this.ports.pending.resolve(sessionId, requestId, occurredAt, 'answered'))
|
|
108
|
+
this.ports.publishSettlement(sessionId, requestId, occurredAt, 'answered');
|
|
109
|
+
}
|
|
110
|
+
failPending(sessionId, recoverBoundary) {
|
|
111
|
+
for (const interaction of this.ports.pending.list(sessionId)) {
|
|
112
|
+
if (interaction.kind !== 'orgPlanCheckpoint')
|
|
113
|
+
continue;
|
|
114
|
+
this.fail(sessionId, interaction.requestId, interaction.turnId ?? null);
|
|
115
|
+
}
|
|
116
|
+
if (recoverBoundary)
|
|
117
|
+
this.ports.autopilot.recover(sessionId);
|
|
118
|
+
}
|
|
119
|
+
disposeSession(sessionId) {
|
|
120
|
+
for (const [key, timer] of this.timers) {
|
|
121
|
+
if (!key.startsWith(`${sessionId}:`))
|
|
122
|
+
continue;
|
|
123
|
+
timer.cancel();
|
|
124
|
+
this.timers.delete(key);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
replyFailure(sessionId, requestId, reason, details) {
|
|
128
|
+
return this.ports.writer.resolve(sessionId, requestId, this.ports.failureResponse(reason, details));
|
|
129
|
+
}
|
|
130
|
+
cancel(sessionId, requestId) {
|
|
131
|
+
const key = `${sessionId}:${requestId}`;
|
|
132
|
+
const timer = this.timers.get(key);
|
|
133
|
+
if (!timer)
|
|
134
|
+
return;
|
|
135
|
+
timer.cancel();
|
|
136
|
+
this.timers.delete(key);
|
|
137
|
+
}
|
|
138
|
+
arm(sessionId, requestId, turnId) {
|
|
139
|
+
this.cancel(sessionId, requestId);
|
|
140
|
+
const key = `${sessionId}:${requestId}`;
|
|
141
|
+
const token = Symbol(key);
|
|
142
|
+
const cancel = this.ports.schedule(() => {
|
|
143
|
+
if (this.timers.get(key)?.token !== token)
|
|
144
|
+
return;
|
|
145
|
+
this.timers.delete(key);
|
|
146
|
+
this.fail(sessionId, requestId, turnId);
|
|
147
|
+
}, this.ports.deadlineMs);
|
|
148
|
+
this.timers.set(key, { cancel, token });
|
|
149
|
+
}
|
|
150
|
+
/** Fail once and retain the durable root boundary until guarded runtime recovery. */
|
|
151
|
+
fail(sessionId, requestId, turnId) {
|
|
152
|
+
this.cancel(sessionId, requestId);
|
|
153
|
+
const occurredAt = this.ports.now();
|
|
154
|
+
if (!this.ports.pending.resolve(sessionId, requestId, occurredAt, 'failed'))
|
|
155
|
+
return false;
|
|
156
|
+
this.ports.autopilot.failed(sessionId, turnId);
|
|
157
|
+
this.ports.publishFailure(sessionId, requestId, occurredAt);
|
|
158
|
+
this.ports.publishSettlement(sessionId, requestId, occurredAt, 'failed');
|
|
159
|
+
const rejected = this.ports.writer.reject(sessionId, requestId, new Error('CHECKPOINT_HANDOFF_FAILED'));
|
|
160
|
+
if (rejected === false) {
|
|
161
|
+
const key = `${sessionId}:${requestId}`;
|
|
162
|
+
const recovery = this.ports.writer.recovery(sessionId);
|
|
163
|
+
if (recovery && recovery.activeTurnId === turnId && !this.recoveries.has(key)) {
|
|
164
|
+
this.recoveries.add(key);
|
|
165
|
+
void this.recover(sessionId, turnId, key, recovery);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
return true;
|
|
169
|
+
}
|
|
170
|
+
async recover(sessionId, turnId, key, writer) {
|
|
171
|
+
try {
|
|
172
|
+
if (!writer.current() || this.ports.currentTurn(sessionId) !== turnId)
|
|
173
|
+
return;
|
|
174
|
+
const rebuilt = await writer.recycle(this.ports.now());
|
|
175
|
+
if (!writer.current())
|
|
176
|
+
return;
|
|
177
|
+
const recovered = turnId && rebuilt.activeTurnId === turnId
|
|
178
|
+
? RelaySession.rehydrate(rebuilt).completeTurn(turnId, this.ports.now()).snapshot
|
|
179
|
+
: rebuilt;
|
|
180
|
+
this.ports.saveSession(recovered);
|
|
181
|
+
this.ports.turnCompleted(sessionId, this.ports.now());
|
|
182
|
+
this.ports.autopilot.recover(sessionId);
|
|
183
|
+
}
|
|
184
|
+
catch {
|
|
185
|
+
// Durable failure remains visible; normal runtime recovery may retry later.
|
|
186
|
+
}
|
|
187
|
+
finally {
|
|
188
|
+
this.recoveries.delete(key);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
@@ -86,8 +86,8 @@ export class JsonRpcClient {
|
|
|
86
86
|
return () => this.serverResponseSettlements.delete(listener);
|
|
87
87
|
}
|
|
88
88
|
writeServerResponse(id, response, outcome) {
|
|
89
|
-
const line = `${JSON.stringify({ jsonrpc: '2.0', id, ...response })}\n`;
|
|
90
89
|
try {
|
|
90
|
+
const line = `${JSON.stringify({ jsonrpc: '2.0', id, ...response })}\n`;
|
|
91
91
|
this.output.write(line, (error) => {
|
|
92
92
|
const settled = error ? 'writeFailed' : outcome;
|
|
93
93
|
this.serverResponseSettlements.forEach((listener) => listener({ id, outcome: settled }));
|
|
@@ -109,9 +109,9 @@ export class JsonRpcClient {
|
|
|
109
109
|
const listener = this.serverRequests.values().next().value;
|
|
110
110
|
if (!listener)
|
|
111
111
|
return;
|
|
112
|
-
void Promise.resolve(
|
|
113
|
-
.then((
|
|
114
|
-
.
|
|
112
|
+
void Promise.resolve()
|
|
113
|
+
.then(() => listener({ id: message.id, method: message.method, params: message.params }))
|
|
114
|
+
.then((result) => this.writeServerResponse(message.id, { result }, 'resultWritten'), (error) => this.writeServerResponse(message.id, { error: { message: error instanceof Error ? error.message : 'REQUEST_FAILED' } }, 'errorWritten'));
|
|
115
115
|
return;
|
|
116
116
|
}
|
|
117
117
|
const pending = this.pending.get(message.id);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gestalt-mobile",
|
|
3
|
-
"version": "0.65.
|
|
3
|
+
"version": "0.65.7",
|
|
4
4
|
"description": "Mobile-first web relay for durable Codex development sessions",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"codex",
|
|
@@ -58,6 +58,7 @@
|
|
|
58
58
|
"test:package": "node scripts/smoke-packed-cli.mjs",
|
|
59
59
|
"test:e2e": "playwright test",
|
|
60
60
|
"test:e2e:functional": "playwright test --config playwright.functional.config.ts",
|
|
61
|
+
"test:e2e:smoke": "node scripts/run-browser-smoke.mjs",
|
|
61
62
|
"test:e2e:shards": "node scripts/verify-browser-shards.mjs",
|
|
62
63
|
"test:e2e:evidence": "PLAYWRIGHT_EVIDENCE=1 playwright test --config playwright.evidence.config.ts",
|
|
63
64
|
"test:e2e:real-auth": "playwright test --config playwright.auth.config.ts",
|