@ycodium-ai/agent-codex 0.2.4505 → 0.2.5004

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 +55 -4
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import { definePlugin } from "@ycodium-ai/plugin-api";
3
3
 
4
4
  // ../../packages/plugin-api/src/version.ts
5
- var PLUGIN_API_VERSION = 119;
5
+ var PLUGIN_API_VERSION = 142;
6
6
 
7
7
  // src/index.ts
8
8
  import {
@@ -48,6 +48,7 @@ var CODEX_CARD = {
48
48
  "5.3-spark": "gpt-5.3-codex-spark",
49
49
  "gpt-5.3-spark": "gpt-5.3-codex-spark"
50
50
  },
51
+ mcpToolCallCeilingSeconds: 630,
51
52
  mcpTransports: ["stdio", "http"],
52
53
  pluginManaged: true,
53
54
  verifiedSkills: true,
@@ -96,6 +97,7 @@ var CODEX_CARD = {
96
97
  type: "string",
97
98
  "x-ycodium-form": {
98
99
  titleKey: "form.homePath.title",
100
+ machineLocal: true,
99
101
  placeholderKey: "form.homePath.placeholder"
100
102
  }
101
103
  },
@@ -103,6 +105,7 @@ var CODEX_CARD = {
103
105
  type: "string",
104
106
  "x-ycodium-form": {
105
107
  titleKey: "form.shadowHomePath.title",
108
+ machineLocal: true,
106
109
  descriptionKey: "form.shadowHomePath.description",
107
110
  placeholderKey: "form.shadowHomePath.placeholder"
108
111
  }
@@ -4617,6 +4620,31 @@ function elicitationOptions(params) {
4617
4620
  { decision: "accept", label: "Approve", displayKind: "standard" }
4618
4621
  ];
4619
4622
  }
4623
+ var ELICITATION_COVERED_PARAMS = [
4624
+ "threadId",
4625
+ "turnId",
4626
+ "elicitationId",
4627
+ "serverName",
4628
+ "appName",
4629
+ "mode",
4630
+ "message",
4631
+ "_meta"
4632
+ ];
4633
+ function describeRequestedAccess(described) {
4634
+ const lines = [
4635
+ ...described.read.length > 0 ? [`read ${described.read.join(", ")}`] : [],
4636
+ ...described.write.length > 0 ? [`write ${described.write.join(", ")}`] : [],
4637
+ ...described.network ? ["network"] : []
4638
+ ];
4639
+ return lines.length > 0 ? lines.join("\n") : void 0;
4640
+ }
4641
+ function statementOf(fields2) {
4642
+ return {
4643
+ ...fields2.justification ? { justification: fields2.justification } : {},
4644
+ ...fields2.command ? { command: fields2.command } : {},
4645
+ ...fields2.coveredArgs.length > 0 ? { coveredArgs: fields2.coveredArgs } : {}
4646
+ };
4647
+ }
4620
4648
  function mapServerRequestToEvents(input) {
4621
4649
  const requestId = input.requestId;
4622
4650
  if (input.method === "item/tool/requestUserInput") {
@@ -4647,17 +4675,25 @@ function mapServerRequestToEvents(input) {
4647
4675
  if (appName) payload["appName"] = appName;
4648
4676
  if (described.message) payload["detail"] = described.message;
4649
4677
  payload["args"] = input.params;
4678
+ const params = isRecord2(input.params) ? input.params : {};
4679
+ payload["statement"] = statementOf({
4680
+ coveredArgs: ELICITATION_COVERED_PARAMS.filter((name) => params[name] !== void 0)
4681
+ });
4650
4682
  } else if (input.method === "item/permissions/requestApproval") {
4651
4683
  const described = describePermissionsApproval(input.params);
4652
- const paths = [...described.read, ...described.write];
4653
- const detail = described.reason ?? (paths.length > 0 ? paths.join(", ") : void 0);
4684
+ const detail = describeRequestedAccess(described) ?? described.reason;
4654
4685
  if (detail) payload["detail"] = detail;
4655
- payload["args"] = {
4686
+ const args = {
4656
4687
  ...described.reason ? { reason: described.reason } : {},
4657
4688
  ...described.read.length > 0 ? { read: described.read.join(", ") } : {},
4658
4689
  ...described.write.length > 0 ? { write: described.write.join(", ") } : {},
4659
4690
  ...described.network ? { network: "true" } : {}
4660
4691
  };
4692
+ payload["args"] = args;
4693
+ payload["statement"] = statementOf({
4694
+ justification: described.reason,
4695
+ coveredArgs: Object.keys(args)
4696
+ });
4661
4697
  } else if (input.method === "item/fileChange/requestApproval" || input.method.includes("applyPatch")) {
4662
4698
  const described = describeFileChangeApproval(input.params);
4663
4699
  if (described.detail) payload["detail"] = described.detail;
@@ -4667,6 +4703,13 @@ function mapServerRequestToEvents(input) {
4667
4703
  ...described.reason ? { reason: described.reason } : {},
4668
4704
  ...described.grantRoot ? { grantRoot: described.grantRoot } : {}
4669
4705
  };
4706
+ payload["statement"] = statementOf({
4707
+ justification: described.reason,
4708
+ coveredArgs: [
4709
+ ...described.callId ? ["callId"] : [],
4710
+ ...described.reason ? ["reason"] : []
4711
+ ]
4712
+ });
4670
4713
  } else {
4671
4714
  const described = describeCommandApproval(input.params);
4672
4715
  const detail = described.command || described.reason;
@@ -4676,6 +4719,14 @@ function mapServerRequestToEvents(input) {
4676
4719
  ...described.cwd ? { cwd: described.cwd } : {},
4677
4720
  ...described.reason ? { reason: described.reason } : {}
4678
4721
  };
4722
+ payload["statement"] = statementOf({
4723
+ justification: described.reason,
4724
+ command: described.command,
4725
+ coveredArgs: [
4726
+ ...described.command ? ["command"] : [],
4727
+ ...described.reason ? ["reason"] : []
4728
+ ]
4729
+ });
4679
4730
  }
4680
4731
  return [
4681
4732
  baseEvent({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ycodium-ai/agent-codex",
3
- "version": "0.2.4505",
3
+ "version": "0.2.5004",
4
4
  "description": "Codex executor: Codex CLI over the app-server JSON-RPC protocol.",
5
5
  "keywords": [
6
6
  "ycodium",
@@ -30,8 +30,8 @@
30
30
  "typescript": "~6.0.3",
31
31
  "vite-plus": "0.2.2",
32
32
  "ycodium-executor-testing": "0.0.0",
33
- "ycodium-jsonl-stream": "0.0.0",
34
- "@ycodium-ai/plugin-api": "0.2.0"
33
+ "@ycodium-ai/plugin-api": "0.2.5004",
34
+ "ycodium-jsonl-stream": "0.0.0"
35
35
  },
36
36
  "ycodium": {
37
37
  "plugin": "./dist/index.js",