mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-01-23 06:54:13 +08:00
- Add new progress MCP server for reporting task status via API
- Support repository_dispatch events with task description and progress endpoint
- Introduce isDispatch flag to unify dispatch event handling
- Make GitHub data optional for dispatch events without issues/PRs
- Update prompt generation with dispatch-specific instructions
Enables triggering Claude via repository_dispatch with:
{
"event_type": "claude_task",
"client_payload": {
"description": "Task description",
"progress_endpoint": "https://api.example.com/progress"
}
}
29 lines
944 B
TypeScript
29 lines
944 B
TypeScript
import { describe, test, expect } from "bun:test";
|
|
import type { StreamConfig } from "../src/types/stream-config";
|
|
|
|
describe("report-claude-complete", () => {
|
|
test("StreamConfig type should include system_progress_endpoint", () => {
|
|
const config: StreamConfig = {
|
|
progress_endpoint: "https://example.com/progress",
|
|
system_progress_endpoint: "https://example.com/system-progress",
|
|
resume_endpoint: "https://example.com/resume",
|
|
session_id: "test-session",
|
|
headers: {
|
|
Authorization: "Bearer test-token",
|
|
},
|
|
};
|
|
|
|
expect(config.system_progress_endpoint).toBe(
|
|
"https://example.com/system-progress",
|
|
);
|
|
});
|
|
|
|
test("StreamConfig type should allow optional fields", () => {
|
|
const config: StreamConfig = {};
|
|
|
|
expect(config.system_progress_endpoint).toBeUndefined();
|
|
expect(config.progress_endpoint).toBeUndefined();
|
|
expect(config.headers).toBeUndefined();
|
|
});
|
|
});
|