@draht/coding-agent 2026.11.19-1 → 2026.11.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle/chunks/{anthropic-messages-7PTOA4ZA.js → anthropic-messages-W6HN7XZW.js} +1 -1
- package/dist/bundle/chunks/{azure-openai-responses-CDW6FCMN.js → azure-openai-responses-IYU6JN7E.js} +1 -1
- package/dist/bundle/chunks/bedrock-converse-stream.js +21 -21
- package/dist/bundle/chunks/{chunk-7HQNDYWE.js → chunk-3YSKFWGJ.js} +1 -1
- package/dist/bundle/chunks/{chunk-GAABJAG4.js → chunk-5K3TBDND.js} +3 -3
- package/dist/bundle/chunks/chunk-6MSE6LZ3.js +6 -0
- package/dist/bundle/chunks/{chunk-O2P5SYXT.js → chunk-6QA6EP5G.js} +1 -1
- package/dist/bundle/chunks/chunk-736QBNUZ.js +12 -0
- package/dist/bundle/chunks/{chunk-CAOOVEOM.js → chunk-AQ4POXF4.js} +1 -1
- package/dist/bundle/chunks/chunk-BIBUE2PO.js +2 -0
- package/dist/bundle/chunks/chunk-CLONDAPI.js +9 -0
- package/dist/bundle/chunks/{chunk-4FPBO5KP.js → chunk-G7DJ6PIU.js} +1 -1
- package/dist/bundle/chunks/{chunk-WOIC265R.js → chunk-GRGZRSVX.js} +28 -28
- package/dist/bundle/chunks/{chunk-JI5YDTBB.js → chunk-GYCFH7QD.js} +1 -1
- package/dist/bundle/chunks/{chunk-3F4OOENR.js → chunk-IRBBJMGW.js} +1 -1
- package/dist/bundle/chunks/{chunk-GQXRTK54.js → chunk-ITP6IDBA.js} +2 -2
- package/dist/bundle/chunks/{chunk-HKQ3PU5T.js → chunk-J5PACQAM.js} +1 -1
- package/dist/bundle/chunks/{chunk-BQMYLQSG.js → chunk-K4FC3EMH.js} +8 -8
- package/dist/bundle/chunks/{chunk-6WESOD4H.js → chunk-KVH4HR57.js} +1 -1
- package/dist/bundle/chunks/{chunk-KFREX3FS.js → chunk-QVGSXIKT.js} +1 -1
- package/dist/bundle/chunks/{chunk-B6OJ7QX4.js → chunk-RHXTTWD5.js} +1 -1
- package/dist/bundle/chunks/{chunk-INKDO5TZ.js → chunk-SM2YWAF2.js} +3 -3
- package/dist/bundle/chunks/{chunk-YOPX5URH.js → chunk-SYW5VSBL.js} +1 -1
- package/dist/bundle/chunks/chunk-TIA2T6EO.js +3 -0
- package/dist/bundle/chunks/{chunk-MHNW355A.js → chunk-WZMHLLKP.js} +1 -1
- package/dist/bundle/chunks/{chunk-RI7HJ6AF.js → chunk-XY64T2H6.js} +10 -10
- package/dist/bundle/chunks/{cli-QUYXUKRF.js → cli-KSFELY3W.js} +1 -1
- package/dist/bundle/chunks/{cloudflare-workers-ai-system-one-W63EWPDW.js → cloudflare-workers-ai-system-one-WIIL62VL.js} +1 -1
- package/dist/bundle/chunks/{execute-KGJOWTPG.js → execute-YOMYOVUT.js} +1 -1
- package/dist/bundle/chunks/{google-generative-ai-M5WKK5CW.js → google-generative-ai-NZVCFKM4.js} +1 -1
- package/dist/bundle/chunks/{google-vertex-UYNOGPMI.js → google-vertex-BL3BF2VF.js} +1 -1
- package/dist/bundle/chunks/https-proxy-agent-O2PVUIOI.js +13 -0
- package/dist/bundle/chunks/lib-XOG5PI3Y.js +9 -0
- package/dist/bundle/chunks/{llama-cpp-classify-SAUGLDPT.js → llama-cpp-classify-GP2X3HGE.js} +1 -1
- package/dist/bundle/chunks/{mistral-conversations-VQ3J6W5K.js → mistral-conversations-2REUBSZJ.js} +1 -1
- package/dist/bundle/chunks/{multipart-parser-HMCXZ4BD.js → multipart-parser-AZP5BX2W.js} +1 -1
- package/dist/bundle/chunks/{node-DXZFQBEO.js → node-BZAVEWJ3.js} +1 -1
- package/dist/bundle/chunks/{node-LBZLUIBE.js → node-C2JGH2OB.js} +1 -1
- package/dist/bundle/chunks/{openai-codex-responses-JTGQLYC7.js → openai-codex-responses-7MQGGA7O.js} +1 -1
- package/dist/bundle/chunks/{openai-completions-WAW7BG4E.js → openai-completions-MTNKQNK4.js} +1 -1
- package/dist/bundle/chunks/{openai-decisions-KHHHHMGW.js → openai-decisions-UYPZJCVG.js} +1 -1
- package/dist/bundle/chunks/{openai-responses-GWADST54.js → openai-responses-QVXIRAUW.js} +1 -1
- package/dist/bundle/chunks/{openrouter-images-AP626CWG.js → openrouter-images-E6VXUX3T.js} +1 -1
- package/dist/bundle/chunks/{pi-messages-H5TYIEJT.js → pi-messages-KPT6QQD4.js} +1 -1
- package/dist/bundle/chunks/{runtime-73OLLYOI.js → runtime-3ZSEARRN.js} +1 -1
- package/dist/bundle/chunks/{runtime-FZKS2BWI.js → runtime-S5WBSLTE.js} +1 -1
- package/dist/bundle/chunks/{settings-manager-CWRQW6PZ.js → settings-manager-H3QEOPQ3.js} +1 -1
- package/dist/bundle/chunks/src-TIBHS42X.js +4 -0
- package/dist/bundle/chunks/{typesafe-system-one-RLPGOT75.js → typesafe-system-one-5RPPTQ5S.js} +1 -1
- package/dist/bundle/chunks/{virtual-modules-5V4G5GQH.js → virtual-modules-HCLXUIRY.js} +1 -1
- package/dist/bundle/cli-runtime.js +1 -1
- package/dist/bundle/index.js +1 -1
- package/dist/bundle/rpc-entry.js +1 -1
- package/package.json +9 -9
- package/dist/bundle/chunks/chunk-2JZLKNZ4.js +0 -3
- package/dist/bundle/chunks/chunk-6M3D4XVD.js +0 -2
- package/dist/bundle/chunks/chunk-BIXKXDGW.js +0 -9
- package/dist/bundle/chunks/chunk-GBFVS2SF.js +0 -12
- package/dist/bundle/chunks/chunk-LO6CVU2L.js +0 -6
- package/dist/bundle/chunks/https-proxy-agent-WQIRL24U.js +0 -13
- package/dist/bundle/chunks/lib-ULKZYRGD.js +0 -9
- package/dist/bundle/chunks/src-KDGO7EGF.js +0 -4
- /package/dist/bundle/chunks/{chunk-ATYP3OSV.js → chunk-OPLOTJXH.js} +0 -0
- /package/dist/bundle/chunks/{chunk-ITKDPD4D.js → chunk-PX3CDFUB.js} +0 -0
- /package/dist/bundle/chunks/{chunk-MOOADNVS.js → chunk-ZZD35WKM.js} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __drahtCreateRequire } from "node:module"; const require = __drahtCreateRequire(import.meta.url);
|
|
2
|
-
import{retryProviderRequest}from"./chunk-RCRGGYLW.js";import{headersToRecord,providerHeadersToRecord}from"./chunk-EBVYI75P.js";import{calculateCost}from"./chunk-
|
|
2
|
+
import{retryProviderRequest}from"./chunk-RCRGGYLW.js";import{headersToRecord,providerHeadersToRecord}from"./chunk-EBVYI75P.js";import{calculateCost}from"./chunk-3YSKFWGJ.js";import{getIdentityHeaders}from"./chunk-CLONDAPI.js";function httpError(label,response,body){let error=new Error(`${label} returned ${response.status}`);return error.status=response.status,error.headers=response.headers,error.body=body,error}function timeoutError(timeoutMs){let error=new Error(`Request timed out after ${timeoutMs}ms`);return error.name="TimeoutError",error.status=void 0,error.headers=void 0,error.body="",error}function isRecord(value){return typeof value=="object"&&value!==null&&!Array.isArray(value)}function requiredNumber(label,value,field){if(typeof value!="number"||!Number.isFinite(value))throw new Error(`${label} returned an invalid ${field}`);return value}function requestHeaders(model,apiKey,optionsHeaders,identity){return providerHeadersToRecord(getIdentityHeaders(model,identity),{authorization:`Bearer ${apiKey}`,"content-type":"application/json"},model.headers,optionsHeaders)??{}}async function postClassifierRequest(label,url,model,body,options,noRetryStatuses){if(!options?.apiKey)throw new Error(`No API key for provider: ${model.provider}`);let apiKey=options.apiKey,payload=body,transformed=await options.onPayload?.(payload,model);transformed!==void 0&&(payload=transformed);let requestFetch=options.fetch??globalThis.fetch,{response,json}=await retryProviderRequest(async()=>{let timeoutSignal=options.timeoutMs!==void 0?AbortSignal.timeout(options.timeoutMs):void 0,signal=options.signal&&timeoutSignal?AbortSignal.any([options.signal,timeoutSignal]):options.signal??timeoutSignal;try{let next=await requestFetch(url,{method:"POST",headers:requestHeaders(model,apiKey,options.headers,options.identity),body:JSON.stringify(payload),signal});if(!next.ok)throw httpError(label,next,await next.text());return{response:next,json:await next.json()}}catch(error){throw timeoutSignal?.aborted&&!options.signal?.aborted?timeoutError(options.timeoutMs):error}},{maxRetries:options.maxRetries??2,maxRetryDelayMs:options.maxRetryDelayMs,signal:options.signal,noRetryStatuses});return await options.onResponse?.({status:response.status,headers:headersToRecord(response.headers)},model),json}function tokenCount(value){return typeof value=="number"&&Number.isFinite(value)&&value>0?value:0}function parseClassifierUsage(value,model){if(!isRecord(value)||value.input_tokens===void 0&&value.output_tokens===void 0)return;let input=tokenCount(value.input_tokens),output=tokenCount(value.output_tokens),usage={input,output,cacheRead:0,cacheWrite:0,totalTokens:input+output,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}};return calculateCost(model,usage),usage}export{isRecord,requiredNumber,postClassifierRequest,parseClassifierUsage};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __drahtCreateRequire } from "node:module"; const require = __drahtCreateRequire(import.meta.url);
|
|
2
|
-
import{shortHash}from"./chunk-HJ72RANT.js";import{appendGrammarToolInputJsonDelta,closeGrammarToolInputJson,getGrammarToolInput,getJsonSchemaToolParameters,resolveGrammarConstrainedSampling,resolveJsonSchemaStrictSampling,transformMessages}from"./chunk-
|
|
2
|
+
import{shortHash}from"./chunk-HJ72RANT.js";import{appendGrammarToolInputJsonDelta,closeGrammarToolInputJson,getGrammarToolInput,getJsonSchemaToolParameters,resolveGrammarConstrainedSampling,resolveJsonSchemaStrictSampling,transformMessages}from"./chunk-SYW5VSBL.js";import{sanitizeSurrogates}from"./chunk-63BK6WK2.js";import{ToolCallArgumentsStream}from"./chunk-QVGSXIKT.js";import{calculateCost,resolveTranscript,resolveTranscriptTools}from"./chunk-3YSKFWGJ.js";import{getSystemMessageText,renderSystemMessageUpdate}from"./chunk-CLONDAPI.js";function encodeTextSignatureV1(id,phase){let payload={v:1,id};return phase&&(payload.phase=phase),JSON.stringify(payload)}function parseTextSignature(signature){if(signature){if(signature.startsWith("{"))try{let parsed=JSON.parse(signature);if(parsed.v===1&&typeof parsed.id=="string")return parsed.phase==="commentary"||parsed.phase==="final_answer"?{id:parsed.id,phase:parsed.phase}:{id:parsed.id}}catch{}return{id:signature}}}function convertToolResultOutput(model,content){let textResult=content.filter(c=>c.type==="text").map(c=>c.text).join(`
|
|
3
3
|
`),images=content.filter(c=>c.type==="image"),hasText=textResult.trim().length>0;if(images.length===0||!model.input.includes("image"))return sanitizeSurrogates(hasText?textResult:images.length>0?"(see attached image)":"(no tool output)");let output=[];hasText&&output.push({type:"input_text",text:sanitizeSurrogates(textResult)});for(let image of images)output.push({type:"input_image",detail:"auto",image_url:`data:${image.mimeType};base64,${image.data}`});return output}function getResponsesToolSupport(options){return options.supportsMidConvoSystemMessages&&options.supportsAdditionalTools?"changes":options.supportsToolSearch?"additions":"none"}function renderIncrementalToolsNotice(unavailable){let notice="This is an incremental tools update. Previously declared tools remain available unless explicitly marked unavailable. A tool declared again here is available again, and its latest definition replaces the earlier one.";return unavailable.size>0?`${notice}
|
|
4
4
|
Still unavailable: ${[...unavailable].join(", ")}.`:notice}function renderToolRemovalNotice(names){return`The following tools are no longer available. Do not call them:
|
|
5
5
|
${names.map(name=>`- ${name}`).join(`
|