@ycodium-ai/agent-antigravity 0.2.2996 → 0.2.3000
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 +141 -142
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -25804,6 +25804,9 @@ function asTrimmedString(value) {
|
|
|
25804
25804
|
const trimmed = value.trim();
|
|
25805
25805
|
return trimmed.length > 0 ? trimmed : void 0;
|
|
25806
25806
|
}
|
|
25807
|
+
function readAcpText(source, key) {
|
|
25808
|
+
return asTrimmedString(source?.[key]);
|
|
25809
|
+
}
|
|
25807
25810
|
var selectPromptTurnId = (input2, activeTurnId, freshTurnId) => {
|
|
25808
25811
|
const target = input2.expectedActiveTurnId;
|
|
25809
25812
|
if (target === void 0) return input2.turnId ?? activeTurnId ?? freshTurnId();
|
|
@@ -26023,141 +26026,7 @@ function deriveToolActivityPresentation(input2) {
|
|
|
26023
26026
|
};
|
|
26024
26027
|
}
|
|
26025
26028
|
|
|
26026
|
-
// ../../packages/ycodium-acp-executor/src/
|
|
26027
|
-
function extractModelConfigId(sessionResponse) {
|
|
26028
|
-
const configOptions = sessionResponse.configOptions;
|
|
26029
|
-
if (!configOptions) return void 0;
|
|
26030
|
-
for (const opt of configOptions) {
|
|
26031
|
-
if (opt.category === "model" && opt.id.trim().length > 0) {
|
|
26032
|
-
return opt.id.trim();
|
|
26033
|
-
}
|
|
26034
|
-
}
|
|
26035
|
-
return configOptions.find((opt) => opt.id.trim() === "model" && opt.type === "select") ? "model" : void 0;
|
|
26036
|
-
}
|
|
26037
|
-
function findSessionConfigOption(configOptions, configId) {
|
|
26038
|
-
if (!configOptions) {
|
|
26039
|
-
return void 0;
|
|
26040
|
-
}
|
|
26041
|
-
const normalizedConfigId = configId.trim();
|
|
26042
|
-
if (!normalizedConfigId) {
|
|
26043
|
-
return void 0;
|
|
26044
|
-
}
|
|
26045
|
-
return configOptions.find((option) => option.id.trim() === normalizedConfigId);
|
|
26046
|
-
}
|
|
26047
|
-
function collectSessionConfigOptionValues(configOption) {
|
|
26048
|
-
if (configOption.type !== "select" || !configOption.options) {
|
|
26049
|
-
return [];
|
|
26050
|
-
}
|
|
26051
|
-
return configOption.options.flatMap(
|
|
26052
|
-
(entry) => "value" in entry ? [entry.value] : entry.options.map((option) => option.value)
|
|
26053
|
-
);
|
|
26054
|
-
}
|
|
26055
|
-
function collectSessionModelIds(models) {
|
|
26056
|
-
if (!isRecord3(models) || !Array.isArray(models["availableModels"])) {
|
|
26057
|
-
return [];
|
|
26058
|
-
}
|
|
26059
|
-
return models["availableModels"].flatMap(
|
|
26060
|
-
(model) => isRecord3(model) && typeof model["modelId"] === "string" ? [model["modelId"]] : []
|
|
26061
|
-
);
|
|
26062
|
-
}
|
|
26063
|
-
function catalogModelLastSegment(value) {
|
|
26064
|
-
if (value.startsWith("[")) {
|
|
26065
|
-
let parsed;
|
|
26066
|
-
try {
|
|
26067
|
-
parsed = JSON.parse(value);
|
|
26068
|
-
} catch {
|
|
26069
|
-
return void 0;
|
|
26070
|
-
}
|
|
26071
|
-
if (!Array.isArray(parsed) || parsed.length < 2) return void 0;
|
|
26072
|
-
const last = parsed[parsed.length - 1];
|
|
26073
|
-
return typeof last === "string" ? last : void 0;
|
|
26074
|
-
}
|
|
26075
|
-
const separator = value.indexOf("/");
|
|
26076
|
-
return separator > 0 && separator < value.length - 1 ? value.slice(separator + 1) : void 0;
|
|
26077
|
-
}
|
|
26078
|
-
function matchAdvertisedModelValue(requestedModelId, advertisedValues) {
|
|
26079
|
-
const wanted = requestedModelId.trim();
|
|
26080
|
-
if (!wanted) return void 0;
|
|
26081
|
-
if (advertisedValues.includes(wanted)) return wanted;
|
|
26082
|
-
const byLastSegment = advertisedValues.filter(
|
|
26083
|
-
(value) => catalogModelLastSegment(value) === wanted
|
|
26084
|
-
);
|
|
26085
|
-
return byLastSegment.length === 1 ? byLastSegment[0] : void 0;
|
|
26086
|
-
}
|
|
26087
|
-
function parseSessionModeState(sessionResponse) {
|
|
26088
|
-
const modes = sessionResponse.modes;
|
|
26089
|
-
if (!modes) return void 0;
|
|
26090
|
-
const currentModeId = modes.currentModeId.trim();
|
|
26091
|
-
if (!currentModeId) {
|
|
26092
|
-
return void 0;
|
|
26093
|
-
}
|
|
26094
|
-
const availableModes = [];
|
|
26095
|
-
for (const mode of modes.availableModes) {
|
|
26096
|
-
const id = mode.id.trim();
|
|
26097
|
-
const name = mode.name.trim();
|
|
26098
|
-
if (!id || !name) {
|
|
26099
|
-
continue;
|
|
26100
|
-
}
|
|
26101
|
-
const description = mode.description?.trim() || void 0;
|
|
26102
|
-
availableModes.push(
|
|
26103
|
-
description !== void 0 ? { id, name, description } : { id, name }
|
|
26104
|
-
);
|
|
26105
|
-
}
|
|
26106
|
-
if (availableModes.length === 0) {
|
|
26107
|
-
return void 0;
|
|
26108
|
-
}
|
|
26109
|
-
return {
|
|
26110
|
-
currentModeId,
|
|
26111
|
-
availableModes
|
|
26112
|
-
};
|
|
26113
|
-
}
|
|
26114
|
-
function acpCommandsToSlashCommands(commands) {
|
|
26115
|
-
return commands.map((command) => ({
|
|
26116
|
-
name: command.name,
|
|
26117
|
-
...command.description === void 0 ? {} : { description: command.description },
|
|
26118
|
-
...command.inputHint === void 0 ? {} : { input: { hint: command.inputHint } }
|
|
26119
|
-
}));
|
|
26120
|
-
}
|
|
26121
|
-
function parseAvailableCommandsUpdate(params) {
|
|
26122
|
-
const update = params.update;
|
|
26123
|
-
if (update["sessionUpdate"] !== "available_commands_update") {
|
|
26124
|
-
return void 0;
|
|
26125
|
-
}
|
|
26126
|
-
const availableCommands = update["availableCommands"];
|
|
26127
|
-
if (!Array.isArray(availableCommands)) {
|
|
26128
|
-
return [];
|
|
26129
|
-
}
|
|
26130
|
-
const commands = [];
|
|
26131
|
-
for (const command of availableCommands) {
|
|
26132
|
-
if (!isRecord3(command)) {
|
|
26133
|
-
continue;
|
|
26134
|
-
}
|
|
26135
|
-
const name = typeof command["name"] === "string" ? command["name"].trim() : "";
|
|
26136
|
-
if (!name) {
|
|
26137
|
-
continue;
|
|
26138
|
-
}
|
|
26139
|
-
const description = typeof command["description"] === "string" ? command["description"].trim() || void 0 : void 0;
|
|
26140
|
-
const input2 = isRecord3(command["input"]) ? command["input"] : void 0;
|
|
26141
|
-
const inputHint = typeof input2?.["hint"] === "string" ? input2["hint"].trim() || void 0 : void 0;
|
|
26142
|
-
commands.push({
|
|
26143
|
-
name,
|
|
26144
|
-
...description ? { description } : {},
|
|
26145
|
-
...inputHint ? { inputHint } : {}
|
|
26146
|
-
});
|
|
26147
|
-
}
|
|
26148
|
-
return commands;
|
|
26149
|
-
}
|
|
26150
|
-
function normalizePlanStepStatus(raw) {
|
|
26151
|
-
switch (raw) {
|
|
26152
|
-
case "completed":
|
|
26153
|
-
return "completed";
|
|
26154
|
-
case "in_progress":
|
|
26155
|
-
case "inProgress":
|
|
26156
|
-
return "inProgress";
|
|
26157
|
-
default:
|
|
26158
|
-
return "pending";
|
|
26159
|
-
}
|
|
26160
|
-
}
|
|
26029
|
+
// ../../packages/ycodium-acp-executor/src/tool-call-state.ts
|
|
26161
26030
|
function normalizeToolCallStatus(raw, fallback) {
|
|
26162
26031
|
switch (raw) {
|
|
26163
26032
|
case "pending":
|
|
@@ -26380,6 +26249,142 @@ function decideToolCallUpdateEmission(input2) {
|
|
|
26380
26249
|
}
|
|
26381
26250
|
return { emit: false, skippedSinceEmit: skippedSinceEmit + 1 };
|
|
26382
26251
|
}
|
|
26252
|
+
|
|
26253
|
+
// ../../packages/ycodium-acp-executor/src/runtime-model.ts
|
|
26254
|
+
function normalizePlanStepStatus(raw) {
|
|
26255
|
+
switch (raw) {
|
|
26256
|
+
case "completed":
|
|
26257
|
+
return "completed";
|
|
26258
|
+
case "in_progress":
|
|
26259
|
+
case "inProgress":
|
|
26260
|
+
return "inProgress";
|
|
26261
|
+
default:
|
|
26262
|
+
return "pending";
|
|
26263
|
+
}
|
|
26264
|
+
}
|
|
26265
|
+
function extractModelConfigId(sessionResponse) {
|
|
26266
|
+
const configOptions = sessionResponse.configOptions;
|
|
26267
|
+
if (!configOptions) return void 0;
|
|
26268
|
+
for (const opt of configOptions) {
|
|
26269
|
+
if (opt.category === "model" && opt.id.trim().length > 0) {
|
|
26270
|
+
return opt.id.trim();
|
|
26271
|
+
}
|
|
26272
|
+
}
|
|
26273
|
+
return configOptions.find((opt) => opt.id.trim() === "model" && opt.type === "select") ? "model" : void 0;
|
|
26274
|
+
}
|
|
26275
|
+
function findSessionConfigOption(configOptions, configId) {
|
|
26276
|
+
if (!configOptions) {
|
|
26277
|
+
return void 0;
|
|
26278
|
+
}
|
|
26279
|
+
const normalizedConfigId = configId.trim();
|
|
26280
|
+
if (!normalizedConfigId) {
|
|
26281
|
+
return void 0;
|
|
26282
|
+
}
|
|
26283
|
+
return configOptions.find((option) => option.id.trim() === normalizedConfigId);
|
|
26284
|
+
}
|
|
26285
|
+
function collectSessionConfigOptionValues(configOption) {
|
|
26286
|
+
if (configOption.type !== "select" || !configOption.options) {
|
|
26287
|
+
return [];
|
|
26288
|
+
}
|
|
26289
|
+
return configOption.options.flatMap(
|
|
26290
|
+
(entry) => "value" in entry ? [entry.value] : entry.options.map((option) => option.value)
|
|
26291
|
+
);
|
|
26292
|
+
}
|
|
26293
|
+
function collectSessionModelIds(models) {
|
|
26294
|
+
if (!isRecord3(models) || !Array.isArray(models["availableModels"])) {
|
|
26295
|
+
return [];
|
|
26296
|
+
}
|
|
26297
|
+
return models["availableModels"].flatMap(
|
|
26298
|
+
(model) => isRecord3(model) && typeof model["modelId"] === "string" ? [model["modelId"]] : []
|
|
26299
|
+
);
|
|
26300
|
+
}
|
|
26301
|
+
function catalogModelLastSegment(value) {
|
|
26302
|
+
if (value.startsWith("[")) {
|
|
26303
|
+
let parsed;
|
|
26304
|
+
try {
|
|
26305
|
+
parsed = JSON.parse(value);
|
|
26306
|
+
} catch {
|
|
26307
|
+
return void 0;
|
|
26308
|
+
}
|
|
26309
|
+
if (!Array.isArray(parsed) || parsed.length < 2) return void 0;
|
|
26310
|
+
const last = parsed[parsed.length - 1];
|
|
26311
|
+
return typeof last === "string" ? last : void 0;
|
|
26312
|
+
}
|
|
26313
|
+
const separator = value.indexOf("/");
|
|
26314
|
+
return separator > 0 && separator < value.length - 1 ? value.slice(separator + 1) : void 0;
|
|
26315
|
+
}
|
|
26316
|
+
function matchAdvertisedModelValue(requestedModelId, advertisedValues) {
|
|
26317
|
+
const wanted = requestedModelId.trim();
|
|
26318
|
+
if (!wanted) return void 0;
|
|
26319
|
+
if (advertisedValues.includes(wanted)) return wanted;
|
|
26320
|
+
const byLastSegment = advertisedValues.filter(
|
|
26321
|
+
(value) => catalogModelLastSegment(value) === wanted
|
|
26322
|
+
);
|
|
26323
|
+
return byLastSegment.length === 1 ? byLastSegment[0] : void 0;
|
|
26324
|
+
}
|
|
26325
|
+
function parseSessionModeState(sessionResponse) {
|
|
26326
|
+
const modes = sessionResponse.modes;
|
|
26327
|
+
if (!modes) return void 0;
|
|
26328
|
+
const currentModeId = modes.currentModeId.trim();
|
|
26329
|
+
if (!currentModeId) {
|
|
26330
|
+
return void 0;
|
|
26331
|
+
}
|
|
26332
|
+
const availableModes = [];
|
|
26333
|
+
for (const mode of modes.availableModes) {
|
|
26334
|
+
const id = mode.id.trim();
|
|
26335
|
+
const name = mode.name.trim();
|
|
26336
|
+
if (!id || !name) {
|
|
26337
|
+
continue;
|
|
26338
|
+
}
|
|
26339
|
+
const description = mode.description?.trim() || void 0;
|
|
26340
|
+
availableModes.push(
|
|
26341
|
+
description !== void 0 ? { id, name, description } : { id, name }
|
|
26342
|
+
);
|
|
26343
|
+
}
|
|
26344
|
+
if (availableModes.length === 0) {
|
|
26345
|
+
return void 0;
|
|
26346
|
+
}
|
|
26347
|
+
return {
|
|
26348
|
+
currentModeId,
|
|
26349
|
+
availableModes
|
|
26350
|
+
};
|
|
26351
|
+
}
|
|
26352
|
+
function acpCommandsToSlashCommands(commands) {
|
|
26353
|
+
return commands.map((command) => ({
|
|
26354
|
+
name: command.name,
|
|
26355
|
+
...command.description === void 0 ? {} : { description: command.description },
|
|
26356
|
+
...command.inputHint === void 0 ? {} : { input: { hint: command.inputHint } }
|
|
26357
|
+
}));
|
|
26358
|
+
}
|
|
26359
|
+
function parseAvailableCommandsUpdate(params) {
|
|
26360
|
+
const update = params.update;
|
|
26361
|
+
if (update["sessionUpdate"] !== "available_commands_update") {
|
|
26362
|
+
return void 0;
|
|
26363
|
+
}
|
|
26364
|
+
const availableCommands = update["availableCommands"];
|
|
26365
|
+
if (!Array.isArray(availableCommands)) {
|
|
26366
|
+
return [];
|
|
26367
|
+
}
|
|
26368
|
+
const commands = [];
|
|
26369
|
+
for (const command of availableCommands) {
|
|
26370
|
+
if (!isRecord3(command)) {
|
|
26371
|
+
continue;
|
|
26372
|
+
}
|
|
26373
|
+
const name = typeof command["name"] === "string" ? command["name"].trim() : "";
|
|
26374
|
+
if (!name) {
|
|
26375
|
+
continue;
|
|
26376
|
+
}
|
|
26377
|
+
const description = typeof command["description"] === "string" ? command["description"].trim() || void 0 : void 0;
|
|
26378
|
+
const input2 = isRecord3(command["input"]) ? command["input"] : void 0;
|
|
26379
|
+
const inputHint = typeof input2?.["hint"] === "string" ? input2["hint"].trim() || void 0 : void 0;
|
|
26380
|
+
commands.push({
|
|
26381
|
+
name,
|
|
26382
|
+
...description ? { description } : {},
|
|
26383
|
+
...inputHint ? { inputHint } : {}
|
|
26384
|
+
});
|
|
26385
|
+
}
|
|
26386
|
+
return commands;
|
|
26387
|
+
}
|
|
26383
26388
|
function parsePermissionRequest(params) {
|
|
26384
26389
|
const toolCall = makeToolCallState(
|
|
26385
26390
|
{
|
|
@@ -26419,12 +26424,6 @@ function boundToolCallRawPayload(params, update, toolCall) {
|
|
|
26419
26424
|
}
|
|
26420
26425
|
};
|
|
26421
26426
|
}
|
|
26422
|
-
function readAcpText(source, key) {
|
|
26423
|
-
const value = source?.[key];
|
|
26424
|
-
if (typeof value !== "string") return void 0;
|
|
26425
|
-
const trimmed = value.trim();
|
|
26426
|
-
return trimmed.length > 0 ? trimmed : void 0;
|
|
26427
|
-
}
|
|
26428
26427
|
function textFromContentBlocks(blocks) {
|
|
26429
26428
|
const parts = blocks.flatMap(
|
|
26430
26429
|
(block) => isRecord3(block) && block["type"] === "text" && typeof block["text"] === "string" ? [block["text"]] : []
|
|
@@ -33063,7 +33062,7 @@ var executors = [
|
|
|
33063
33062
|
];
|
|
33064
33063
|
var index_default = definePlugin({
|
|
33065
33064
|
id: "agent-antigravity",
|
|
33066
|
-
apiVersion:
|
|
33065
|
+
apiVersion: 6,
|
|
33067
33066
|
executors,
|
|
33068
33067
|
activate(ctx) {
|
|
33069
33068
|
const runtime = createRuntimeManager({
|
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.3000",
|
|
4
4
|
"description": "Google Antigravity executor: runs the Antigravity agent over Agent Client Protocol stdio.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ycodium",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"typescript": "~6.0.3",
|
|
32
32
|
"vite-plus": "0.2.2",
|
|
33
33
|
"yauzl": "^3.4.0",
|
|
34
|
-
"
|
|
35
|
-
"ycodium-
|
|
34
|
+
"ycodium-acp-executor": "0.2.3000",
|
|
35
|
+
"@ycodium-ai/plugin-api": "0.2.3000",
|
|
36
36
|
"ycodium-executor-testing": "0.0.0"
|
|
37
37
|
},
|
|
38
38
|
"ycodium": {
|