mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-01-22 14:24:13 +08:00
Consolidates the two-step architecture (prepare → run) into a single step to eliminate file-based and output-based communication. Changes: - Add base-action/src/lib.ts with exports for main action import - Modify run-claude-sdk.ts to accept prompt string directly and return result - Add generatePromptContent() that returns prompt without file I/O - Update mode prepare() to return promptContent in result - Create src/entrypoints/run.ts as unified entry point - Update action.yml to use single Run Claude Code step - Update output references from steps.prepare to steps.claude-code Benefits: - No file I/O for prompt - data stays in memory - No step output parsing - direct function returns - Simpler debugging - single entry point - Faster execution - no subprocess overhead - Type safety - TypeScript across the boundary 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
14 lines
611 B
TypeScript
14 lines
611 B
TypeScript
/**
|
|
* Library exports for the base-action.
|
|
* These functions can be imported directly by the main action
|
|
* to avoid file/output-based communication between steps.
|
|
*/
|
|
|
|
export { runClaudeWithSdk, runClaudeWithSdkFromFile } from "./run-claude-sdk";
|
|
export type { RunClaudeResult, PromptInput } from "./run-claude-sdk";
|
|
export { setupClaudeCodeSettings } from "./setup-claude-code-settings";
|
|
export { installPlugins } from "./install-plugins";
|
|
export { parseSdkOptions } from "./parse-sdk-options";
|
|
export type { ClaudeOptions } from "./run-claude";
|
|
export type { ParsedSdkOptions } from "./parse-sdk-options";
|