@agentclientprotocol/codex-acp 2.1.2-preview.5 → 2.1.2-preview.6

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.
Files changed (2) hide show
  1. package/dist/index.js +13 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -27943,6 +27943,7 @@ var AIR_EXTENSION_CAPABILITIES_KEY = "capabilities";
27943
27943
  var AIR_DIFF_PATCH_KEY = "diffPatch";
27944
27944
  var AIR_SESSION_FAILURE_KEY = "sessionFailure";
27945
27945
  var AIR_AGENT_FILE_CHANGE_REPORT_KEY = "agentFileChangeReport";
27946
+ var AIR_CUSTOM_INSTRUCTIONS_KEY = "customInstructions";
27946
27947
  var AIR_NATIVE_SUBAGENT_SESSIONS_KEY = "nativeSubagentSessions";
27947
27948
  var AIR_ASYNC_TASKS_KEY = "asyncTasks";
27948
27949
  var AIR_RECOMMENDED_CONFIG_VALUE_KEY = "recommendedValue";
@@ -27996,6 +27997,13 @@ function clientSupportsAirCapability(capabilities, capability) {
27996
27997
  const supported = air[AIR_EXTENSION_CAPABILITIES_KEY];
27997
27998
  return typeof version2 === "number" && Number.isInteger(version2) && version2 >= AIR_EXTENSION_VERSION && Array.isArray(supported) && supported.includes(capability);
27998
27999
  }
28000
+ function airCustomInstructions(meta3) {
28001
+ const root = asRecord(meta3);
28002
+ const jetbrains = asRecord(root[JETBRAINS_META_KEY]);
28003
+ const air = asRecord(jetbrains[AIR_META_KEY]);
28004
+ const instructions = air[AIR_CUSTOM_INSTRUCTIONS_KEY];
28005
+ return typeof instructions === "string" ? instructions : void 0;
28006
+ }
27999
28007
  function asRecord(value) {
28000
28008
  return value !== null && typeof value === "object" && !Array.isArray(value) ? value : {};
28001
28009
  }
@@ -34033,7 +34041,7 @@ var package_default = {
34033
34041
  publishConfig: {
34034
34042
  access: "public"
34035
34043
  },
34036
- version: "2.1.2-preview.5",
34044
+ version: "2.1.2-preview.6",
34037
34045
  description: "",
34038
34046
  main: "dist/index.js",
34039
34047
  bin: {
@@ -34942,12 +34950,14 @@ var CodexAcpClient = class {
34942
34950
  }
34943
34951
  async newSession(request) {
34944
34952
  const additionalDirectories = readAdditionalDirectories(request.cwd, request.additionalDirectories, request._meta);
34953
+ const developerInstructions = airCustomInstructions(request._meta);
34945
34954
  await this.refreshSkills(request.cwd, additionalDirectories);
34946
34955
  const sessionConfig = await this.createSessionConfig(request.cwd, additionalDirectories, request.mcpServers);
34947
34956
  const response = await this.codexClient.threadStart({
34948
34957
  config: sessionConfig.config,
34949
34958
  modelProvider: this.getModelProvider(),
34950
- cwd: request.cwd
34959
+ cwd: request.cwd,
34960
+ ...developerInstructions !== void 0 && { developerInstructions }
34951
34961
  });
34952
34962
  const codexModels = await this.fetchAvailableModels();
34953
34963
  if (codexModels.length === 0) {
@@ -38877,6 +38887,7 @@ var CodexAcpServer = class {
38877
38887
  AIR_SESSION_FAILURE_KEY,
38878
38888
  AIR_DIFF_PATCH_KEY,
38879
38889
  AIR_AGENT_FILE_CHANGE_REPORT_KEY,
38890
+ AIR_CUSTOM_INSTRUCTIONS_KEY,
38880
38891
  AIR_NATIVE_SUBAGENT_SESSIONS_KEY,
38881
38892
  AIR_ASYNC_TASKS_KEY,
38882
38893
  AIR_RECOMMENDED_CONFIG_VALUE_KEY,
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "2.1.2-preview.5",
6
+ "version": "2.1.2-preview.6",
7
7
  "description": "",
8
8
  "main": "dist/index.js",
9
9
  "bin": {