* refactor: unify action into single composite step with run.ts entrypoint Consolidate the prepare and base-action phases into a single composite step that runs src/entrypoints/run.ts. This simplifies the action.yml from multiple steps to one execution step, while keeping the same behavior. Key changes: - Add src/entrypoints/run.ts as unified entrypoint - Simplify action.yml to single 'Run Claude Code Action' step - Pass all inputs via environment variables - Update base-action to accept inputs via env vars - Support agent mode auto-detection from prompt input * refactor: keep SSH signing cleanup and token revocation as separate action steps Move SSH signing key cleanup and app token revocation back to separate composite action steps in action.yml with always() conditions, rather than handling them inside run.ts. This keeps these cleanup concerns as independently visible steps in the workflow. * fix: address PR review feedback - Use path.dirname() instead of manual string slicing for executable path - Differentiate prepare vs execution errors in catch block so tracking comment accurately reflects which phase failed - Update CLAUDE.md architecture docs to reflect unified run.ts entrypoint and four-phase design * fix: address PR review feedback - Use path.dirname() instead of manual string slicing for executable path - Differentiate prepare vs execution errors in catch block so tracking comment accurately reflects which phase failed - Rewrite CLAUDE.md to focus on mental model, key concepts, and gotchas instead of exhaustive file listings
26 lines
702 B
TypeScript
26 lines
702 B
TypeScript
import { runClaudeWithSdk } from "./run-claude-sdk";
|
|
import type { ClaudeRunResult } from "./run-claude-sdk";
|
|
import { parseSdkOptions } from "./parse-sdk-options";
|
|
|
|
export type ClaudeOptions = {
|
|
claudeArgs?: string;
|
|
model?: string;
|
|
pathToClaudeCodeExecutable?: string;
|
|
allowedTools?: string;
|
|
disallowedTools?: string;
|
|
maxTurns?: string;
|
|
mcpConfig?: string;
|
|
systemPrompt?: string;
|
|
appendSystemPrompt?: string;
|
|
fallbackModel?: string;
|
|
showFullOutput?: string;
|
|
};
|
|
|
|
export async function runClaude(
|
|
promptPath: string,
|
|
options: ClaudeOptions,
|
|
): Promise<ClaudeRunResult> {
|
|
const parsedOptions = parseSdkOptions(options);
|
|
return runClaudeWithSdk(promptPath, parsedOptions);
|
|
}
|