@eve-horizon/cli 0.2.13 → 0.2.14
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/dist/index.js +52 -10
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -53658,7 +53658,19 @@ Permissions (${data.permissions.length}):`);
|
|
|
53658
53658
|
{ encoding: "utf8" }
|
|
53659
53659
|
).trim();
|
|
53660
53660
|
if (output) {
|
|
53661
|
-
|
|
53661
|
+
let token = output;
|
|
53662
|
+
try {
|
|
53663
|
+
const parsed = JSON.parse(output);
|
|
53664
|
+
const claudeOauth = parsed.claudeAiOauth;
|
|
53665
|
+
const accessToken = claudeOauth?.accessToken;
|
|
53666
|
+
if (typeof accessToken === "string" && accessToken.length > 0) {
|
|
53667
|
+
token = accessToken;
|
|
53668
|
+
} else if (typeof parsed.accessToken === "string") {
|
|
53669
|
+
token = parsed.accessToken;
|
|
53670
|
+
}
|
|
53671
|
+
} catch {
|
|
53672
|
+
}
|
|
53673
|
+
extractedTokens.CLAUDE_CODE_OAUTH_TOKEN = token;
|
|
53662
53674
|
break;
|
|
53663
53675
|
}
|
|
53664
53676
|
} catch {
|
|
@@ -53700,14 +53712,24 @@ Permissions (${data.permissions.length}):`);
|
|
|
53700
53712
|
{ encoding: "utf8" }
|
|
53701
53713
|
).trim();
|
|
53702
53714
|
if (output) {
|
|
53703
|
-
|
|
53715
|
+
let token = output;
|
|
53716
|
+
try {
|
|
53717
|
+
const parsed = JSON.parse(output);
|
|
53718
|
+
const tokens = parsed.tokens;
|
|
53719
|
+
const accessToken = tokens?.access_token ?? parsed.access_token ?? parsed.accessToken;
|
|
53720
|
+
if (typeof accessToken === "string" && accessToken.length > 0) {
|
|
53721
|
+
token = accessToken;
|
|
53722
|
+
}
|
|
53723
|
+
} catch {
|
|
53724
|
+
}
|
|
53725
|
+
extractedTokens.CODEX_OAUTH_ACCESS_TOKEN = token;
|
|
53704
53726
|
break;
|
|
53705
53727
|
}
|
|
53706
53728
|
} catch {
|
|
53707
53729
|
}
|
|
53708
53730
|
}
|
|
53709
53731
|
}
|
|
53710
|
-
if (!extractedTokens.CODEX_OAUTH_ACCESS_TOKEN) {
|
|
53732
|
+
if (!extractedTokens.CODEX_OAUTH_ACCESS_TOKEN || !extractedTokens.CODEX_AUTH_JSON_B64) {
|
|
53711
53733
|
const codexAuthPaths = [
|
|
53712
53734
|
`${(0, import_node_os2.homedir)()}/.codex/auth.json`,
|
|
53713
53735
|
`${(0, import_node_os2.homedir)()}/.code/auth.json`
|
|
@@ -53717,13 +53739,20 @@ Permissions (${data.permissions.length}):`);
|
|
|
53717
53739
|
try {
|
|
53718
53740
|
const content = (0, import_node_fs4.readFileSync)(authPath, "utf8");
|
|
53719
53741
|
const auth = JSON.parse(content);
|
|
53742
|
+
if (!extractedTokens.CODEX_AUTH_JSON_B64) {
|
|
53743
|
+
extractedTokens.CODEX_AUTH_JSON_B64 = Buffer.from(content, "utf8").toString("base64");
|
|
53744
|
+
}
|
|
53720
53745
|
const tokens = auth.tokens;
|
|
53721
53746
|
if (tokens?.access_token) {
|
|
53722
|
-
extractedTokens.CODEX_OAUTH_ACCESS_TOKEN
|
|
53747
|
+
if (!extractedTokens.CODEX_OAUTH_ACCESS_TOKEN) {
|
|
53748
|
+
extractedTokens.CODEX_OAUTH_ACCESS_TOKEN = tokens.access_token;
|
|
53749
|
+
}
|
|
53723
53750
|
break;
|
|
53724
53751
|
}
|
|
53725
53752
|
if (auth.oauth_token || auth.access_token) {
|
|
53726
|
-
extractedTokens.CODEX_OAUTH_ACCESS_TOKEN
|
|
53753
|
+
if (!extractedTokens.CODEX_OAUTH_ACCESS_TOKEN) {
|
|
53754
|
+
extractedTokens.CODEX_OAUTH_ACCESS_TOKEN = auth.oauth_token || auth.access_token;
|
|
53755
|
+
}
|
|
53727
53756
|
break;
|
|
53728
53757
|
}
|
|
53729
53758
|
if (auth.OPENAI_API_KEY && typeof auth.OPENAI_API_KEY === "string") {
|
|
@@ -53765,7 +53794,7 @@ ${tokenList.map((t) => ` - ${t.name}`).join("\n")}`
|
|
|
53765
53794
|
await requestJson(context2, endpoint, {
|
|
53766
53795
|
method: "POST",
|
|
53767
53796
|
body: {
|
|
53768
|
-
name,
|
|
53797
|
+
key: name,
|
|
53769
53798
|
value
|
|
53770
53799
|
}
|
|
53771
53800
|
});
|
|
@@ -57530,7 +57559,7 @@ async function handleInstall(flags) {
|
|
|
57530
57559
|
try {
|
|
57531
57560
|
const agents = ["claude-code", "codex", "gemini-cli"];
|
|
57532
57561
|
for (const agent of agents) {
|
|
57533
|
-
(0, import_node_child_process5.execSync)(`skills add ${JSON.stringify(skill.source)} -a ${agent} -y
|
|
57562
|
+
(0, import_node_child_process5.execSync)(`skills add ${JSON.stringify(skill.source)} -a ${agent} -s '*' -y`, {
|
|
57534
57563
|
cwd: projectRoot,
|
|
57535
57564
|
stdio: "inherit",
|
|
57536
57565
|
timeout: 12e4
|
|
@@ -64125,7 +64154,8 @@ async function resolvePacksAndMerge(repoRoot, manifest, projectSlug) {
|
|
|
64125
64154
|
}
|
|
64126
64155
|
const seenAgentIds = /* @__PURE__ */ new Map();
|
|
64127
64156
|
for (const pack of resolvedPacks) {
|
|
64128
|
-
|
|
64157
|
+
const packAgents = extractInnerMap(pack.agents, "agents");
|
|
64158
|
+
for (const agentId of Object.keys(packAgents)) {
|
|
64129
64159
|
if (seenAgentIds.has(agentId)) {
|
|
64130
64160
|
throw new Error(
|
|
64131
64161
|
`Agent ID collision: "${agentId}" defined in both pack "${seenAgentIds.get(agentId)}" and "${pack.id}". Agent IDs must be unique across all packs.`
|
|
@@ -64340,8 +64370,20 @@ async function handleAgents(subcommand, positionals, flags, context2) {
|
|
|
64340
64370
|
throw new Error(`Missing manifest at ${manifestPath}. Expected .eve/manifest.yaml.`);
|
|
64341
64371
|
}
|
|
64342
64372
|
const manifest = readYamlFile(manifestPath);
|
|
64343
|
-
|
|
64344
|
-
|
|
64373
|
+
let projectSlugForPrefix = manifest.project ?? projectId.replace(/^proj_/, "");
|
|
64374
|
+
try {
|
|
64375
|
+
const project = await requestJson(
|
|
64376
|
+
context2,
|
|
64377
|
+
`/projects/${projectId}`,
|
|
64378
|
+
{ method: "GET" }
|
|
64379
|
+
);
|
|
64380
|
+
const slug = project?.slug;
|
|
64381
|
+
if (typeof slug === "string" && slug.length > 0) {
|
|
64382
|
+
projectSlugForPrefix = slug;
|
|
64383
|
+
}
|
|
64384
|
+
} catch {
|
|
64385
|
+
}
|
|
64386
|
+
const packResult = await resolvePacksAndMerge(repoRoot, manifest, projectSlugForPrefix);
|
|
64345
64387
|
let agentsYaml;
|
|
64346
64388
|
let teamsYaml;
|
|
64347
64389
|
let chatYaml;
|