@quantiya/codevibe-antigravity-plugin 1.0.7 → 1.0.8
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/server.js +29 -3
- package/package.json +2 -2
package/dist/server.js
CHANGED
|
@@ -2502,14 +2502,14 @@ var import_codevibe_core3 = require("@quantiya/codevibe-core");
|
|
|
2502
2502
|
var CONTENT_MAX = 150 * 1024;
|
|
2503
2503
|
var TOOL_OUTPUT_MAX = 50 * 1024;
|
|
2504
2504
|
var TOOL_DIFF_MAX = 100 * 1024;
|
|
2505
|
-
function mapTranscriptEvent(emit, sessionId) {
|
|
2505
|
+
function mapTranscriptEvent(emit, sessionId, notBeforeMs) {
|
|
2506
2506
|
const { event } = emit;
|
|
2507
2507
|
const base = {
|
|
2508
2508
|
sessionId,
|
|
2509
2509
|
source: import_codevibe_core3.EventSource.DESKTOP
|
|
2510
2510
|
};
|
|
2511
2511
|
const orderingKey = `${sessionId}:${emit.conversationId}`;
|
|
2512
|
-
const nextTimestamp = () => (0, import_codevibe_core3.prepareEventTimestamp)({ orderingKey, agentClock: event.created_at });
|
|
2512
|
+
const nextTimestamp = () => (0, import_codevibe_core3.prepareEventTimestamp)({ orderingKey, agentClock: event.created_at, notBeforeMs });
|
|
2513
2513
|
const baseMetadata = {
|
|
2514
2514
|
step_index: event.step_index,
|
|
2515
2515
|
agy_source: event.source,
|
|
@@ -2788,8 +2788,18 @@ function truncate(s, maxBytes) {
|
|
|
2788
2788
|
}
|
|
2789
2789
|
|
|
2790
2790
|
// src/server.ts
|
|
2791
|
+
var MOBILE_PROMPT_FLOOR_RECENCY_MS = 12e4;
|
|
2791
2792
|
var McpServer = class {
|
|
2792
2793
|
constructor(options) {
|
|
2794
|
+
/** Per-session causal floor for transcript-event timestamps emitted right
|
|
2795
|
+
* after a MOBILE prompt. The mobile USER_PROMPT is created by the iOS app
|
|
2796
|
+
* (real ms clock) and never flows through prepareEventTimestamp, while the
|
|
2797
|
+
* agy ASSISTANT_RESPONSE is reconstructed from agy's SECOND-precision
|
|
2798
|
+
* transcript created_at — so within a shared wall-clock second the response
|
|
2799
|
+
* can sort BEFORE the prompt. We capture the prompt ms here and pass it as
|
|
2800
|
+
* `notBeforeMs`. Per-session + recency-bounded (MOBILE_PROMPT_FLOOR_RECENCY_MS).
|
|
2801
|
+
* (agy event-ordering fix 2026-05-30.) */
|
|
2802
|
+
this.mobilePromptFloorBySession = /* @__PURE__ */ new Map();
|
|
2793
2803
|
/** v9 launch-session: ONE backend session per wrapper lifetime.
|
|
2794
2804
|
* Created at start() before any tailer event can fire. All agy
|
|
2795
2805
|
* conv UUIDs observed during this wrapper's lifetime emit events
|
|
@@ -3146,7 +3156,16 @@ var McpServer = class {
|
|
|
3146
3156
|
}
|
|
3147
3157
|
this.observedMainConversationIds.add(conversationId);
|
|
3148
3158
|
const session = this.session;
|
|
3149
|
-
|
|
3159
|
+
let notBeforeMs;
|
|
3160
|
+
const promptFloor = this.mobilePromptFloorBySession.get(session.sessionId);
|
|
3161
|
+
if (promptFloor) {
|
|
3162
|
+
if (Date.now() - promptFloor.setAtWallMs <= MOBILE_PROMPT_FLOOR_RECENCY_MS) {
|
|
3163
|
+
notBeforeMs = promptFloor.floorMs;
|
|
3164
|
+
} else {
|
|
3165
|
+
this.mobilePromptFloorBySession.delete(session.sessionId);
|
|
3166
|
+
}
|
|
3167
|
+
}
|
|
3168
|
+
const mapped = mapTranscriptEvent(emit, session.sessionId, notBeforeMs);
|
|
3150
3169
|
for (const reg of mapped.pendingCallRegistrations) {
|
|
3151
3170
|
this.approvalDetector.registerPendingCall(reg);
|
|
3152
3171
|
}
|
|
@@ -3464,6 +3483,13 @@ var McpServer = class {
|
|
|
3464
3483
|
}
|
|
3465
3484
|
evt = decrypted;
|
|
3466
3485
|
await this.markDelivered(evt);
|
|
3486
|
+
if (evt.type === import_codevibe_core4.EventType.USER_PROMPT || evt.type === import_codevibe_core4.EventType.PROMPT_RESPONSE) {
|
|
3487
|
+
const mobileFloorMs = Date.parse(evt.timestamp);
|
|
3488
|
+
this.mobilePromptFloorBySession.set(session.sessionId, {
|
|
3489
|
+
floorMs: Number.isNaN(mobileFloorMs) ? Date.now() : mobileFloorMs,
|
|
3490
|
+
setAtWallMs: Date.now()
|
|
3491
|
+
});
|
|
3492
|
+
}
|
|
3467
3493
|
if (evt.type === import_codevibe_core4.EventType.USER_PROMPT) {
|
|
3468
3494
|
let promptContent = evt.content;
|
|
3469
3495
|
const attachments = evt.attachments ?? [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quantiya/codevibe-antigravity-plugin",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.8",
|
|
4
4
|
"description": "Control Antigravity CLI from your iPhone and Android — real-time sync, approve file edits, send prompts by voice. Part of CodeVibe.",
|
|
5
5
|
"main": "dist/server.js",
|
|
6
6
|
"bin": {
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"node": ">=18.0.0"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@quantiya/codevibe-core": "^1.0.
|
|
51
|
+
"@quantiya/codevibe-core": "^1.0.28",
|
|
52
52
|
"chokidar": "^5.0.0",
|
|
53
53
|
"dotenv": "^16.6.1",
|
|
54
54
|
"express": "^5.1.0",
|