mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-08-14 19:13:35 +00:00
refactor: Remove dead code and stale references (#2189)
- Drop unnecessary `export` from `createAgents` and `resolveAgent` in agent-setup.ts — both are internal helpers only ever called within the same module via `createCloudAgents`; no external caller imports them - Fix misleading relative-path sourcing example in github-auth.sh header comment — the shell-script rules ban relative `source ./` paths, and the example is updated to show the correct CDN eval pattern - Bump CLI patch version 0.12.17 → 0.12.18 Co-authored-by: spawn-qa-bot <qa@openrouter.ai> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: L <6723574+louisgv@users.noreply.github.com>
This commit is contained in:
parent
50b096b02d
commit
48da6d8735
3 changed files with 10 additions and 10 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@openrouter/spawn",
|
||||
"version": "0.12.17",
|
||||
"version": "0.12.18",
|
||||
"type": "module",
|
||||
"bin": {
|
||||
"spawn": "cli.js"
|
||||
|
|
|
|||
|
|
@ -413,7 +413,7 @@ const NPM_PREFIX_SETUP =
|
|||
const ZEROCLAW_INSTALL_URL =
|
||||
"https://raw.githubusercontent.com/zeroclaw-labs/zeroclaw/a117be64fdaa31779204beadf2942c8aef57d0e5/scripts/bootstrap.sh";
|
||||
|
||||
export function createAgents(runner: CloudRunner): Record<string, AgentConfig> {
|
||||
function createAgents(runner: CloudRunner): Record<string, AgentConfig> {
|
||||
return {
|
||||
claude: {
|
||||
name: "Claude Code",
|
||||
|
|
@ -555,7 +555,7 @@ export function createAgents(runner: CloudRunner): Record<string, AgentConfig> {
|
|||
};
|
||||
}
|
||||
|
||||
export function resolveAgent(agents: Record<string, AgentConfig>, name: string): AgentConfig {
|
||||
function resolveAgent(agents: Record<string, AgentConfig>, name: string): AgentConfig {
|
||||
const agent = agents[name.toLowerCase()];
|
||||
if (!agent) {
|
||||
logError(`Unknown agent: ${name}`);
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
#!/bin/bash
|
||||
# Standalone GitHub auth helper — installs gh CLI and runs OAuth login
|
||||
# Sourceable by any agent script, or executable directly via curl|bash
|
||||
# Executable directly via curl|bash; also sourceable using the CDN URL with eval.
|
||||
#
|
||||
# Usage (sourced):
|
||||
# source sh/shared/github-auth.sh
|
||||
# ensure_github_auth
|
||||
#
|
||||
# Usage (direct):
|
||||
# bash sh/shared/github-auth.sh
|
||||
# Usage (via curl|bash — recommended):
|
||||
# curl -fsSL https://openrouter.ai/labs/spawn/shared/github-auth.sh | bash
|
||||
# curl -fsSL https://raw.githubusercontent.com/OpenRouterTeam/spawn/main/sh/shared/github-auth.sh | bash
|
||||
#
|
||||
# Usage (sourced using absolute path or CDN URL):
|
||||
# eval "$(curl -fsSL https://openrouter.ai/labs/spawn/shared/github-auth.sh)"
|
||||
# ensure_github_auth
|
||||
|
||||
# ============================================================
|
||||
# Logging helpers
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue