axexec 1.1.0 → 1.1.2
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.
|
@@ -16,7 +16,9 @@ function getCredentialEnvironment(credentials) {
|
|
|
16
16
|
// Extract API key from credentials data
|
|
17
17
|
const apiKey = resolveStringField(credentials.data, "apiKey", "key");
|
|
18
18
|
// Extract OAuth token from credentials data
|
|
19
|
-
|
|
19
|
+
// axauth uses "accessToken", but also check legacy "oauthToken" and "token" keys
|
|
20
|
+
const oauthToken = resolveStringField(credentials.data, "accessToken", "oauthToken") ??
|
|
21
|
+
resolveStringField(credentials.data, "token", "token");
|
|
20
22
|
switch (credentials.agent) {
|
|
21
23
|
case "claude": {
|
|
22
24
|
if (credentials.type === "api-key" && apiKey) {
|
|
@@ -63,11 +65,17 @@ function getCredentialEnvironment(credentials) {
|
|
|
63
65
|
}
|
|
64
66
|
case "copilot": {
|
|
65
67
|
// Copilot uses GitHub token as its credential
|
|
68
|
+
// axauth returns oauth-token type with accessToken field
|
|
66
69
|
if (credentials.type === "api-key" && apiKey) {
|
|
67
70
|
environment["COPILOT_GITHUB_TOKEN"] = apiKey;
|
|
68
71
|
environment["GH_TOKEN"] = apiKey;
|
|
69
72
|
environment["GITHUB_TOKEN"] = apiKey;
|
|
70
73
|
}
|
|
74
|
+
else if (credentials.type === "oauth-token" && oauthToken) {
|
|
75
|
+
environment["COPILOT_GITHUB_TOKEN"] = oauthToken;
|
|
76
|
+
environment["GH_TOKEN"] = oauthToken;
|
|
77
|
+
environment["GITHUB_TOKEN"] = oauthToken;
|
|
78
|
+
}
|
|
71
79
|
break;
|
|
72
80
|
}
|
|
73
81
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,11 @@
|
|
|
4
4
|
* Programmatic API for running agents with credential isolation,
|
|
5
5
|
* config generation, and normalized event streaming.
|
|
6
6
|
*/
|
|
7
|
+
import "./agents/claude-code/adapter.js";
|
|
8
|
+
import "./agents/codex/adapter.js";
|
|
9
|
+
import "./agents/gemini/adapter.js";
|
|
10
|
+
import "./agents/opencode/adapter.js";
|
|
11
|
+
import "./agents/copilot/adapter.js";
|
|
7
12
|
export { runAgent } from "./run-agent.js";
|
|
8
13
|
export { cleanupCredentials } from "./credentials/install-credentials.js";
|
|
9
14
|
export type { ExecutionCredentials, ExecutionDirectories, ExecutionMetadata, RunAgentDiagnostics, RunAgentOptions, RunResult, } from "./types/run-result.js";
|
package/dist/index.js
CHANGED
|
@@ -4,6 +4,12 @@
|
|
|
4
4
|
* Programmatic API for running agents with credential isolation,
|
|
5
5
|
* config generation, and normalized event streaming.
|
|
6
6
|
*/
|
|
7
|
+
// Import all adapters to trigger self-registration
|
|
8
|
+
import "./agents/claude-code/adapter.js";
|
|
9
|
+
import "./agents/codex/adapter.js";
|
|
10
|
+
import "./agents/gemini/adapter.js";
|
|
11
|
+
import "./agents/opencode/adapter.js";
|
|
12
|
+
import "./agents/copilot/adapter.js";
|
|
7
13
|
// Main entry point
|
|
8
14
|
export { runAgent } from "./run-agent.js";
|
|
9
15
|
// Cleanup utility for use with preserveConfigDirectory option
|
package/package.json
CHANGED