@span-io/agent-link 0.0.3 → 0.1.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.
Files changed (2) hide show
  1. package/dist/index.js +11 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -89,9 +89,19 @@ function handleControl(message) {
89
89
  else if (targetModel.startsWith("claude-")) {
90
90
  preferredAgent = "claude";
91
91
  }
92
+ else if (targetModel.includes("codex") || targetModel.startsWith("gpt-")) {
93
+ preferredAgent = "codex";
94
+ }
92
95
  }
93
96
  if (!preferredAgent) {
94
- preferredAgent = payload?.name || "codex";
97
+ // Only use payload.name if it matches a known binary, otherwise default to codex
98
+ const candidateName = payload?.name?.toLowerCase();
99
+ if (candidateName && ["codex", "gemini", "claude"].includes(candidateName)) {
100
+ preferredAgent = candidateName;
101
+ }
102
+ else {
103
+ preferredAgent = "codex";
104
+ }
95
105
  }
96
106
  const agentCandidate = resolveAgentBinary(preferredAgent, discovered);
97
107
  if (!agentCandidate) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@span-io/agent-link",
3
- "version": "0.0.3",
3
+ "version": "0.1.0",
4
4
  "description": "Secure bridge between Span (AI control plane) and local agent CLI tools.",
5
5
  "type": "module",
6
6
  "bin": {