mirror of
https://github.com/harivansh-afk/clanker-agent.git
synced 2026-04-17 07:03:28 +00:00
chore: rebrand companion-os to clanker-agent
- Rename all package names from companion-* to clanker-* - Update npm scopes from @mariozechner to @harivansh-afk - Rename config directories .companion -> .clanker - Rename environment variables COMPANION_* -> CLANKER_* - Update all documentation, README files, and install scripts - Rename package directories (companion-channels, companion-grind, companion-teams) - Update GitHub URLs to harivansh-afk/clanker-agent - Preserve full git history from companion-cloud monorepo
This commit is contained in:
parent
f93fe7d1a0
commit
67168d8289
356 changed files with 2249 additions and 10223 deletions
|
|
@ -78,7 +78,7 @@ async function main(): Promise<void> {
|
|||
const providerList = PROVIDERS.map(
|
||||
(p) => ` ${p.id.padEnd(20)} ${p.name}`,
|
||||
).join("\n");
|
||||
console.log(`Usage: npx @mariozechner/companion-ai <command> [provider]
|
||||
console.log(`Usage: npx @mariozechner/clanker-ai <command> [provider]
|
||||
|
||||
Commands:
|
||||
login [provider] Login to an OAuth provider
|
||||
|
|
@ -88,9 +88,9 @@ Providers:
|
|||
${providerList}
|
||||
|
||||
Examples:
|
||||
npx @mariozechner/companion-ai login # interactive provider selection
|
||||
npx @mariozechner/companion-ai login anthropic # login to specific provider
|
||||
npx @mariozechner/companion-ai list # list providers
|
||||
npx @mariozechner/clanker-ai login # interactive provider selection
|
||||
npx @mariozechner/clanker-ai login anthropic # login to specific provider
|
||||
npx @mariozechner/clanker-ai list # list providers
|
||||
`);
|
||||
return;
|
||||
}
|
||||
|
|
@ -131,7 +131,7 @@ Examples:
|
|||
if (!PROVIDERS.some((p) => p.id === provider)) {
|
||||
console.error(`Unknown provider: ${provider}`);
|
||||
console.error(
|
||||
`Use 'npx @mariozechner/companion-ai list' to see available providers`,
|
||||
`Use 'npx @mariozechner/clanker-ai list' to see available providers`,
|
||||
);
|
||||
process.exit(1);
|
||||
}
|
||||
|
|
@ -142,7 +142,7 @@ Examples:
|
|||
}
|
||||
|
||||
console.error(`Unknown command: ${command}`);
|
||||
console.error(`Use 'npx @mariozechner/companion-ai --help' for usage`);
|
||||
console.error(`Use 'npx @mariozechner/clanker-ai --help' for usage`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -514,7 +514,7 @@ function mapThinkingLevelToEffort(
|
|||
|
||||
/**
|
||||
* Resolve cache retention preference.
|
||||
* Defaults to "short" and uses COMPANION_CACHE_RETENTION for backward compatibility.
|
||||
* Defaults to "short" and uses CLANKER_CACHE_RETENTION for backward compatibility.
|
||||
*/
|
||||
function resolveCacheRetention(
|
||||
cacheRetention?: CacheRetention,
|
||||
|
|
@ -524,7 +524,7 @@ function resolveCacheRetention(
|
|||
}
|
||||
if (
|
||||
typeof process !== "undefined" &&
|
||||
process.env.COMPANION_CACHE_RETENTION === "long"
|
||||
process.env.CLANKER_CACHE_RETENTION === "long"
|
||||
) {
|
||||
return "long";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ import { transformMessages } from "./transform-messages.js";
|
|||
|
||||
/**
|
||||
* Resolve cache retention preference.
|
||||
* Defaults to "short" and uses COMPANION_CACHE_RETENTION for backward compatibility.
|
||||
* Defaults to "short" and uses CLANKER_CACHE_RETENTION for backward compatibility.
|
||||
*/
|
||||
function resolveCacheRetention(
|
||||
cacheRetention?: CacheRetention,
|
||||
|
|
@ -50,7 +50,7 @@ function resolveCacheRetention(
|
|||
}
|
||||
if (
|
||||
typeof process !== "undefined" &&
|
||||
process.env.COMPANION_CACHE_RETENTION === "long"
|
||||
process.env.CLANKER_CACHE_RETENTION === "long"
|
||||
) {
|
||||
return "long";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ const DEFAULT_ANTIGRAVITY_VERSION = "1.18.3";
|
|||
|
||||
function getAntigravityHeaders() {
|
||||
const version =
|
||||
process.env.COMPANION_AI_ANTIGRAVITY_VERSION || DEFAULT_ANTIGRAVITY_VERSION;
|
||||
process.env.CLANKER_AI_ANTIGRAVITY_VERSION || DEFAULT_ANTIGRAVITY_VERSION;
|
||||
return {
|
||||
"User-Agent": `antigravity/${version} darwin/arm64`,
|
||||
};
|
||||
|
|
@ -1040,8 +1040,8 @@ export function buildRequest(
|
|||
model: model.id,
|
||||
request,
|
||||
...(isAntigravity ? { requestType: "agent" } : {}),
|
||||
userAgent: isAntigravity ? "antigravity" : "companion-coding-agent",
|
||||
requestId: `${isAntigravity ? "agent" : "companion"}-${Date.now()}-${Math.random().toString(36).slice(2, 11)}`,
|
||||
userAgent: isAntigravity ? "antigravity" : "clanker-coding-agent",
|
||||
requestId: `${isAntigravity ? "agent" : "clanker"}-${Date.now()}-${Math.random().toString(36).slice(2, 11)}`,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -997,10 +997,10 @@ function buildHeaders(
|
|||
headers.set("Authorization", `Bearer ${token}`);
|
||||
headers.set("chatgpt-account-id", accountId);
|
||||
headers.set("OpenAI-Beta", "responses=experimental");
|
||||
headers.set("originator", "companion");
|
||||
headers.set("originator", "clanker");
|
||||
const userAgent = _os
|
||||
? `companion (${_os.platform()} ${_os.release()}; ${_os.arch()})`
|
||||
: "companion (browser)";
|
||||
? `clanker (${_os.platform()} ${_os.release()}; ${_os.arch()})`
|
||||
: "clanker (browser)";
|
||||
headers.set("User-Agent", userAgent);
|
||||
headers.set("accept", "text/event-stream");
|
||||
headers.set("content-type", "application/json");
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ const OPENAI_TOOL_CALL_PROVIDERS = new Set([
|
|||
|
||||
/**
|
||||
* Resolve cache retention preference.
|
||||
* Defaults to "short" and uses COMPANION_CACHE_RETENTION for backward compatibility.
|
||||
* Defaults to "short" and uses CLANKER_CACHE_RETENTION for backward compatibility.
|
||||
*/
|
||||
function resolveCacheRetention(
|
||||
cacheRetention?: CacheRetention,
|
||||
|
|
@ -43,7 +43,7 @@ function resolveCacheRetention(
|
|||
}
|
||||
if (
|
||||
typeof process !== "undefined" &&
|
||||
process.env.COMPANION_CACHE_RETENTION === "long"
|
||||
process.env.CLANKER_CACHE_RETENTION === "long"
|
||||
) {
|
||||
return "long";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -283,7 +283,7 @@ export interface OpenAICompletionsCompat {
|
|||
supportsDeveloperRole?: boolean;
|
||||
/** Whether the provider supports `reasoning_effort`. Default: auto-detected from URL. */
|
||||
supportsReasoningEffort?: boolean;
|
||||
/** Optional mapping from companion-ai reasoning levels to provider/model-specific `reasoning_effort` values. */
|
||||
/** Optional mapping from clanker-ai reasoning levels to provider/model-specific `reasoning_effort` values. */
|
||||
reasoningEffortMap?: Partial<Record<ThinkingLevel, string>>;
|
||||
/** Whether the provider supports `stream_options: { include_usage: true }` for token usage in streaming responses. Default: true. */
|
||||
supportsUsageInStreaming?: boolean;
|
||||
|
|
|
|||
|
|
@ -216,7 +216,7 @@ async function refreshAccessToken(refreshToken: string): Promise<TokenResult> {
|
|||
}
|
||||
|
||||
async function createAuthorizationFlow(
|
||||
originator: string = "companion",
|
||||
originator: string = "clanker",
|
||||
): Promise<{ verifier: string; state: string; url: string }> {
|
||||
const { verifier, challenge } = await generatePKCE();
|
||||
const state = createState();
|
||||
|
|
@ -337,7 +337,7 @@ function getAccountId(accessToken: string): string | null {
|
|||
* @param options.onManualCodeInput - Optional promise that resolves with user-pasted code.
|
||||
* Races with browser callback - whichever completes first wins.
|
||||
* Useful for showing paste input immediately alongside browser flow.
|
||||
* @param options.originator - OAuth originator parameter (defaults to "companion")
|
||||
* @param options.originator - OAuth originator parameter (defaults to "clanker")
|
||||
*/
|
||||
export async function loginOpenAICodex(options: {
|
||||
onAuth: (info: { url: string; instructions?: string }) => void;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue