@alas-ide/codex-acp 2.5.0-alas.8 → 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 +35 -14
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -32124,6 +32124,7 @@ 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
32126
|
var NEUTRAL_RECOMMENDED_CONFIG_VALUE_META_KEY = "recommendedConfigValue";
|
|
32127
|
+
var NEUTRAL_COMMAND_PRESENTATION_META_KEY = "commandPresentation";
|
|
32127
32128
|
function neutralPresentationCapability() {
|
|
32128
32129
|
return { version: 1 };
|
|
32129
32130
|
}
|
|
@@ -35094,7 +35095,8 @@ var ClientCapabilities = class _ClientCapabilities {
|
|
|
35094
35095
|
permissionPromptFields: false,
|
|
35095
35096
|
neutralPermissionPresentation: false,
|
|
35096
35097
|
neutralQuestionCustomAnswer: false,
|
|
35097
|
-
neutralRecommendedConfigValue: false
|
|
35098
|
+
neutralRecommendedConfigValue: false,
|
|
35099
|
+
neutralCommandPresentation: false
|
|
35098
35100
|
});
|
|
35099
35101
|
/** The client declares `_meta.jetbrains.air`. */
|
|
35100
35102
|
airClient;
|
|
@@ -35122,6 +35124,8 @@ var ClientCapabilities = class _ClientCapabilities {
|
|
|
35122
35124
|
neutralQuestionCustomAnswer;
|
|
35123
35125
|
/** Model and effort selectors carry `_meta.recommendedConfigValue`. Only ACP v1 reads the opt-in. */
|
|
35124
35126
|
neutralRecommendedConfigValue;
|
|
35127
|
+
/** Available commands carry `_meta.commandPresentation`. Only ACP v1 reads the opt-in. */
|
|
35128
|
+
neutralCommandPresentation;
|
|
35125
35129
|
constructor(values) {
|
|
35126
35130
|
this.airClient = values.airClient;
|
|
35127
35131
|
this.airToolCallContract = values.airToolCallContract;
|
|
@@ -35138,6 +35142,7 @@ var ClientCapabilities = class _ClientCapabilities {
|
|
|
35138
35142
|
this.neutralPermissionPresentation = values.neutralPermissionPresentation;
|
|
35139
35143
|
this.neutralQuestionCustomAnswer = values.neutralQuestionCustomAnswer;
|
|
35140
35144
|
this.neutralRecommendedConfigValue = values.neutralRecommendedConfigValue;
|
|
35145
|
+
this.neutralCommandPresentation = values.neutralCommandPresentation;
|
|
35141
35146
|
}
|
|
35142
35147
|
static from(capabilities) {
|
|
35143
35148
|
const airClient = isAirClient(capabilities);
|
|
@@ -35165,7 +35170,8 @@ var ClientCapabilities = class _ClientCapabilities {
|
|
|
35165
35170
|
permissionPromptFields: false,
|
|
35166
35171
|
neutralPermissionPresentation: clientRequestsNeutralPresentation(capabilities, NEUTRAL_PERMISSION_PRESENTATION_META_KEY),
|
|
35167
35172
|
neutralQuestionCustomAnswer: clientRequestsNeutralPresentation(capabilities, NEUTRAL_QUESTION_CUSTOM_ANSWER_META_KEY),
|
|
35168
|
-
neutralRecommendedConfigValue: clientRequestsNeutralPresentation(capabilities, NEUTRAL_RECOMMENDED_CONFIG_VALUE_META_KEY)
|
|
35173
|
+
neutralRecommendedConfigValue: clientRequestsNeutralPresentation(capabilities, NEUTRAL_RECOMMENDED_CONFIG_VALUE_META_KEY),
|
|
35174
|
+
neutralCommandPresentation: clientRequestsNeutralPresentation(capabilities, NEUTRAL_COMMAND_PRESENTATION_META_KEY)
|
|
35169
35175
|
});
|
|
35170
35176
|
}
|
|
35171
35177
|
/**
|
|
@@ -35195,7 +35201,8 @@ var ClientCapabilities = class _ClientCapabilities {
|
|
|
35195
35201
|
// A v2 request has its own title and description, so v2 ignores both client-neutral opt-ins.
|
|
35196
35202
|
neutralPermissionPresentation: false,
|
|
35197
35203
|
neutralQuestionCustomAnswer: false,
|
|
35198
|
-
neutralRecommendedConfigValue: false
|
|
35204
|
+
neutralRecommendedConfigValue: false,
|
|
35205
|
+
neutralCommandPresentation: false
|
|
35199
35206
|
});
|
|
35200
35207
|
}
|
|
35201
35208
|
/**
|
|
@@ -40766,7 +40773,7 @@ var package_default = {
|
|
|
40766
40773
|
publishConfig: {
|
|
40767
40774
|
access: "public"
|
|
40768
40775
|
},
|
|
40769
|
-
version: "2.5.0-alas.
|
|
40776
|
+
version: "2.5.0-alas.9",
|
|
40770
40777
|
description: "",
|
|
40771
40778
|
main: "dist/index.js",
|
|
40772
40779
|
bin: {
|
|
@@ -40844,7 +40851,7 @@ var package_default = {
|
|
|
40844
40851
|
alasDownstream: {
|
|
40845
40852
|
upstreamVersion: "2.5.0",
|
|
40846
40853
|
upstreamCommit: "34e08970aa324a2be985f5080674d5aa91d7666f",
|
|
40847
|
-
sourceCommit: "
|
|
40854
|
+
sourceCommit: "d9a647ae9cbbf85c89ed99ba5af59c98cd716c55"
|
|
40848
40855
|
}
|
|
40849
40856
|
};
|
|
40850
40857
|
|
|
@@ -47959,7 +47966,7 @@ var CodexCommands = class {
|
|
|
47959
47966
|
const skillsResponse = await this.runWithProcessCheck(() => this.codexAcpClient.listSkills(this.createSkillsListParams(sessionState)));
|
|
47960
47967
|
const commands = this.buildAvailableCommands(
|
|
47961
47968
|
skillsResponse?.data ?? [],
|
|
47962
|
-
sessionState.clientCapabilities
|
|
47969
|
+
sessionState.clientCapabilities
|
|
47963
47970
|
);
|
|
47964
47971
|
if ((this.snapshots.get(sessionState)?.revision ?? 0) < revision) {
|
|
47965
47972
|
this.snapshots.set(sessionState, { revision, commands });
|
|
@@ -48000,9 +48007,9 @@ var CodexCommands = class {
|
|
|
48000
48007
|
cwds: [sessionState.cwd, ...sessionState.additionalDirectories]
|
|
48001
48008
|
};
|
|
48002
48009
|
}
|
|
48003
|
-
buildAvailableCommands(skillsEntries,
|
|
48010
|
+
buildAvailableCommands(skillsEntries, capabilities) {
|
|
48004
48011
|
const commands = /* @__PURE__ */ new Map();
|
|
48005
|
-
for (const builtin of this.getBuiltinCommands(
|
|
48012
|
+
for (const builtin of this.getBuiltinCommands(capabilities)) {
|
|
48006
48013
|
commands.set(builtin.name, builtin);
|
|
48007
48014
|
}
|
|
48008
48015
|
for (const entry of skillsEntries) {
|
|
@@ -48010,12 +48017,15 @@ var CodexCommands = class {
|
|
|
48010
48017
|
const name = `$${skill.name}`;
|
|
48011
48018
|
if (commands.has(name)) continue;
|
|
48012
48019
|
const description = skill.shortDescription ?? skill.description ?? skill.name;
|
|
48013
|
-
const meta3 =
|
|
48020
|
+
const meta3 = {
|
|
48021
|
+
...airOnlyMeta(capabilities.airClient, AIR_SKILL_PATH_KEY, skill.path),
|
|
48022
|
+
...neutralCommandPresentation(capabilities, { kind: "skill", skillPath: skill.path })
|
|
48023
|
+
};
|
|
48014
48024
|
commands.set(name, {
|
|
48015
48025
|
name,
|
|
48016
48026
|
description,
|
|
48017
48027
|
input: null,
|
|
48018
|
-
...meta3 ? { _meta: meta3 } : {}
|
|
48028
|
+
...Object.keys(meta3).length > 0 ? { _meta: meta3 } : {}
|
|
48019
48029
|
});
|
|
48020
48030
|
}
|
|
48021
48031
|
}
|
|
@@ -48023,12 +48033,16 @@ var CodexCommands = class {
|
|
|
48023
48033
|
}
|
|
48024
48034
|
/**
|
|
48025
48035
|
* See the original cli commands documentation here: https://developers.openai.com/codex/cli/slash-commands/
|
|
48026
|
-
*
|
|
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`.
|
|
48027
48038
|
*/
|
|
48028
|
-
getBuiltinCommands(
|
|
48039
|
+
getBuiltinCommands(capabilities) {
|
|
48029
48040
|
const commandAction = (action) => {
|
|
48030
|
-
const meta3 =
|
|
48031
|
-
|
|
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 } : {};
|
|
48032
48046
|
};
|
|
48033
48047
|
return [
|
|
48034
48048
|
{
|
|
@@ -48497,6 +48511,10 @@ var CodexCommands = class {
|
|
|
48497
48511
|
return count.toString();
|
|
48498
48512
|
}
|
|
48499
48513
|
};
|
|
48514
|
+
function neutralCommandPresentation(capabilities, presentation) {
|
|
48515
|
+
if (!capabilities.neutralCommandPresentation) return {};
|
|
48516
|
+
return { [NEUTRAL_COMMAND_PRESENTATION_META_KEY]: { version: 1, ...presentation } };
|
|
48517
|
+
}
|
|
48500
48518
|
|
|
48501
48519
|
// src/SteeringQueue.ts
|
|
48502
48520
|
var SteeringQueue = class {
|
|
@@ -52731,6 +52749,9 @@ var CodexAcpServer = class {
|
|
|
52731
52749
|
...this.capabilities.neutralRecommendedConfigValue ? {
|
|
52732
52750
|
[NEUTRAL_RECOMMENDED_CONFIG_VALUE_META_KEY]: neutralPresentationCapability()
|
|
52733
52751
|
} : {},
|
|
52752
|
+
...this.capabilities.neutralCommandPresentation ? {
|
|
52753
|
+
[NEUTRAL_COMMAND_PRESENTATION_META_KEY]: neutralPresentationCapability()
|
|
52754
|
+
} : {},
|
|
52734
52755
|
// The session index for a client that opted in without AIR, see `docs/air-extensions.md`.
|
|
52735
52756
|
...neutralSessionIndex ? {
|
|
52736
52757
|
[NEUTRAL_SESSION_INDEX_META_KEY]: neutralSessionIndex
|
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
|
}
|