MCPcopy Create free account
hub / github.com/ChinaSiro/claude-code-sourcemap / Qp8

Function Qp8

package/cli.js:7816–7816  ·  view source on GitHub ↗
(q,K)

Source from the content-addressed store, hash-verified

7814
7815Only use \`/tmp\` if the user explicitly requests it.
7816
7817The scratchpad directory is session-specific, isolated from the user's project, and can be used freely without permission prompts.`}function hSY(q){return null}function CSY(){if(!FgK)return null;if(!jSY?.isBriefEnabled())return null;return FgK}var wSY=null,FgK,jSY,UgK=null,ZH6="__SYSTEM_PROMPT_DYNAMIC_BOUNDARY__",HSY="Claude Opus 4.6",T_7,K5K="You are an agent for Claude Code, Anthropic's official CLI for Claude. Given the user's message, you should use the tools available to complete the task. Complete the task fully—don't gold-plate, but don't leave it half-done. When you complete the task, respond with a concise report covering what was done and any key findings — the caller will relay this to the user, so it only needs the essentials.",SSY="When working with tool results, write down any important information you might need later in your response, as the original tool result may be cleared later.";var rL=y(()=>{y_();E5();I7();v8();d0();yk6();U1();Z$();E2();IY();aq();yA();TU();qM();ju();vU();di6();Pk8();Tz();m8();k16();o1();HG();g88();kR6();pr6();RY();_8();n76();jH6();tp8();FgK=(YI(),Eq(Pl)).BRIEF_PROACTIVE_SECTION,jSY=(dQ(),Eq(IK6)),T_7={opus:"claude-opus-4-6",sonnet:"claude-sonnet-4-6",haiku:"claude-haiku-4-5-20251001"}});import{createHash as bSY}from"crypto";function ISY(q,K){let _=xSY[q];if(!_||_.length===0)return K;let z={...K},Y=z.properties;if(Y&&typeof Y==="object"){let $={...Y};for(let A of _)delete $[A];z.properties=$}return z}async function Qp8(q,K){let _="inputJSONSchema"in q&&q.inputJSONSchema?`${q.name}:${g6(q.inputJSONSchema)}`:q.name,z=pCq(),Y=z.get(_);if(!Y){let A=tY("tengu_tool_pear"),O="inputJSONSchema"in q&&q.inputJSONSchema?q.inputJSONSchema:ua(q.inputSchema);if(!nq())O=ISY(q.name,O);if(Y={name:q.name,description:await q.prompt({getToolPermissionContext:K.getToolPermissionContext,tools:K.tools,agents:K.agents,allowedAgentTypes:K.allowedAgentTypes}),input_schema:O},A&&q.strict===!0&&K.model&&j$6(K.model))Y.strict=!0;if(E7()==="firstParty"&&WP()&&(g8("tengu_fgts",!1)||i6(process.env.CLAUDE_CODE_ENABLE_FINE_GRAINED_TOOL_STREAMING)))Y.eager_input_streaming=!0;z.set(_,Y)}let $={name:Y.name,description:Y.description,input_schema:Y.input_schema,...Y.strict&&{strict:!0},...Y.eager_input_streaming&&{eager_input_streaming:!0}};if(K.deferLoading)$.defer_loading=!0;if(K.cacheControl)$.cache_control=K.cacheControl;if(i6(process.env.CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS)){let A=new Set(["name","description","input_schema","cache_control"]),O=Object.keys($).filter((w)=>!A.has(w));if(O.length>0)return uSY(O),{name:$.name,description:$.description,input_schema:$.input_schema,...$.cache_control&&{cache_control:$.cache_control}}}return $}function uSY(q){if(ngK)return;ngK=!0,N(`[betas] Stripped from tool schemas: [${q.join(", ")}] (CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1)`)}function igK(q){let[K]=v_7(q),_=K?.text;d("tengu_sysprompt_block",{snippet:_?.slice(0,20),length:_?.length??0,hash:_?bSY("sha256").update(_).digest("hex"):""})}function v_7(q,K){let _=fG6();if(_&&K?.skipGlobalCacheForSystemPrompt){d("tengu_sysprompt_using_tool_based_cache",{promptBlockCount:q.length});let w,j,H=[];for(let X of q){if(!X)continue;if(X===ZH6)continue;if(X.startsWith("x-anthropic-billing-header"))w=X;else if(If8.has(X))j=X;else H.push(X)}let J=[];if(w)J.push({text:w,cacheScope:null});if(j)J.push({text:j,cacheScope:"org"});let M=H.join(`
7818
7819`);if(M)J.push({text:M,cacheScope:"org"});return J}if(_){let w=q.findIndex((j)=>j===ZH6);if(w!==-1){let j,H,J=[],M=[];for(let D=0;D<q.length;D++){let f=q[D];if(!f||f===ZH6)continue;if(f.startsWith("x-anthropic-billing-header"))j=f;else if(If8.has(f))H=f;else if(D<w)J.push(f);else M.push(f)}let X=[];if(j)X.push({text:j,cacheScope:null});if(H)X.push({text:H,cacheScope:null});let P=J.join(`

Callers 2

rK6Function · 0.85
YFKFunction · 0.85

Calls 15

g6Function · 0.85
pCqFunction · 0.85
tYFunction · 0.85
uaFunction · 0.85
nqFunction · 0.85
ISYFunction · 0.85
j$6Function · 0.85
E7Function · 0.85
WPFunction · 0.85
g8Function · 0.85
i6Function · 0.85
uSYFunction · 0.85

Tested by

no test coverage detected