pi-ext bugabingas pi extensions
owned by admin
README Source History Refs Compare Notes Search test(klaus): pin the outbound system-prompt blocks 830ccbae9d37e631d96e80634fef847ea01746df
Oliver Krylow <o.krylow@isp-insoft.de > · 17 Sep 2026
SSH signature · not checked
Browse files Compare with HEAD
Claude Code's preset carries commit, pull-request, and git-status content, and Klaus replaces it with Pi's prompt, so the specification requires an SDK upgrade to fail E2E when those blocks change.
Changed files (1) extensions/klaus/__e2e__/provider-scenarios.test.ts Modified 1647 1647 expect (
childSessionId (requests[
0 ])).not.
toBe (
childSessionId (requests[
1 ]));
1650 + it (
"sends only Pi's system prompt and no Claude Code preset" ,
async ()
=> {
1651 + const server
= await useServer ((_request, index, response)
=> 1652 + sse (response,
textFrames (index,
"system prompt checked" )),
1655 + const result
= await directQuery (
1656 + request ({ systemPrompt:
"Klaus pinned system prompt." }),
1659 + expect (result.error).
toBeUndefined ();
1661 + server.
messageRequests ()[
0 ]?.
body as {
1662 + system
?: Array <{ type
: string ; text
: string }>;
1665 + if (
! system)
throw new Error (
"Request carried no system blocks." );
1668 + expect (system).
toHaveLength (
3 );
1669 + expect (system[
0 ]?.
text ).
toMatch (
/ ^ x-anthropic-billing-header: / );
1670 + expect (system[
1 ]?.
text ).
toBe (
1671 + "You are a Claude agent, built on Anthropic's Claude Agent SDK." ,
1673 + expect (system[
2 ]?.
text ).
toBe (
"Klaus pinned system prompt." );
1676 + expect (
JSON .
stringify (system)).not.
toMatch (
1677 + /git status | pull request | commit message | gh pr/ i ,
1650 1681 it (
"names the tool behind an invalid input schema rejection" ,
async ()
=> {
1651 1682 const server
= await useServer ((_request, _index, response)
=> {
1652 1683 response.
writeHead (
400 , {
"content-type" :
"application/json" });