@draht/coding-agent 2026.11.18 → 2026.11.19-1

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.
Files changed (74) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/bin/draht-kg.cjs +4782 -0
  3. package/bin/draht-tools.cjs +747 -47
  4. package/dist/bundle/chunks/{anthropic-messages-AC3PJZGW.js → anthropic-messages-7PTOA4ZA.js} +1 -1
  5. package/dist/bundle/chunks/{azure-openai-responses-2J7IW2GS.js → azure-openai-responses-CDW6FCMN.js} +1 -1
  6. package/dist/bundle/chunks/bedrock-converse-stream.js +21 -21
  7. package/dist/bundle/chunks/chunk-2JZLKNZ4.js +3 -0
  8. package/dist/bundle/chunks/{chunk-BE7TLAK6.js → chunk-3F4OOENR.js} +1 -1
  9. package/dist/bundle/chunks/{chunk-G7DJ6PIU.js → chunk-4FPBO5KP.js} +1 -1
  10. package/dist/bundle/chunks/chunk-6M3D4XVD.js +2 -0
  11. package/dist/bundle/chunks/{chunk-KVH4HR57.js → chunk-6WESOD4H.js} +1 -1
  12. package/dist/bundle/chunks/{chunk-CJE4DCYO.js → chunk-7HQNDYWE.js} +1 -1
  13. package/dist/bundle/chunks/{chunk-4CTNOZEB.js → chunk-B6OJ7QX4.js} +1 -1
  14. package/dist/bundle/chunks/chunk-BIXKXDGW.js +9 -0
  15. package/dist/bundle/chunks/{chunk-ZTXZVREE.js → chunk-BQMYLQSG.js} +8 -8
  16. package/dist/bundle/chunks/{chunk-AQ4POXF4.js → chunk-CAOOVEOM.js} +1 -1
  17. package/dist/bundle/chunks/{chunk-5K3TBDND.js → chunk-GAABJAG4.js} +3 -3
  18. package/dist/bundle/chunks/chunk-GBFVS2SF.js +12 -0
  19. package/dist/bundle/chunks/{chunk-ITP6IDBA.js → chunk-GQXRTK54.js} +2 -2
  20. package/dist/bundle/chunks/{chunk-XJIEDSG4.js → chunk-HKQ3PU5T.js} +1 -1
  21. package/dist/bundle/chunks/{chunk-4M4EEFE4.js → chunk-INKDO5TZ.js} +3 -3
  22. package/dist/bundle/chunks/{chunk-SFCIAZKL.js → chunk-JI5YDTBB.js} +1 -1
  23. package/dist/bundle/chunks/{chunk-QVGSXIKT.js → chunk-KFREX3FS.js} +1 -1
  24. package/dist/bundle/chunks/chunk-LO6CVU2L.js +6 -0
  25. package/dist/bundle/chunks/{chunk-H76YEAD6.js → chunk-MHNW355A.js} +1 -1
  26. package/dist/bundle/chunks/{chunk-6QA6EP5G.js → chunk-O2P5SYXT.js} +1 -1
  27. package/dist/bundle/chunks/{chunk-XY64T2H6.js → chunk-RI7HJ6AF.js} +10 -10
  28. package/dist/bundle/chunks/{chunk-XEZZ7MVH.js → chunk-WOIC265R.js} +31 -28
  29. package/dist/bundle/chunks/{chunk-GU2IUEJX.js → chunk-YOPX5URH.js} +1 -1
  30. package/dist/bundle/chunks/{cli-23A5TA2S.js → cli-QUYXUKRF.js} +1 -1
  31. package/dist/bundle/chunks/{cloudflare-workers-ai-system-one-XYXX3HPQ.js → cloudflare-workers-ai-system-one-W63EWPDW.js} +1 -1
  32. package/dist/bundle/chunks/{execute-YOMYOVUT.js → execute-KGJOWTPG.js} +1 -1
  33. package/dist/bundle/chunks/{google-generative-ai-KPJSGUNM.js → google-generative-ai-M5WKK5CW.js} +1 -1
  34. package/dist/bundle/chunks/{google-vertex-O2RTR7GI.js → google-vertex-UYNOGPMI.js} +1 -1
  35. package/dist/bundle/chunks/https-proxy-agent-WQIRL24U.js +13 -0
  36. package/dist/bundle/chunks/lib-ULKZYRGD.js +9 -0
  37. package/dist/bundle/chunks/{llama-cpp-classify-654QJMMO.js → llama-cpp-classify-SAUGLDPT.js} +1 -1
  38. package/dist/bundle/chunks/{mistral-conversations-RNE6RWOB.js → mistral-conversations-VQ3J6W5K.js} +1 -1
  39. package/dist/bundle/chunks/{multipart-parser-AZP5BX2W.js → multipart-parser-HMCXZ4BD.js} +1 -1
  40. package/dist/bundle/chunks/{node-BZAVEWJ3.js → node-DXZFQBEO.js} +1 -1
  41. package/dist/bundle/chunks/{node-C2JGH2OB.js → node-LBZLUIBE.js} +1 -1
  42. package/dist/bundle/chunks/{openai-codex-responses-XBJLRZBV.js → openai-codex-responses-JTGQLYC7.js} +1 -1
  43. package/dist/bundle/chunks/{openai-completions-FJF3ZAAN.js → openai-completions-WAW7BG4E.js} +1 -1
  44. package/dist/bundle/chunks/{openai-decisions-V3M7K4QS.js → openai-decisions-KHHHHMGW.js} +1 -1
  45. package/dist/bundle/chunks/{openai-responses-N3KEN2UE.js → openai-responses-GWADST54.js} +1 -1
  46. package/dist/bundle/chunks/{openrouter-images-N7JGL3Y5.js → openrouter-images-AP626CWG.js} +1 -1
  47. package/dist/bundle/chunks/{pi-messages-RYZ4IMCU.js → pi-messages-H5TYIEJT.js} +1 -1
  48. package/dist/bundle/chunks/{runtime-3ZSEARRN.js → runtime-73OLLYOI.js} +1 -1
  49. package/dist/bundle/chunks/{runtime-S5WBSLTE.js → runtime-FZKS2BWI.js} +1 -1
  50. package/dist/bundle/chunks/{settings-manager-H3QEOPQ3.js → settings-manager-CWRQW6PZ.js} +1 -1
  51. package/dist/bundle/chunks/src-KDGO7EGF.js +4 -0
  52. package/dist/bundle/chunks/{typesafe-system-one-Z3V75OVM.js → typesafe-system-one-RLPGOT75.js} +1 -1
  53. package/dist/bundle/chunks/{virtual-modules-E543D4YT.js → virtual-modules-5V4G5GQH.js} +1 -1
  54. package/dist/bundle/cli-runtime.js +1 -1
  55. package/dist/bundle/index.js +1 -1
  56. package/dist/bundle/rpc-entry.js +1 -1
  57. package/dist/cli/args.d.ts.map +1 -1
  58. package/dist/cli/args.js +3 -0
  59. package/dist/cli/args.js.map +1 -1
  60. package/dist/prompts/commands/map-codebase.md +3 -1
  61. package/docs/environment-variables.md +2 -0
  62. package/package.json +9 -9
  63. package/prompts/commands/map-codebase.md +3 -1
  64. package/dist/bundle/chunks/chunk-44YIE6WF.js +0 -9
  65. package/dist/bundle/chunks/chunk-6MSE6LZ3.js +0 -6
  66. package/dist/bundle/chunks/chunk-736QBNUZ.js +0 -12
  67. package/dist/bundle/chunks/chunk-BIBUE2PO.js +0 -2
  68. package/dist/bundle/chunks/chunk-TIA2T6EO.js +0 -3
  69. package/dist/bundle/chunks/https-proxy-agent-O2PVUIOI.js +0 -13
  70. package/dist/bundle/chunks/lib-XOG5PI3Y.js +0 -9
  71. package/dist/bundle/chunks/src-TIBHS42X.js +0 -4
  72. /package/dist/bundle/chunks/{chunk-OPLOTJXH.js → chunk-ATYP3OSV.js} +0 -0
  73. /package/dist/bundle/chunks/{chunk-PX3CDFUB.js → chunk-ITKDPD4D.js} +0 -0
  74. /package/dist/bundle/chunks/{chunk-ZZD35WKM.js → chunk-MOOADNVS.js} +0 -0
@@ -1,2 +1,2 @@
1
1
  import { createRequire as __drahtCreateRequire } from "node:module"; const require = __drahtCreateRequire(import.meta.url);
2
- import{ownedSlice}from"./chunk-44YIE6WF.js";var MAX_PROVIDER_ERROR_BODY_CHARS=4e3;function normalizeProviderError(error){if(!(error instanceof Error))return{message:safeJsonStringify(error),messageCarriesBody:!1};let sdkError=error,status=extractStatus(sdkError),body=extractBody(sdkError),messageCarriesBody=body===void 0||error.message.includes(body),message=status===void 0&&body===void 0?withCauseDetail(error):error.message;return{status,body,message,messageCarriesBody}}var MAX_CAUSE_DEPTH=5;function withCauseDetail(error){let deepest,current=error.cause;for(let depth=0;depth<MAX_CAUSE_DEPTH&&current instanceof Error;depth++)deepest=current,current=current.cause;if(!deepest)return error.message;let detail=(deepest.message||deepest.name).trim(),code=deepest.code;return(typeof code=="string"||typeof code=="number")&&!detail.includes(String(code))&&(detail=detail?`${detail} (${code})`:String(code)),!detail||error.message.includes(detail)?error.message:error.message?`${error.message}: ${detail}`:detail}function extractStatus(error){if(typeof error.statusCode=="number")return error.statusCode;if(typeof error.status=="number")return error.status;if(typeof error.$metadata?.httpStatusCode=="number")return error.$metadata.httpStatusCode;if(typeof error.$response?.statusCode=="number")return error.$response.statusCode}function extractBody(error){let bodyText=pickBodyText(error);if(bodyText===void 0)return;let trimmed=bodyText.trim();if(trimmed.length!==0)return truncateErrorText(trimmed,MAX_PROVIDER_ERROR_BODY_CHARS)}function pickBodyText(error){if(typeof error.body=="string")return error.body;if(isPlainNonEmptyObject(error.error))return safeJsonStringify(error.error);let responseBody=error.$response?.body;if(typeof responseBody=="string")return responseBody;if(!isReadableStreamLike(responseBody)&&isPlainNonEmptyObject(responseBody))return safeJsonStringify(responseBody)}function isReadableStreamLike(value){return typeof value=="object"&&value!==null&&"pipe"in value&&typeof value.pipe=="function"}function isPlainNonEmptyObject(value){if(typeof value!="object"||value===null)return!1;let proto=Object.getPrototypeOf(value);return proto!==Object.prototype&&proto!==null?!1:Object.keys(value).length>0}function formatProviderError(norm,prefix){return norm.messageCarriesBody||norm.status===void 0||norm.body===void 0?prefix!==void 0&&norm.status!==void 0?`${prefix} (${norm.status}): ${norm.message}`:norm.message:prefix!==void 0?`${prefix} (${norm.status}): ${norm.body}`:`${norm.status}: ${norm.body}`}function truncateErrorText(text,maxChars){return text.length<=maxChars?text:`${ownedSlice(text,0,maxChars)}... [truncated ${text.length-maxChars} chars]`}function safeJsonStringify(value){try{let serialized=JSON.stringify(value);return serialized===void 0?String(value):serialized}catch{return String(value)}}export{normalizeProviderError,withCauseDetail,formatProviderError,truncateErrorText};
2
+ import{ownedSlice}from"./chunk-BIXKXDGW.js";var MAX_PROVIDER_ERROR_BODY_CHARS=4e3;function normalizeProviderError(error){if(!(error instanceof Error))return{message:safeJsonStringify(error),messageCarriesBody:!1};let sdkError=error,status=extractStatus(sdkError),body=extractBody(sdkError),messageCarriesBody=body===void 0||error.message.includes(body),message=status===void 0&&body===void 0?withCauseDetail(error):error.message;return{status,body,message,messageCarriesBody}}var MAX_CAUSE_DEPTH=5;function withCauseDetail(error){let deepest,current=error.cause;for(let depth=0;depth<MAX_CAUSE_DEPTH&&current instanceof Error;depth++)deepest=current,current=current.cause;if(!deepest)return error.message;let detail=(deepest.message||deepest.name).trim(),code=deepest.code;return(typeof code=="string"||typeof code=="number")&&!detail.includes(String(code))&&(detail=detail?`${detail} (${code})`:String(code)),!detail||error.message.includes(detail)?error.message:error.message?`${error.message}: ${detail}`:detail}function extractStatus(error){if(typeof error.statusCode=="number")return error.statusCode;if(typeof error.status=="number")return error.status;if(typeof error.$metadata?.httpStatusCode=="number")return error.$metadata.httpStatusCode;if(typeof error.$response?.statusCode=="number")return error.$response.statusCode}function extractBody(error){let bodyText=pickBodyText(error);if(bodyText===void 0)return;let trimmed=bodyText.trim();if(trimmed.length!==0)return truncateErrorText(trimmed,MAX_PROVIDER_ERROR_BODY_CHARS)}function pickBodyText(error){if(typeof error.body=="string")return error.body;if(isPlainNonEmptyObject(error.error))return safeJsonStringify(error.error);let responseBody=error.$response?.body;if(typeof responseBody=="string")return responseBody;if(!isReadableStreamLike(responseBody)&&isPlainNonEmptyObject(responseBody))return safeJsonStringify(responseBody)}function isReadableStreamLike(value){return typeof value=="object"&&value!==null&&"pipe"in value&&typeof value.pipe=="function"}function isPlainNonEmptyObject(value){if(typeof value!="object"||value===null)return!1;let proto=Object.getPrototypeOf(value);return proto!==Object.prototype&&proto!==null?!1:Object.keys(value).length>0}function formatProviderError(norm,prefix){return norm.messageCarriesBody||norm.status===void 0||norm.body===void 0?prefix!==void 0&&norm.status!==void 0?`${prefix} (${norm.status}): ${norm.message}`:norm.message:prefix!==void 0?`${prefix} (${norm.status}): ${norm.body}`:`${norm.status}: ${norm.body}`}function truncateErrorText(text,maxChars){return text.length<=maxChars?text:`${ownedSlice(text,0,maxChars)}... [truncated ${text.length-maxChars} chars]`}function safeJsonStringify(value){try{let serialized=JSON.stringify(value);return serialized===void 0?String(value):serialized}catch{return String(value)}}export{normalizeProviderError,withCauseDetail,formatProviderError,truncateErrorText};