@nyssance/codex-acp-v2 0.3.5 → 0.4.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.0 — 2026-09-10
4
+
5
+ ### Added
6
+
7
+ - Skills and plugins extension surface: `_codex/skills_list`, `_codex/skills_config_write`,
8
+ `_codex/plugin_list`, `_codex/plugin_installed`, `_codex/plugin_install`,
9
+ `_codex/plugin_uninstall`, `_codex/plugin_read`, `_codex/marketplace_add`,
10
+ `_codex/marketplace_remove`, `_codex/marketplace_upgrade` pass the Codex v2 shapes
11
+ through verbatim; advertised as `capabilities._meta.codex.skills` / `.plugins`.
12
+ - `_codex/skills_changed` notification: forwarded from Codex `skills/changed` and sent
13
+ after every catalog mutation made through the adapter.
14
+
3
15
  ## 0.3.5 — 2026-09-07
4
16
 
5
17
  ### Fixed
package/README.md CHANGED
@@ -21,6 +21,12 @@ compatibility layer: everything is written against `@agentclientprotocol/sdk/exp
21
21
  hiding is the `_codex/session_archive` / `_codex/session_unarchive` extension pair
22
22
  (declared as `capabilities._meta.codex.archive`), and `session/list` pages the archive
23
23
  when called with `_meta: {codex: {archived: true}}`.
24
+ - **Skills and plugins**: `_codex/skills_list`, `_codex/skills_config_write`,
25
+ `_codex/plugin_list` / `_codex/plugin_installed` / `_codex/plugin_install` /
26
+ `_codex/plugin_uninstall` / `_codex/plugin_read` and `_codex/marketplace_add` /
27
+ `_codex/marketplace_remove` / `_codex/marketplace_upgrade` pass Codex's own request
28
+ and response shapes through (declared as `capabilities._meta.codex.skills` / `.plugins`);
29
+ `_codex/skills_changed` tells the client to refetch either catalog.
24
30
  - **Asynchronous prompts**: `session/prompt` returns immediately; the turn is
25
31
  reported through `state_update` frames (`running`, `requires_action` while a
26
32
  permission or form is open, `idle` with `stopReason` and token `usage`).
package/dist/index.js CHANGED
@@ -21721,7 +21721,7 @@ var package_default = {
21721
21721
  publishConfig: {
21722
21722
  access: "public"
21723
21723
  },
21724
- version: "0.3.5",
21724
+ version: "0.4.0",
21725
21725
  description: "Native ACP v2 agent for the OpenAI Codex app-server",
21726
21726
  packageManager: "bun@1.4.0",
21727
21727
  engines: {
@@ -26283,6 +26283,7 @@ class CodexAgent {
26283
26283
  if (!this.changingSkillRoots)
26284
26284
  for (const runtime of this.sessions.values())
26285
26285
  this.refreshAvailableCommands(runtime);
26286
+ this.notifySkillsChanged();
26286
26287
  }
26287
26288
  if (notification.method === "account/updated")
26288
26289
  this.refreshAccounts().catch((error40) => logger.error("refreshing account failed", error40));
@@ -26322,7 +26323,7 @@ class CodexAgent {
26322
26323
  additionalDirectories: {}
26323
26324
  },
26324
26325
  providers: {},
26325
- _meta: { codex: { archive: true, seedHistory: true } }
26326
+ _meta: { codex: { archive: true, seedHistory: true, skills: true, plugins: true } }
26326
26327
  },
26327
26328
  authMethods: authMethods(this.capabilities, this.env)
26328
26329
  };
@@ -26841,6 +26842,61 @@ class CodexAgent {
26841
26842
  await this.withCodex(() => this.codex.threadUnarchive({ threadId: params.sessionId }));
26842
26843
  return {};
26843
26844
  }
26845
+ async skillsList(params) {
26846
+ this.requireInitialized("_codex/skills_list");
26847
+ return await this.withCodex(() => this.codex.skillsList(params));
26848
+ }
26849
+ async skillsConfigWrite(params) {
26850
+ this.requireInitialized("_codex/skills_config_write");
26851
+ const response = await this.withCodex(() => this.codex.skillsConfigWrite(params));
26852
+ this.notifySkillsChanged();
26853
+ return response;
26854
+ }
26855
+ async pluginList(params) {
26856
+ this.requireInitialized("_codex/plugin_list");
26857
+ return await this.withCodex(() => this.codex.pluginList(params));
26858
+ }
26859
+ async pluginInstalled(params) {
26860
+ this.requireInitialized("_codex/plugin_installed");
26861
+ return await this.withCodex(() => this.codex.pluginInstalled(params));
26862
+ }
26863
+ async pluginInstall(params) {
26864
+ this.requireInitialized("_codex/plugin_install");
26865
+ const response = await this.withCodex(() => this.codex.pluginInstall(params));
26866
+ this.notifySkillsChanged();
26867
+ return response;
26868
+ }
26869
+ async pluginUninstall(params) {
26870
+ this.requireInitialized("_codex/plugin_uninstall");
26871
+ await this.withCodex(() => this.codex.pluginUninstall(params));
26872
+ this.notifySkillsChanged();
26873
+ return {};
26874
+ }
26875
+ async pluginRead(params) {
26876
+ this.requireInitialized("_codex/plugin_read");
26877
+ return await this.withCodex(() => this.codex.pluginRead(params));
26878
+ }
26879
+ async marketplaceAdd(params) {
26880
+ this.requireInitialized("_codex/marketplace_add");
26881
+ const response = await this.withCodex(() => this.codex.marketplaceAdd(params));
26882
+ this.notifySkillsChanged();
26883
+ return response;
26884
+ }
26885
+ async marketplaceRemove(params) {
26886
+ this.requireInitialized("_codex/marketplace_remove");
26887
+ await this.withCodex(() => this.codex.marketplaceRemove(params));
26888
+ this.notifySkillsChanged();
26889
+ return {};
26890
+ }
26891
+ async marketplaceUpgrade(params) {
26892
+ this.requireInitialized("_codex/marketplace_upgrade");
26893
+ const response = await this.withCodex(() => this.codex.marketplaceUpgrade(params));
26894
+ this.notifySkillsChanged();
26895
+ return response;
26896
+ }
26897
+ notifySkillsChanged() {
26898
+ this.link.notify("_codex/skills_changed", {}).catch((error40) => logger.error("skills change notification failed", error40));
26899
+ }
26844
26900
  async closeRuntime(sessionId) {
26845
26901
  const deadline = performance.now() + this.closeGraceMs;
26846
26902
  const runtime = this.sessions.get(sessionId);
@@ -26909,16 +26965,19 @@ class CodexAgent {
26909
26965
  return runtime;
26910
26966
  }
26911
26967
  async prompt(params) {
26968
+ return await this.promptInternal(params);
26969
+ }
26970
+ async promptInternal(params, allowReentry = false) {
26912
26971
  this.assertRoutingAvailable();
26913
- if (this.sessionMutations.has(params.sessionId))
26972
+ if (!allowReentry && this.sessionMutations.has(params.sessionId))
26914
26973
  throw RequestError.invalidRequest({ sessionId: params.sessionId }, "Session lifecycle or configuration work is in progress; retry when it finishes");
26915
26974
  const runtime = this.runtime(params.sessionId, "session/prompt");
26916
26975
  if (runtime.stale)
26917
26976
  throw RequestError.invalidRequest({ sessionId: params.sessionId, _meta: { codex: { routing: { stale: true } } } }, "Session routing is stale; resume the session or successfully change providers before prompting");
26918
- const { session } = runtime;
26919
26977
  if (!Array.isArray(params.prompt) || params.prompt.length === 0) {
26920
26978
  throw RequestError.invalidParams(undefined, "prompt must contain at least one content block");
26921
26979
  }
26980
+ const { session } = runtime;
26922
26981
  const model = findModel(session.catalog, session.model.model);
26923
26982
  if (!modelSupportsImages(model) && params.prompt.some((block) => block.type === "image")) {
26924
26983
  throw RequestError.invalidParams({ model: session.model.model }, "The current model does not support image input");
@@ -26943,7 +27002,7 @@ class CodexAgent {
26943
27002
  } catch (error40) {
26944
27003
  if (this.completedTurns.get(turn) === turnId || runtime.session.activeTurn !== turn) {
26945
27004
  await turn.finished;
26946
- return await this.prompt(params);
27005
+ return await this.promptInternal(params, true);
26947
27006
  }
26948
27007
  throw RequestError.invalidRequest({ sessionId: params.sessionId, turnId }, `Could not steer the running turn: ${errorMessage(error40)}`);
26949
27008
  }
@@ -27348,6 +27407,16 @@ function interruptedTurn(threadId) {
27348
27407
  turn: { id: "", items: [], itemsView: "notLoaded", status: "interrupted", error: null, startedAt: null, completedAt: null, durationMs: null }
27349
27408
  };
27350
27409
  }
27410
+ function objectParams() {
27411
+ return (raw) => {
27412
+ if (raw === undefined || raw === null)
27413
+ return {};
27414
+ if (typeof raw !== "object" || Array.isArray(raw)) {
27415
+ throw RequestError.invalidParams({ params: raw }, "expected a params object");
27416
+ }
27417
+ return raw;
27418
+ };
27419
+ }
27351
27420
  function parseSessionIdParams(raw) {
27352
27421
  const sessionId = raw?.sessionId;
27353
27422
  if (typeof sessionId !== "string" || sessionId.length === 0) {
@@ -27405,7 +27474,7 @@ function createAgentApp(options) {
27405
27474
  };
27406
27475
  return agent({ name: options.info.name }).onConnect((connection) => {
27407
27476
  agent2 = new CodexAgent(connection.client, options);
27408
- }).onRequest(methods.agent.initialize, (ctx) => current().initialize(ctx.params)).onRequest(methods.agent.auth.login, (ctx) => current().login(ctx.params, ctx.requestId)).onRequest(methods.agent.auth.logout, (ctx) => current().logout(ctx.params)).onRequest(methods.agent.providers.list, (ctx) => current().listProviders(ctx.params)).onRequest(methods.agent.providers.set, (ctx) => current().setProvider(ctx.params)).onRequest(methods.agent.providers.disable, (ctx) => current().disableProvider(ctx.params)).onRequest(methods.agent.session.new, (ctx) => current().newSession(ctx.params, ctx.signal)).onRequest(methods.agent.session.resume, (ctx) => current().resumeSession(ctx.params, ctx.signal)).onRequest(methods.agent.session.fork, (ctx) => current().forkSession(ctx.params, ctx.signal)).onRequest(methods.agent.session.list, (ctx) => current().listSessions(ctx.params)).onRequest(methods.agent.session.close, (ctx) => current().closeSession(ctx.params)).onRequest(methods.agent.session.delete, (ctx) => current().deleteSession(ctx.params)).onRequest("_codex/session_archive", { parse: parseSessionIdParams }, (ctx) => current().archiveSession(ctx.params)).onRequest("_codex/session_unarchive", { parse: parseSessionIdParams }, (ctx) => current().unarchiveSession(ctx.params)).onRequest(methods.agent.session.setConfigOption, (ctx) => current().setSessionConfigOption(ctx.params)).onRequest(methods.agent.session.prompt, (ctx) => current().prompt(ctx.params)).onNotification(methods.agent.session.cancel, (ctx) => current().cancel(ctx.params));
27477
+ }).onRequest(methods.agent.initialize, (ctx) => current().initialize(ctx.params)).onRequest(methods.agent.auth.login, (ctx) => current().login(ctx.params, ctx.requestId)).onRequest(methods.agent.auth.logout, (ctx) => current().logout(ctx.params)).onRequest(methods.agent.providers.list, (ctx) => current().listProviders(ctx.params)).onRequest(methods.agent.providers.set, (ctx) => current().setProvider(ctx.params)).onRequest(methods.agent.providers.disable, (ctx) => current().disableProvider(ctx.params)).onRequest(methods.agent.session.new, (ctx) => current().newSession(ctx.params, ctx.signal)).onRequest(methods.agent.session.resume, (ctx) => current().resumeSession(ctx.params, ctx.signal)).onRequest(methods.agent.session.fork, (ctx) => current().forkSession(ctx.params, ctx.signal)).onRequest(methods.agent.session.list, (ctx) => current().listSessions(ctx.params)).onRequest(methods.agent.session.close, (ctx) => current().closeSession(ctx.params)).onRequest(methods.agent.session.delete, (ctx) => current().deleteSession(ctx.params)).onRequest("_codex/session_archive", { parse: parseSessionIdParams }, (ctx) => current().archiveSession(ctx.params)).onRequest("_codex/session_unarchive", { parse: parseSessionIdParams }, (ctx) => current().unarchiveSession(ctx.params)).onRequest("_codex/skills_list", { parse: objectParams() }, (ctx) => current().skillsList(ctx.params)).onRequest("_codex/skills_config_write", { parse: objectParams() }, (ctx) => current().skillsConfigWrite(ctx.params)).onRequest("_codex/plugin_list", { parse: objectParams() }, (ctx) => current().pluginList(ctx.params)).onRequest("_codex/plugin_installed", { parse: objectParams() }, (ctx) => current().pluginInstalled(ctx.params)).onRequest("_codex/plugin_install", { parse: objectParams() }, (ctx) => current().pluginInstall(ctx.params)).onRequest("_codex/plugin_uninstall", { parse: objectParams() }, (ctx) => current().pluginUninstall(ctx.params)).onRequest("_codex/plugin_read", { parse: objectParams() }, (ctx) => current().pluginRead(ctx.params)).onRequest("_codex/marketplace_add", { parse: objectParams() }, (ctx) => current().marketplaceAdd(ctx.params)).onRequest("_codex/marketplace_remove", { parse: objectParams() }, (ctx) => current().marketplaceRemove(ctx.params)).onRequest("_codex/marketplace_upgrade", { parse: objectParams() }, (ctx) => current().marketplaceUpgrade(ctx.params)).onRequest(methods.agent.session.setConfigOption, (ctx) => current().setSessionConfigOption(ctx.params)).onRequest(methods.agent.session.prompt, (ctx) => current().prompt(ctx.params)).onNotification(methods.agent.session.cancel, (ctx) => current().cancel(ctx.params));
27409
27478
  }
27410
27479
 
27411
27480
  // src/codex/AppServerClient.ts
@@ -27788,6 +27857,33 @@ class AppServerClient {
27788
27857
  skillsExtraRootsSet(params) {
27789
27858
  return this.send({ method: "skills/extraRoots/set", params });
27790
27859
  }
27860
+ skillsConfigWrite(params) {
27861
+ return this.send({ method: "skills/config/write", params });
27862
+ }
27863
+ pluginList(params) {
27864
+ return this.send({ method: "plugin/list", params });
27865
+ }
27866
+ pluginInstalled(params) {
27867
+ return this.send({ method: "plugin/installed", params });
27868
+ }
27869
+ pluginInstall(params) {
27870
+ return this.send({ method: "plugin/install", params });
27871
+ }
27872
+ pluginUninstall(params) {
27873
+ return this.send({ method: "plugin/uninstall", params });
27874
+ }
27875
+ pluginRead(params) {
27876
+ return this.send({ method: "plugin/read", params });
27877
+ }
27878
+ marketplaceAdd(params) {
27879
+ return this.send({ method: "marketplace/add", params });
27880
+ }
27881
+ marketplaceRemove(params) {
27882
+ return this.send({ method: "marketplace/remove", params });
27883
+ }
27884
+ marketplaceUpgrade(params) {
27885
+ return this.send({ method: "marketplace/upgrade", params });
27886
+ }
27791
27887
  accountRead(params) {
27792
27888
  return this.send({ method: "account/read", params });
27793
27889
  }
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.3.5",
6
+ "version": "0.4.0",
7
7
  "description": "Native ACP v2 agent for the OpenAI Codex app-server",
8
8
  "packageManager": "bun@1.4.0",
9
9
  "engines": {