@alas-ide/codex-acp 2.5.0-alas.7 → 2.5.0-alas.9
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 +63 -24
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -32123,6 +32123,8 @@ var CODEX_ADDITIONAL_PERMISSIONS_TITLE = "Grant permissions?";
|
|
|
32123
32123
|
var PERMISSION_PROMPT_META_KEY = "permission_prompt";
|
|
32124
32124
|
var NEUTRAL_PERMISSION_PRESENTATION_META_KEY = "permissionPresentation";
|
|
32125
32125
|
var NEUTRAL_QUESTION_CUSTOM_ANSWER_META_KEY = "questionCustomAnswer";
|
|
32126
|
+
var NEUTRAL_RECOMMENDED_CONFIG_VALUE_META_KEY = "recommendedConfigValue";
|
|
32127
|
+
var NEUTRAL_COMMAND_PRESENTATION_META_KEY = "commandPresentation";
|
|
32126
32128
|
function neutralPresentationCapability() {
|
|
32127
32129
|
return { version: 1 };
|
|
32128
32130
|
}
|
|
@@ -35092,7 +35094,9 @@ var ClientCapabilities = class _ClientCapabilities {
|
|
|
35092
35094
|
agentFileChangeReportFormat: "none",
|
|
35093
35095
|
permissionPromptFields: false,
|
|
35094
35096
|
neutralPermissionPresentation: false,
|
|
35095
|
-
neutralQuestionCustomAnswer: false
|
|
35097
|
+
neutralQuestionCustomAnswer: false,
|
|
35098
|
+
neutralRecommendedConfigValue: false,
|
|
35099
|
+
neutralCommandPresentation: false
|
|
35096
35100
|
});
|
|
35097
35101
|
/** The client declares `_meta.jetbrains.air`. */
|
|
35098
35102
|
airClient;
|
|
@@ -35118,6 +35122,10 @@ var ClientCapabilities = class _ClientCapabilities {
|
|
|
35118
35122
|
neutralPermissionPresentation;
|
|
35119
35123
|
/** A question's note field carries `_meta.questionCustomAnswer`. Only ACP v1 reads the opt-in. */
|
|
35120
35124
|
neutralQuestionCustomAnswer;
|
|
35125
|
+
/** Model and effort selectors carry `_meta.recommendedConfigValue`. Only ACP v1 reads the opt-in. */
|
|
35126
|
+
neutralRecommendedConfigValue;
|
|
35127
|
+
/** Available commands carry `_meta.commandPresentation`. Only ACP v1 reads the opt-in. */
|
|
35128
|
+
neutralCommandPresentation;
|
|
35121
35129
|
constructor(values) {
|
|
35122
35130
|
this.airClient = values.airClient;
|
|
35123
35131
|
this.airToolCallContract = values.airToolCallContract;
|
|
@@ -35133,6 +35141,8 @@ var ClientCapabilities = class _ClientCapabilities {
|
|
|
35133
35141
|
this.permissionPromptFields = values.permissionPromptFields;
|
|
35134
35142
|
this.neutralPermissionPresentation = values.neutralPermissionPresentation;
|
|
35135
35143
|
this.neutralQuestionCustomAnswer = values.neutralQuestionCustomAnswer;
|
|
35144
|
+
this.neutralRecommendedConfigValue = values.neutralRecommendedConfigValue;
|
|
35145
|
+
this.neutralCommandPresentation = values.neutralCommandPresentation;
|
|
35136
35146
|
}
|
|
35137
35147
|
static from(capabilities) {
|
|
35138
35148
|
const airClient = isAirClient(capabilities);
|
|
@@ -35159,7 +35169,9 @@ var ClientCapabilities = class _ClientCapabilities {
|
|
|
35159
35169
|
agentFileChangeReportFormat: clientRequestsNeutralAgentFileChangeReport(capabilities) ? "neutral" : clientSupportsAirCapability(capabilities, AIR_AGENT_FILE_CHANGE_REPORT_KEY) ? "air" : "none",
|
|
35160
35170
|
permissionPromptFields: false,
|
|
35161
35171
|
neutralPermissionPresentation: clientRequestsNeutralPresentation(capabilities, NEUTRAL_PERMISSION_PRESENTATION_META_KEY),
|
|
35162
|
-
neutralQuestionCustomAnswer: clientRequestsNeutralPresentation(capabilities, NEUTRAL_QUESTION_CUSTOM_ANSWER_META_KEY)
|
|
35172
|
+
neutralQuestionCustomAnswer: clientRequestsNeutralPresentation(capabilities, NEUTRAL_QUESTION_CUSTOM_ANSWER_META_KEY),
|
|
35173
|
+
neutralRecommendedConfigValue: clientRequestsNeutralPresentation(capabilities, NEUTRAL_RECOMMENDED_CONFIG_VALUE_META_KEY),
|
|
35174
|
+
neutralCommandPresentation: clientRequestsNeutralPresentation(capabilities, NEUTRAL_COMMAND_PRESENTATION_META_KEY)
|
|
35163
35175
|
});
|
|
35164
35176
|
}
|
|
35165
35177
|
/**
|
|
@@ -35188,7 +35200,9 @@ var ClientCapabilities = class _ClientCapabilities {
|
|
|
35188
35200
|
permissionPromptFields: true,
|
|
35189
35201
|
// A v2 request has its own title and description, so v2 ignores both client-neutral opt-ins.
|
|
35190
35202
|
neutralPermissionPresentation: false,
|
|
35191
|
-
neutralQuestionCustomAnswer: false
|
|
35203
|
+
neutralQuestionCustomAnswer: false,
|
|
35204
|
+
neutralRecommendedConfigValue: false,
|
|
35205
|
+
neutralCommandPresentation: false
|
|
35192
35206
|
});
|
|
35193
35207
|
}
|
|
35194
35208
|
/**
|
|
@@ -35476,7 +35490,13 @@ function modelOptions(availableModels, currentBaseModelId) {
|
|
|
35476
35490
|
}
|
|
35477
35491
|
return options;
|
|
35478
35492
|
}
|
|
35479
|
-
function
|
|
35493
|
+
function recommendationMeta(value, records) {
|
|
35494
|
+
return {
|
|
35495
|
+
...records.air ? withAirMeta(void 0, AIR_RECOMMENDED_CONFIG_VALUE_KEY, value) : {},
|
|
35496
|
+
...records.neutral ? { [NEUTRAL_RECOMMENDED_CONFIG_VALUE_META_KEY]: { version: 1, value } } : {}
|
|
35497
|
+
};
|
|
35498
|
+
}
|
|
35499
|
+
function createModelConfigOption(availableModels, currentBaseModelId, recommendedModelId, records = { air: true, neutral: false }) {
|
|
35480
35500
|
const options = modelOptions(availableModels, currentBaseModelId);
|
|
35481
35501
|
const recommendation = recommendedModelId && options.some((option) => option.value === recommendedModelId) ? recommendedModelId : void 0;
|
|
35482
35502
|
return {
|
|
@@ -35487,10 +35507,10 @@ function createModelConfigOption(availableModels, currentBaseModelId, recommende
|
|
|
35487
35507
|
type: "select",
|
|
35488
35508
|
currentValue: currentBaseModelId,
|
|
35489
35509
|
options,
|
|
35490
|
-
...recommendation ? { _meta:
|
|
35510
|
+
...recommendation ? { _meta: recommendationMeta(recommendation, records) } : {}
|
|
35491
35511
|
};
|
|
35492
35512
|
}
|
|
35493
|
-
function createReasoningEffortConfigOption(supportedReasoningEfforts, currentEffort, recommendedEffort) {
|
|
35513
|
+
function createReasoningEffortConfigOption(supportedReasoningEfforts, currentEffort, recommendedEffort, records = { air: true, neutral: false }) {
|
|
35494
35514
|
const recommendation = findSupportedEffort(supportedReasoningEfforts, recommendedEffort);
|
|
35495
35515
|
return {
|
|
35496
35516
|
id: REASONING_EFFORT_CONFIG_ID,
|
|
@@ -35504,7 +35524,7 @@ function createReasoningEffortConfigOption(supportedReasoningEfforts, currentEff
|
|
|
35504
35524
|
name: capitalize(option.reasoningEffort),
|
|
35505
35525
|
description: option.description
|
|
35506
35526
|
})),
|
|
35507
|
-
...recommendation ? { _meta:
|
|
35527
|
+
...recommendation ? { _meta: recommendationMeta(recommendation, records) } : {}
|
|
35508
35528
|
};
|
|
35509
35529
|
}
|
|
35510
35530
|
function createSubagentModelConfigOption(availableModels, parentBaseModelId, model) {
|
|
@@ -40753,7 +40773,7 @@ var package_default = {
|
|
|
40753
40773
|
publishConfig: {
|
|
40754
40774
|
access: "public"
|
|
40755
40775
|
},
|
|
40756
|
-
version: "2.5.0-alas.
|
|
40776
|
+
version: "2.5.0-alas.9",
|
|
40757
40777
|
description: "",
|
|
40758
40778
|
main: "dist/index.js",
|
|
40759
40779
|
bin: {
|
|
@@ -40831,7 +40851,7 @@ var package_default = {
|
|
|
40831
40851
|
alasDownstream: {
|
|
40832
40852
|
upstreamVersion: "2.5.0",
|
|
40833
40853
|
upstreamCommit: "34e08970aa324a2be985f5080674d5aa91d7666f",
|
|
40834
|
-
sourceCommit: "
|
|
40854
|
+
sourceCommit: "d9a647ae9cbbf85c89ed99ba5af59c98cd716c55"
|
|
40835
40855
|
}
|
|
40836
40856
|
};
|
|
40837
40857
|
|
|
@@ -47946,7 +47966,7 @@ var CodexCommands = class {
|
|
|
47946
47966
|
const skillsResponse = await this.runWithProcessCheck(() => this.codexAcpClient.listSkills(this.createSkillsListParams(sessionState)));
|
|
47947
47967
|
const commands = this.buildAvailableCommands(
|
|
47948
47968
|
skillsResponse?.data ?? [],
|
|
47949
|
-
sessionState.clientCapabilities
|
|
47969
|
+
sessionState.clientCapabilities
|
|
47950
47970
|
);
|
|
47951
47971
|
if ((this.snapshots.get(sessionState)?.revision ?? 0) < revision) {
|
|
47952
47972
|
this.snapshots.set(sessionState, { revision, commands });
|
|
@@ -47987,9 +48007,9 @@ var CodexCommands = class {
|
|
|
47987
48007
|
cwds: [sessionState.cwd, ...sessionState.additionalDirectories]
|
|
47988
48008
|
};
|
|
47989
48009
|
}
|
|
47990
|
-
buildAvailableCommands(skillsEntries,
|
|
48010
|
+
buildAvailableCommands(skillsEntries, capabilities) {
|
|
47991
48011
|
const commands = /* @__PURE__ */ new Map();
|
|
47992
|
-
for (const builtin of this.getBuiltinCommands(
|
|
48012
|
+
for (const builtin of this.getBuiltinCommands(capabilities)) {
|
|
47993
48013
|
commands.set(builtin.name, builtin);
|
|
47994
48014
|
}
|
|
47995
48015
|
for (const entry of skillsEntries) {
|
|
@@ -47997,12 +48017,15 @@ var CodexCommands = class {
|
|
|
47997
48017
|
const name = `$${skill.name}`;
|
|
47998
48018
|
if (commands.has(name)) continue;
|
|
47999
48019
|
const description = skill.shortDescription ?? skill.description ?? skill.name;
|
|
48000
|
-
const meta3 =
|
|
48020
|
+
const meta3 = {
|
|
48021
|
+
...airOnlyMeta(capabilities.airClient, AIR_SKILL_PATH_KEY, skill.path),
|
|
48022
|
+
...neutralCommandPresentation(capabilities, { kind: "skill", skillPath: skill.path })
|
|
48023
|
+
};
|
|
48001
48024
|
commands.set(name, {
|
|
48002
48025
|
name,
|
|
48003
48026
|
description,
|
|
48004
48027
|
input: null,
|
|
48005
|
-
...meta3 ? { _meta: meta3 } : {}
|
|
48028
|
+
...Object.keys(meta3).length > 0 ? { _meta: meta3 } : {}
|
|
48006
48029
|
});
|
|
48007
48030
|
}
|
|
48008
48031
|
}
|
|
@@ -48010,12 +48033,16 @@ var CodexCommands = class {
|
|
|
48010
48033
|
}
|
|
48011
48034
|
/**
|
|
48012
48035
|
* See the original cli commands documentation here: https://developers.openai.com/codex/cli/slash-commands/
|
|
48013
|
-
*
|
|
48036
|
+
* AIR gets a command action in `_meta.jetbrains.air.commandAction`, and a client that opted into the
|
|
48037
|
+
* client-neutral form gets it in `_meta.commandPresentation.action`.
|
|
48014
48038
|
*/
|
|
48015
|
-
getBuiltinCommands(
|
|
48039
|
+
getBuiltinCommands(capabilities) {
|
|
48016
48040
|
const commandAction = (action) => {
|
|
48017
|
-
const meta3 =
|
|
48018
|
-
|
|
48041
|
+
const meta3 = {
|
|
48042
|
+
...airOnlyMeta(capabilities.airClient, AIR_COMMAND_ACTION_KEY, action),
|
|
48043
|
+
...neutralCommandPresentation(capabilities, { action })
|
|
48044
|
+
};
|
|
48045
|
+
return Object.keys(meta3).length > 0 ? { _meta: meta3 } : {};
|
|
48019
48046
|
};
|
|
48020
48047
|
return [
|
|
48021
48048
|
{
|
|
@@ -48484,6 +48511,10 @@ var CodexCommands = class {
|
|
|
48484
48511
|
return count.toString();
|
|
48485
48512
|
}
|
|
48486
48513
|
};
|
|
48514
|
+
function neutralCommandPresentation(capabilities, presentation) {
|
|
48515
|
+
if (!capabilities.neutralCommandPresentation) return {};
|
|
48516
|
+
return { [NEUTRAL_COMMAND_PRESENTATION_META_KEY]: { version: 1, ...presentation } };
|
|
48517
|
+
}
|
|
48487
48518
|
|
|
48488
48519
|
// src/SteeringQueue.ts
|
|
48489
48520
|
var SteeringQueue = class {
|
|
@@ -52715,6 +52746,12 @@ var CodexAcpServer = class {
|
|
|
52715
52746
|
...this.capabilities.neutralQuestionCustomAnswer ? {
|
|
52716
52747
|
[NEUTRAL_QUESTION_CUSTOM_ANSWER_META_KEY]: neutralPresentationCapability()
|
|
52717
52748
|
} : {},
|
|
52749
|
+
...this.capabilities.neutralRecommendedConfigValue ? {
|
|
52750
|
+
[NEUTRAL_RECOMMENDED_CONFIG_VALUE_META_KEY]: neutralPresentationCapability()
|
|
52751
|
+
} : {},
|
|
52752
|
+
...this.capabilities.neutralCommandPresentation ? {
|
|
52753
|
+
[NEUTRAL_COMMAND_PRESENTATION_META_KEY]: neutralPresentationCapability()
|
|
52754
|
+
} : {},
|
|
52718
52755
|
// The session index for a client that opted in without AIR, see `docs/air-extensions.md`.
|
|
52719
52756
|
...neutralSessionIndex ? {
|
|
52720
52757
|
[NEUTRAL_SESSION_INDEX_META_KEY]: neutralSessionIndex
|
|
@@ -54763,10 +54800,11 @@ You have been logged out. Please try again.`);
|
|
|
54763
54800
|
}
|
|
54764
54801
|
createSessionConfigOptions(sessionState) {
|
|
54765
54802
|
const currentModelId = ModelId.fromString(sessionState.currentModelId);
|
|
54766
|
-
const
|
|
54767
|
-
this.clientCapabilities,
|
|
54768
|
-
|
|
54769
|
-
|
|
54803
|
+
const records = {
|
|
54804
|
+
air: clientSupportsAirCapability(this.clientCapabilities, AIR_RECOMMENDED_CONFIG_VALUE_KEY),
|
|
54805
|
+
neutral: this.capabilities.neutralRecommendedConfigValue
|
|
54806
|
+
};
|
|
54807
|
+
const useRecommendedValue = records.air || records.neutral;
|
|
54770
54808
|
const currentModel = this.findCurrentModel(sessionState.availableModels, sessionState.currentModelId);
|
|
54771
54809
|
const recommendedModelId = useRecommendedValue ? sessionState.availableModels.find((model) => model.isDefault)?.id : void 0;
|
|
54772
54810
|
const configOptions = [
|
|
@@ -54774,14 +54812,15 @@ You have been logged out. Please try again.`);
|
|
|
54774
54812
|
createCollaborationModeConfigOption(sessionState.collaborationMode)
|
|
54775
54813
|
];
|
|
54776
54814
|
if (sessionState.availableModels.length > 0) {
|
|
54777
|
-
configOptions.push(createModelConfigOption(sessionState.availableModels, currentModelId.model, recommendedModelId));
|
|
54815
|
+
configOptions.push(createModelConfigOption(sessionState.availableModels, currentModelId.model, recommendedModelId, records));
|
|
54778
54816
|
}
|
|
54779
54817
|
if (sessionState.supportedReasoningEfforts.length > 0) {
|
|
54780
54818
|
configOptions.push(
|
|
54781
54819
|
createReasoningEffortConfigOption(
|
|
54782
54820
|
sessionState.supportedReasoningEfforts,
|
|
54783
54821
|
currentModelId.effort,
|
|
54784
|
-
useRecommendedValue ? currentModel?.defaultReasoningEffort : void 0
|
|
54822
|
+
useRecommendedValue ? currentModel?.defaultReasoningEffort : void 0,
|
|
54823
|
+
records
|
|
54785
54824
|
)
|
|
54786
54825
|
);
|
|
54787
54826
|
}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "2.5.0-alas.
|
|
6
|
+
"version": "2.5.0-alas.9",
|
|
7
7
|
"description": "",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"bin": {
|
|
@@ -81,6 +81,6 @@
|
|
|
81
81
|
"alasDownstream": {
|
|
82
82
|
"upstreamVersion": "2.5.0",
|
|
83
83
|
"upstreamCommit": "34e08970aa324a2be985f5080674d5aa91d7666f",
|
|
84
|
-
"sourceCommit": "
|
|
84
|
+
"sourceCommit": "d9a647ae9cbbf85c89ed99ba5af59c98cd716c55"
|
|
85
85
|
}
|
|
86
86
|
}
|