@ycodium-ai/agent-antigravity 0.2.3681 → 0.2.3710
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 +47 -11
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -26868,23 +26868,31 @@ function createAcpConnection(options2) {
|
|
|
26868
26868
|
function normalizeModelId(value) {
|
|
26869
26869
|
return value?.trim() || void 0;
|
|
26870
26870
|
}
|
|
26871
|
-
function adoptReportedConfigOptions(state, configOptions) {
|
|
26871
|
+
function adoptReportedConfigOptions(state, configOptions, fromAgent = true) {
|
|
26872
26872
|
const option = state.modelConfigId === void 0 ? void 0 : findConfigOptionEntry(configOptions, state.modelConfigId);
|
|
26873
26873
|
const value = option?.["currentValue"];
|
|
26874
26874
|
const reported = typeof value === "string" ? normalizeModelId(value) : void 0;
|
|
26875
26875
|
if (reported === void 0) return { ...state, configOptions };
|
|
26876
26876
|
const { modelUnconfirmed: _confirmed, ...known } = state;
|
|
26877
|
-
|
|
26877
|
+
const stillReported = fromAgent || state.currentModelReported === true && reported === state.currentModelId;
|
|
26878
|
+
const { currentModelReported: _stale, ...unreported } = known;
|
|
26879
|
+
return {
|
|
26880
|
+
...stillReported ? known : unreported,
|
|
26881
|
+
configOptions,
|
|
26882
|
+
currentModelId: reported,
|
|
26883
|
+
...stillReported ? { currentModelReported: true } : {}
|
|
26884
|
+
};
|
|
26878
26885
|
}
|
|
26879
26886
|
function forgetConfigOptionValue(state, configId) {
|
|
26880
26887
|
const forgetsModel = configId === void 0 || configId === state.modelConfigId;
|
|
26888
|
+
const { currentModelReported: _forgottenReport, ...withoutReport } = state;
|
|
26881
26889
|
const configOptions = configId !== void 0 && Array.isArray(state.configOptions) ? state.configOptions.map((option) => {
|
|
26882
26890
|
if (!isRecord2(option) || option["id"] !== configId) return option;
|
|
26883
26891
|
const { currentValue: _forgotten, ...rest } = option;
|
|
26884
26892
|
return rest;
|
|
26885
26893
|
}) : state.configOptions;
|
|
26886
26894
|
return {
|
|
26887
|
-
...state,
|
|
26895
|
+
...forgetsModel ? withoutReport : state,
|
|
26888
26896
|
configOptions,
|
|
26889
26897
|
...forgetsModel ? { currentModelId: void 0, modelUnconfirmed: true } : {}
|
|
26890
26898
|
};
|
|
@@ -26901,6 +26909,7 @@ function modelSelectionStateFromSetup(setup) {
|
|
|
26901
26909
|
sessionModelsAdvertised: sessionModels !== void 0,
|
|
26902
26910
|
modelConfigId,
|
|
26903
26911
|
currentModelId,
|
|
26912
|
+
...currentModelId === void 0 ? {} : { currentModelReported: true },
|
|
26904
26913
|
advertisedModelValues: strategy === "config-option" ? modelConfigOption === void 0 ? [] : collectSessionConfigOptionValues(modelConfigOption) : collectSessionModelIds(sessionModels),
|
|
26905
26914
|
configOptions: setup.configOptions,
|
|
26906
26915
|
catalogSetup: setup
|
|
@@ -27688,14 +27697,28 @@ function createExecutorPrompt({
|
|
|
27688
27697
|
}
|
|
27689
27698
|
};
|
|
27690
27699
|
const alignTurnOptions = async (input2, sessionId, generation, isStale, signal) => {
|
|
27700
|
+
const before = shared.modelSelectionState;
|
|
27691
27701
|
const applied = await applyRequestedModel({
|
|
27692
|
-
state:
|
|
27702
|
+
state: before,
|
|
27693
27703
|
acpSessionId: sessionId,
|
|
27694
27704
|
requestedModelId: input2.requestedModelId,
|
|
27695
27705
|
expectedGeneration: generation,
|
|
27696
27706
|
signal
|
|
27697
27707
|
});
|
|
27698
27708
|
shared.modelSelectionState = applied;
|
|
27709
|
+
if (applied.currentModelId !== void 0 && (applied.currentModelId !== before.currentModelId || applied.currentModelReported !== before.currentModelReported)) {
|
|
27710
|
+
emit({
|
|
27711
|
+
type: "thread.metadata.updated",
|
|
27712
|
+
...stamp(),
|
|
27713
|
+
provider: options2.provider,
|
|
27714
|
+
threadId: options2.threadId,
|
|
27715
|
+
...shared.activeTurnId === void 0 ? {} : { turnId: shared.activeTurnId },
|
|
27716
|
+
payload: {
|
|
27717
|
+
model: applied.currentModelId,
|
|
27718
|
+
modelSource: applied.currentModelReported === true ? "reported" : "echo"
|
|
27719
|
+
}
|
|
27720
|
+
});
|
|
27721
|
+
}
|
|
27699
27722
|
if (isStale()) return;
|
|
27700
27723
|
const switched = applied.configOptions;
|
|
27701
27724
|
let aligned;
|
|
@@ -27720,7 +27743,8 @@ function createExecutorPrompt({
|
|
|
27720
27743
|
if (aligned.configOptions !== switched) {
|
|
27721
27744
|
shared.modelSelectionState = adoptReportedConfigOptions(
|
|
27722
27745
|
shared.modelSelectionState,
|
|
27723
|
-
aligned.configOptions
|
|
27746
|
+
aligned.configOptions,
|
|
27747
|
+
false
|
|
27724
27748
|
);
|
|
27725
27749
|
}
|
|
27726
27750
|
if (aligned.unsupportedEffort !== void 0) {
|
|
@@ -28694,18 +28718,20 @@ function createExecutorSession({
|
|
|
28694
28718
|
const base = ours !== void 0 && ours.seq > issuedAt ? ours.configOptions : configOptions;
|
|
28695
28719
|
return { configOptions: withConfigOptionValue(base, configId, value), reported: false };
|
|
28696
28720
|
};
|
|
28697
|
-
const writeConfigOption = async (...args) => (await writeConfigOptionReported(...args)).configOptions;
|
|
28698
28721
|
const switchModel = async (input2) => {
|
|
28699
28722
|
let configOptions = input2.state.configOptions;
|
|
28723
|
+
let fromAgent = true;
|
|
28700
28724
|
const write = { option: "model", signal: input2.signal };
|
|
28701
28725
|
if (input2.state.strategy === "config-option" && input2.state.modelConfigId !== void 0) {
|
|
28702
|
-
|
|
28726
|
+
const written = await writeConfigOptionReported(
|
|
28703
28727
|
input2.sessionId,
|
|
28704
28728
|
configOptions,
|
|
28705
28729
|
input2.state.modelConfigId,
|
|
28706
28730
|
input2.value,
|
|
28707
28731
|
write
|
|
28708
28732
|
);
|
|
28733
|
+
configOptions = written.configOptions;
|
|
28734
|
+
fromAgent = written.reported;
|
|
28709
28735
|
} else {
|
|
28710
28736
|
const before = shared.configOptionUpdates.get(input2.sessionId);
|
|
28711
28737
|
const pending = connection.begin("session/set_model", {
|
|
@@ -28723,7 +28749,12 @@ function createExecutorSession({
|
|
|
28723
28749
|
throw new AcpExecutorDisposedError();
|
|
28724
28750
|
}
|
|
28725
28751
|
const { modelUnconfirmed: _confirmed, ...known } = input2.state;
|
|
28726
|
-
|
|
28752
|
+
const { currentModelReported: _echoed, ...requested } = known;
|
|
28753
|
+
return adoptReportedConfigOptions(
|
|
28754
|
+
{ ...requested, currentModelId: input2.value },
|
|
28755
|
+
configOptions,
|
|
28756
|
+
fromAgent
|
|
28757
|
+
);
|
|
28727
28758
|
};
|
|
28728
28759
|
const applyRequestedModel = async (input2) => {
|
|
28729
28760
|
const requestedModelId = normalizeModelId(input2.requestedModelId) ?? "";
|
|
@@ -28867,7 +28898,8 @@ function createExecutorSession({
|
|
|
28867
28898
|
});
|
|
28868
28899
|
nextModelSelectionState = adoptReportedConfigOptions(
|
|
28869
28900
|
nextModelSelectionState,
|
|
28870
|
-
aligned.configOptions
|
|
28901
|
+
aligned.configOptions,
|
|
28902
|
+
false
|
|
28871
28903
|
);
|
|
28872
28904
|
if (aligned.unsupportedEffort !== void 0) {
|
|
28873
28905
|
options2.log?.info("requested effort is not offered by this model; using its default", {
|
|
@@ -28900,7 +28932,8 @@ function createExecutorSession({
|
|
|
28900
28932
|
initializeResult: initialized,
|
|
28901
28933
|
sessionSetupResult: setup,
|
|
28902
28934
|
modelConfigId: extractModelConfigId(setup),
|
|
28903
|
-
modelId: nextModelSelectionState.currentModelId
|
|
28935
|
+
modelId: nextModelSelectionState.currentModelId,
|
|
28936
|
+
modelReported: nextModelSelectionState.currentModelReported === true
|
|
28904
28937
|
};
|
|
28905
28938
|
shared.startResult = result;
|
|
28906
28939
|
shared.status = "ready";
|
|
@@ -29858,6 +29891,9 @@ function createAcpExecutor(options2) {
|
|
|
29858
29891
|
get modelId() {
|
|
29859
29892
|
return shared.modelSelectionState.currentModelId;
|
|
29860
29893
|
},
|
|
29894
|
+
get modelReported() {
|
|
29895
|
+
return shared.modelSelectionState.currentModelReported === true;
|
|
29896
|
+
},
|
|
29861
29897
|
get status() {
|
|
29862
29898
|
return shared.status;
|
|
29863
29899
|
},
|
|
@@ -34787,7 +34823,7 @@ var executors = [
|
|
|
34787
34823
|
];
|
|
34788
34824
|
var index_default = definePlugin({
|
|
34789
34825
|
id: "agent-antigravity",
|
|
34790
|
-
apiVersion:
|
|
34826
|
+
apiVersion: 53,
|
|
34791
34827
|
executors,
|
|
34792
34828
|
activate(ctx) {
|
|
34793
34829
|
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.3710",
|
|
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
|
-
"ycodium-
|
|
35
|
-
"
|
|
36
|
-
"ycodium-executor
|
|
34
|
+
"@ycodium-ai/plugin-api": "0.2.3710",
|
|
35
|
+
"ycodium-executor-testing": "0.0.0",
|
|
36
|
+
"ycodium-acp-executor": "0.2.3710"
|
|
37
37
|
},
|
|
38
38
|
"ycodium": {
|
|
39
39
|
"plugin": "./dist/index.js",
|