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>
31 lines
758 B
TypeScript
31 lines
758 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { isClaudeMaxTurnsResult } from "@paperclipai/adapter-claude-local/server";
|
|
|
|
describe("claude_local max-turn detection", () => {
|
|
it("detects max-turn exhaustion by subtype", () => {
|
|
expect(
|
|
isClaudeMaxTurnsResult({
|
|
subtype: "error_max_turns",
|
|
result: "Reached max turns",
|
|
}),
|
|
).toBe(true);
|
|
});
|
|
|
|
it("detects max-turn exhaustion by stop_reason", () => {
|
|
expect(
|
|
isClaudeMaxTurnsResult({
|
|
stop_reason: "max_turns",
|
|
}),
|
|
).toBe(true);
|
|
});
|
|
|
|
it("returns false for non-max-turn results", () => {
|
|
expect(
|
|
isClaudeMaxTurnsResult({
|
|
subtype: "success",
|
|
stop_reason: "end_turn",
|
|
}),
|
|
).toBe(false);
|
|
});
|
|
});
|