@ycodium-ai/agent-antigravity 0.2.3096 → 0.2.3106
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/index.js +40 -11
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -28652,6 +28652,24 @@ function createAcpExecutor(options2) {
|
|
|
28652
28652
|
};
|
|
28653
28653
|
}
|
|
28654
28654
|
|
|
28655
|
+
// ../../packages/ycodium-acp-executor/src/start-abort.ts
|
|
28656
|
+
function throwIfStartAborted(signal) {
|
|
28657
|
+
if (signal?.aborted) throw new Error("aborted");
|
|
28658
|
+
}
|
|
28659
|
+
async function raceStartAbort(promise2, signal) {
|
|
28660
|
+
void promise2.catch(() => void 0);
|
|
28661
|
+
throwIfStartAborted(signal);
|
|
28662
|
+
if (signal === void 0) return promise2;
|
|
28663
|
+
const aborted2 = Promise.withResolvers();
|
|
28664
|
+
const onAbort = () => aborted2.reject(new Error("aborted"));
|
|
28665
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
28666
|
+
try {
|
|
28667
|
+
return await Promise.race([promise2, aborted2.promise]);
|
|
28668
|
+
} finally {
|
|
28669
|
+
signal.removeEventListener("abort", onAbort);
|
|
28670
|
+
}
|
|
28671
|
+
}
|
|
28672
|
+
|
|
28655
28673
|
// ../../packages/ycodium-acp-executor/src/mcp-servers.ts
|
|
28656
28674
|
function toAcpMcpServers(entries) {
|
|
28657
28675
|
return (entries ?? []).map(
|
|
@@ -30052,25 +30070,30 @@ function createAntigravitySession({
|
|
|
30052
30070
|
return {
|
|
30053
30071
|
startSession: async (input2, signal) => {
|
|
30054
30072
|
if (mutable.disposed) throw new Error("instance disposed");
|
|
30055
|
-
|
|
30073
|
+
throwIfStartAborted(signal);
|
|
30056
30074
|
const cwd = input2.cwd ?? host.workspacePath(input2.threadId);
|
|
30057
30075
|
if (cwd.trim() === "") throw new Error("workspace path missing");
|
|
30058
30076
|
const existing = threads.get(input2.threadId);
|
|
30059
30077
|
if (existing !== void 0) {
|
|
30060
30078
|
threads.delete(input2.threadId);
|
|
30061
30079
|
await stopBooked(existing);
|
|
30080
|
+
throwIfStartAborted(signal);
|
|
30062
30081
|
}
|
|
30063
30082
|
const lease = await deps.runtime.acquire(resolveInput);
|
|
30064
30083
|
const executable = lease.executable;
|
|
30065
30084
|
let runtimeTemp;
|
|
30066
30085
|
let handle;
|
|
30067
30086
|
try {
|
|
30087
|
+
throwIfStartAborted(signal);
|
|
30068
30088
|
await prepareAntigravityProfile(dirs.profile);
|
|
30069
|
-
|
|
30089
|
+
throwIfStartAborted(signal);
|
|
30090
|
+
const linkedSkills = await linkAntigravityUserSkills({
|
|
30070
30091
|
profile: dirs.profile,
|
|
30071
30092
|
userHome,
|
|
30072
30093
|
platform: platform2
|
|
30073
|
-
})
|
|
30094
|
+
});
|
|
30095
|
+
throwIfStartAborted(signal);
|
|
30096
|
+
for (const result of linkedSkills) {
|
|
30074
30097
|
if (result.outcome === "failed") {
|
|
30075
30098
|
host.log.warn("could not link a user skills directory into the profile", {
|
|
30076
30099
|
link: result.link,
|
|
@@ -30079,6 +30102,7 @@ function createAntigravitySession({
|
|
|
30079
30102
|
}
|
|
30080
30103
|
}
|
|
30081
30104
|
runtimeTemp = await createRuntimeTempDir(dirs.runtimeTempRoot);
|
|
30105
|
+
throwIfStartAborted(signal);
|
|
30082
30106
|
const env = buildAntigravityEnvironment({
|
|
30083
30107
|
profile: dirs.profile,
|
|
30084
30108
|
runtimeTemp,
|
|
@@ -30114,10 +30138,6 @@ function createAntigravitySession({
|
|
|
30114
30138
|
void stopAgentProcess(handle, exitWaitMs, host.log);
|
|
30115
30139
|
}
|
|
30116
30140
|
};
|
|
30117
|
-
const aborted2 = new Promise((_, reject) => {
|
|
30118
|
-
signal?.addEventListener("abort", () => reject(new Error("aborted")), { once: true });
|
|
30119
|
-
});
|
|
30120
|
-
aborted2.catch(() => void 0);
|
|
30121
30141
|
const { readable, writable, stderrTail } = nodeStreamsFromHandle2({
|
|
30122
30142
|
stdout: filterAgentStdout(handle.stdout, {
|
|
30123
30143
|
onLoginPrompt,
|
|
@@ -30197,9 +30217,14 @@ function createAntigravitySession({
|
|
|
30197
30217
|
pushTaskEvents(input2.threadId, subagents.finishOpen("cancelled"));
|
|
30198
30218
|
})();
|
|
30199
30219
|
try {
|
|
30200
|
-
|
|
30220
|
+
throwIfStartAborted(signal);
|
|
30221
|
+
const started = await raceStartAbort(
|
|
30222
|
+
Promise.race([executor.start(), loginPrompted]),
|
|
30223
|
+
signal
|
|
30224
|
+
);
|
|
30201
30225
|
sessionReady = true;
|
|
30202
30226
|
await noteSession(() => login.noteSessionAuthenticated());
|
|
30227
|
+
throwIfStartAborted(signal);
|
|
30203
30228
|
const catalog = antigravityCatalogFromSetup(started.sessionSetupResult);
|
|
30204
30229
|
recordCatalog(live, catalog, acpAgentVersion(started.initializeResult) ?? void 0);
|
|
30205
30230
|
const matchedModel = requestedModelId === void 0 || live.knownModelValues.length === 0 ? void 0 : matchAdvertisedModelValue(requestedModelId, live.knownModelValues);
|
|
@@ -30209,11 +30234,15 @@ function createAntigravitySession({
|
|
|
30209
30234
|
if (matchedModel !== void 0 && started.modelId !== matchedModel && catalog?.currentModel !== matchedModel) {
|
|
30210
30235
|
host.log.warn(NOT_APPLIED_MESSAGE, { requestedModelId: matchedModel });
|
|
30211
30236
|
}
|
|
30212
|
-
const appliedModeId = await
|
|
30213
|
-
|
|
30214
|
-
|
|
30237
|
+
const appliedModeId = await raceStartAbort(
|
|
30238
|
+
applyModePlan(
|
|
30239
|
+
executor,
|
|
30240
|
+
planAntigravityMode(input2.runtimeMode, started.sessionSetupResult)
|
|
30241
|
+
),
|
|
30242
|
+
signal
|
|
30215
30243
|
) ?? acpCurrentModeId(started.sessionSetupResult);
|
|
30216
30244
|
await yieldTick();
|
|
30245
|
+
throwIfStartAborted(signal);
|
|
30217
30246
|
const createdAt = nowIso();
|
|
30218
30247
|
const resumeCursor = {
|
|
30219
30248
|
schemaVersion: RESUME_SCHEMA_VERSION,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ycodium-ai/agent-antigravity",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3106",
|
|
4
4
|
"description": "Google Antigravity executor: runs the Antigravity agent over Agent Client Protocol stdio.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ycodium",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
"typescript": "~6.0.3",
|
|
32
32
|
"vite-plus": "0.2.2",
|
|
33
33
|
"yauzl": "^3.4.0",
|
|
34
|
-
"
|
|
35
|
-
"ycodium-acp-executor": "0.2.
|
|
36
|
-
"ycodium-
|
|
34
|
+
"ycodium-executor-testing": "0.0.0",
|
|
35
|
+
"ycodium-acp-executor": "0.2.3106",
|
|
36
|
+
"@ycodium-ai/plugin-api": "0.2.0"
|
|
37
37
|
},
|
|
38
38
|
"ycodium": {
|
|
39
39
|
"plugin": "./dist/index.js",
|