Rename all workspace packages from @paperclip/* to @paperclipai/* and the CLI binary from `paperclip` to `paperclipai` in preparation for npm publishing. Bump CLI version to 0.1.0 and add package metadata (description, keywords, license, repository, files). Update all imports, documentation, user-facing messages, and tests accordingly. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
30 lines
1.1 KiB
TypeScript
30 lines
1.1 KiB
TypeScript
import type { CLIAdapterModule } from "@paperclipai/adapter-utils";
|
|
import { printClaudeStreamEvent } from "@paperclipai/adapter-claude-local/cli";
|
|
import { printCodexStreamEvent } from "@paperclipai/adapter-codex-local/cli";
|
|
import { printOpenClawStreamEvent } from "@paperclipai/adapter-openclaw/cli";
|
|
import { processCLIAdapter } from "./process/index.js";
|
|
import { httpCLIAdapter } from "./http/index.js";
|
|
|
|
const claudeLocalCLIAdapter: CLIAdapterModule = {
|
|
type: "claude_local",
|
|
formatStdoutEvent: printClaudeStreamEvent,
|
|
};
|
|
|
|
const codexLocalCLIAdapter: CLIAdapterModule = {
|
|
type: "codex_local",
|
|
formatStdoutEvent: printCodexStreamEvent,
|
|
};
|
|
|
|
const openclawCLIAdapter: CLIAdapterModule = {
|
|
type: "openclaw",
|
|
formatStdoutEvent: printOpenClawStreamEvent,
|
|
};
|
|
|
|
const adaptersByType = new Map<string, CLIAdapterModule>(
|
|
[claudeLocalCLIAdapter, codexLocalCLIAdapter, openclawCLIAdapter, processCLIAdapter, httpCLIAdapter].map((a) => [a.type, a]),
|
|
);
|
|
|
|
export function getCLIAdapter(type: string): CLIAdapterModule {
|
|
return adaptersByType.get(type) ?? processCLIAdapter;
|
|
}
|