@comate/zulu 1.4.0-beta.6 → 1.4.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 (24) hide show
  1. package/comate-engine/assets/skills/code-review/SKILL.md +20 -20
  2. package/comate-engine/assets/skills/code-review/agents/correctness-reviewer.md +4 -3
  3. package/comate-engine/assets/skills/code-review/agents/custom-reviewer.md +8 -3
  4. package/comate-engine/assets/skills/code-review/agents/meta-reviewer.md +9 -7
  5. package/comate-engine/assets/skills/code-review/agents/style-reviewer.md +24 -14
  6. package/comate-engine/assets/skills/code-review/references/dispatch-template.md +10 -22
  7. package/comate-engine/assets/skills/code-review/references/output-schema.md +4 -4
  8. package/comate-engine/assets/skills/code-review/references/report-format.md +16 -4
  9. package/comate-engine/assets/skills/code-review/references/rules/Java/JAVA_STYLE_RULES.md +30 -2
  10. package/comate-engine/assets/skills/code-review/references/rules/Python/PYTHON_STYLE_RULES.md +28 -2
  11. package/comate-engine/assets/skills/code-review/references/telemetry.md +30 -1
  12. package/comate-engine/node_modules/@comate/plugin-engine/dist/index.js +8 -8
  13. package/comate-engine/node_modules/@comate/plugin-host/dist/{index-B2o7Olgl.js → index-DMeQwfyA.js} +1 -1
  14. package/comate-engine/node_modules/@comate/plugin-host/dist/index.js +1 -1
  15. package/comate-engine/node_modules/@comate/plugin-host/dist/main.js +1 -1
  16. package/comate-engine/node_modules/@comate/plugin-host/dist/{user-COVMgwjA.js → user-GYQM-VG_.js} +8 -8
  17. package/comate-engine/node_modules/@comate/plugin-shared-internals/dist/index.js +8 -8
  18. package/comate-engine/node_modules/better-sqlite3/node_modules/.bin/prebuild-install +2 -2
  19. package/comate-engine/node_modules/tree-sitter-bash/node_modules/.bin/node-gyp-build +2 -2
  20. package/comate-engine/node_modules/tree-sitter-bash/node_modules/.bin/node-gyp-build-optional +2 -2
  21. package/comate-engine/node_modules/tree-sitter-bash/node_modules/.bin/node-gyp-build-test +2 -2
  22. package/comate-engine/server.js +7 -7
  23. package/dist/bundle/index.js +7 -7
  24. package/package.json +1 -1
@@ -1 +1 @@
1
- import{U as t,S as e}from"./user-COVMgwjA.js";export{B as BackgroundServiceProvider,C as ConfigProvider,F as FallbackProvider,a as FunctionModel,P as PromptProvider,T as TextModel,l as getGitRepositoryUrl}from"./user-COVMgwjA.js";import"node:path";import"node:fs/promises";import"node:fs";import"node:process";import"node:url";import"node:stream";import"os";import"path";import"node:crypto";import"node:os";import"fs";import"constants";import"stream";import"util";import"assert";import"http";import"https";import"url";import"crypto";import"tty";import"zlib";import"events";import"net";import"tls";import"buffer";import"dns";import"node:child_process";import"node:tls";import"string_decoder";import"node:util";const n=["comate-sec.baidu-int.com","comate-sec.baidu.com","comate-sec-test.baidu-int.com"];function s(e,s={}){const i=t.currentAuth,o=new URL(e);if(!n.includes(o.hostname))return Promise.reject(new Error("Unauthorized Host"));const r={"X-Comate-Authorization":i};return fetch(e,{...s,headers:{...s.headers,...r}})}const i=["10.11.135.35","comate.baidu.com","comate.baidu-int.com"];function o(e,n={}){const s=t.currentAuth,o=new URL(e);if(!i.includes(o.hostname))return Promise.reject(new Error("Unauthorized Host"));const r={"Uuap-login-name":s};return fetch(e,{...n,headers:{...n.headers,...r}})}class r extends e{async*execute(t){const e=await this.buildRequest(t),n=(s=e.headers,s?.["Content-Type"]??s?.["content-type"]??null)?.includes("application/json");var s;const i=e.timeout?AbortSignal.timeout(e.timeout):null;try{const t=await fetch(e.url,{method:e.method,headers:e.headers,body:e.body?n?JSON.stringify(e.body):e.body:null,signal:i});if(t.ok){const n=await("json"===e.responseType?t.json():t.text());yield{command:"draw",content:this.transformResponseToText(n)}}else yield{command:"fail",content:`非常抱歉,发生了未知的网络错误,状态码为${t.status}。`}}catch{i?.aborted?yield{command:"fail",content:"非常抱歉,网络请求超时。"}:yield{command:"fail",content:"非常抱歉,发生了未知的网络错误。"}}}transformResponseToText(t){return String(t)}}class c{outputType;elements=[];constructor(t={outputType:"string"}){this.outputType=t.outputType}append(t){this.elements.push(this.normalize(t))}flush(t){return t&&this.append(t),{command:"draw",content:this.elements}}async flushStreaming(t){for await(const e of t)this.flush(e)}replaceLast(t){this.elements.length?this.elements[this.elements.length-1]=this.normalize(t):this.append(t)}flushReplaceLast(t){return this.replaceLast(t),this.flush()}fail(t){return this.elements.length=0,{command:"fail",content:this.normalize(t)}}normalize(t){if("mixed"===this.outputType)return t;if("string"==typeof t)return t;switch(t.type){case"p":return t.children+"\n\n";case"code-block":return"```"+(t.language??"")+"\n"+(e=t.children,(Array.isArray(e)?e:[e]).map((t=>t.toString())).join(""))+(t.closed?"\n```":"");default:return""}var e}}class h{elements=[];append(t){Array.isArray(t)?this.elements.push(...t):this.elements.push(t)}flush(t){return t&&this.append(t),{command:"draw",content:this.elements}}replaceLast(t){this.elements.length?this.elements[this.elements.length-1]=t:this.append(t)}replaceAll(t){this.elements.length?this.elements=Array.isArray(t)?t:[t]:this.append(t)}flushReplaceLast(t){return this.replaceLast(t),this.flush()}flushReplaceAll(t){return this.replaceAll(t),this.flush()}appendLast(t){const e=this.elements.at(-1);return!!e&&(e.children?!!Array.isArray(e.children)&&(e.children.push(t),!0):(e.children=[t],!0))}flushAppendLast(t){return this.appendLast(t),this.flush()}fail(t){return this.elements.length=0,{command:"fail",content:t}}}class m{chunks=[];append(t){this.chunks.push(t)}flush(t){return t&&this.append(t),{command:"draw",content:this.chunks}}replaceLast(t){this.chunks.length?this.chunks[this.chunks.length-1]=t:this.append(t)}flushReplaceLast(t){return this.replaceLast(t),this.flush()}fail(t){return this.chunks.length=0,{command:"fail",content:t}}}class p{sections={dynamicSections:[],dynamicFooterSections:[]};content="";actionSet={actions:{},actionConfigs:{}};append(t,e,n){t?.dynamicSections?.length&&this.sections.dynamicSections.push(...t.dynamicSections),t?.dynamicFooterSections?.length&&this.sections.dynamicFooterSections.push(...t.dynamicFooterSections),e&&(this.content=e),n&&(this.actionSet=n)}flush(t,e,n){return(t||e||n)&&this.append(t,e,n),{command:"section",sections:this.sections,content:this.content,actionSet:this.actionSet}}replaceLast(t,e,n){const s=this.sections.dynamicSections.length&&t.dynamicSections?.length,i=this.sections.dynamicFooterSections.length&&t.dynamicFooterSections?.length;s||i?(t.dynamicSections?.length&&(this.sections.dynamicSections=t.dynamicSections),t.dynamicFooterSections?.length&&(this.sections.dynamicFooterSections=t.dynamicFooterSections),this.content=e??"",n&&(this.actionSet=n)):this.append(t,e,n)}flushReplaceLast(t,e,n){return this.replaceLast(t,e,n),this.flush()}}-1===Math.random()&&console.log("THIS IS COMATE");export{h as ElementChunkStream,r as PipeHttpRequestSkillProvider,p as SectionChunkStream,e as SkillProvider,m as StringChunkStream,c as TaskProgressChunkStream,o as authorizedFirstPartyFetch,s as fetch};
1
+ import{U as t,S as e}from"./user-GYQM-VG_.js";export{B as BackgroundServiceProvider,C as ConfigProvider,F as FallbackProvider,a as FunctionModel,P as PromptProvider,T as TextModel,l as getGitRepositoryUrl}from"./user-GYQM-VG_.js";import"node:path";import"node:fs/promises";import"node:fs";import"node:process";import"node:url";import"node:stream";import"os";import"path";import"node:crypto";import"node:os";import"fs";import"constants";import"stream";import"util";import"assert";import"http";import"https";import"url";import"crypto";import"tty";import"zlib";import"events";import"net";import"tls";import"buffer";import"dns";import"node:child_process";import"node:tls";import"string_decoder";import"node:util";const n=["comate-sec.baidu-int.com","comate-sec.baidu.com","comate-sec-test.baidu-int.com"];function s(e,s={}){const i=t.currentAuth,o=new URL(e);if(!n.includes(o.hostname))return Promise.reject(new Error("Unauthorized Host"));const r={"X-Comate-Authorization":i};return fetch(e,{...s,headers:{...s.headers,...r}})}const i=["10.11.135.35","comate.baidu.com","comate.baidu-int.com"];function o(e,n={}){const s=t.currentAuth,o=new URL(e);if(!i.includes(o.hostname))return Promise.reject(new Error("Unauthorized Host"));const r={"Uuap-login-name":s};return fetch(e,{...n,headers:{...n.headers,...r}})}class r extends e{async*execute(t){const e=await this.buildRequest(t),n=(s=e.headers,s?.["Content-Type"]??s?.["content-type"]??null)?.includes("application/json");var s;const i=e.timeout?AbortSignal.timeout(e.timeout):null;try{const t=await fetch(e.url,{method:e.method,headers:e.headers,body:e.body?n?JSON.stringify(e.body):e.body:null,signal:i});if(t.ok){const n=await("json"===e.responseType?t.json():t.text());yield{command:"draw",content:this.transformResponseToText(n)}}else yield{command:"fail",content:`非常抱歉,发生了未知的网络错误,状态码为${t.status}。`}}catch{i?.aborted?yield{command:"fail",content:"非常抱歉,网络请求超时。"}:yield{command:"fail",content:"非常抱歉,发生了未知的网络错误。"}}}transformResponseToText(t){return String(t)}}class c{outputType;elements=[];constructor(t={outputType:"string"}){this.outputType=t.outputType}append(t){this.elements.push(this.normalize(t))}flush(t){return t&&this.append(t),{command:"draw",content:this.elements}}async flushStreaming(t){for await(const e of t)this.flush(e)}replaceLast(t){this.elements.length?this.elements[this.elements.length-1]=this.normalize(t):this.append(t)}flushReplaceLast(t){return this.replaceLast(t),this.flush()}fail(t){return this.elements.length=0,{command:"fail",content:this.normalize(t)}}normalize(t){if("mixed"===this.outputType)return t;if("string"==typeof t)return t;switch(t.type){case"p":return t.children+"\n\n";case"code-block":return"```"+(t.language??"")+"\n"+(e=t.children,(Array.isArray(e)?e:[e]).map((t=>t.toString())).join(""))+(t.closed?"\n```":"");default:return""}var e}}class h{elements=[];append(t){Array.isArray(t)?this.elements.push(...t):this.elements.push(t)}flush(t){return t&&this.append(t),{command:"draw",content:this.elements}}replaceLast(t){this.elements.length?this.elements[this.elements.length-1]=t:this.append(t)}replaceAll(t){this.elements.length?this.elements=Array.isArray(t)?t:[t]:this.append(t)}flushReplaceLast(t){return this.replaceLast(t),this.flush()}flushReplaceAll(t){return this.replaceAll(t),this.flush()}appendLast(t){const e=this.elements.at(-1);return!!e&&(e.children?!!Array.isArray(e.children)&&(e.children.push(t),!0):(e.children=[t],!0))}flushAppendLast(t){return this.appendLast(t),this.flush()}fail(t){return this.elements.length=0,{command:"fail",content:t}}}class m{chunks=[];append(t){this.chunks.push(t)}flush(t){return t&&this.append(t),{command:"draw",content:this.chunks}}replaceLast(t){this.chunks.length?this.chunks[this.chunks.length-1]=t:this.append(t)}flushReplaceLast(t){return this.replaceLast(t),this.flush()}fail(t){return this.chunks.length=0,{command:"fail",content:t}}}class p{sections={dynamicSections:[],dynamicFooterSections:[]};content="";actionSet={actions:{},actionConfigs:{}};append(t,e,n){t?.dynamicSections?.length&&this.sections.dynamicSections.push(...t.dynamicSections),t?.dynamicFooterSections?.length&&this.sections.dynamicFooterSections.push(...t.dynamicFooterSections),e&&(this.content=e),n&&(this.actionSet=n)}flush(t,e,n){return(t||e||n)&&this.append(t,e,n),{command:"section",sections:this.sections,content:this.content,actionSet:this.actionSet}}replaceLast(t,e,n){const s=this.sections.dynamicSections.length&&t.dynamicSections?.length,i=this.sections.dynamicFooterSections.length&&t.dynamicFooterSections?.length;s||i?(t.dynamicSections?.length&&(this.sections.dynamicSections=t.dynamicSections),t.dynamicFooterSections?.length&&(this.sections.dynamicFooterSections=t.dynamicFooterSections),this.content=e??"",n&&(this.actionSet=n)):this.append(t,e,n)}flushReplaceLast(t,e,n){return this.replaceLast(t,e,n),this.flush()}}-1===Math.random()&&console.log("THIS IS COMATE");export{h as ElementChunkStream,r as PipeHttpRequestSkillProvider,p as SectionChunkStream,e as SkillProvider,m as StringChunkStream,c as TaskProgressChunkStream,o as authorizedFirstPartyFetch,s as fetch};
@@ -1,4 +1,4 @@
1
- import p from"node:path";import{g as e,P as a,S as d,F as m,B as i,C as l,T as t,L as s,a as o,I as r,i as n,b as v,U as u,A as c,c as h,d as w,e as f,f as g,h as y,j as N,k as _}from"./user-COVMgwjA.js";import b from"node:fs/promises";import"node:fs";import"node:process";import"node:url";import"node:stream";import"os";import"path";import"node:crypto";import"node:os";import S from"stream";import D from"http";import V from"url";import T from"punycode";import C from"https";import A from"zlib";import"fs";import"constants";import"util";import"assert";import"crypto";import"tty";import"events";import"net";import"tls";import"buffer";import"dns";import"node:child_process";import"node:tls";import"string_decoder";import"node:util";var E="win32"===process.platform;function k(p,e){var a=p[e];return e>0&&("/"===a||E&&"\\"===a)}
1
+ import p from"node:path";import{g as e,P as a,S as d,F as m,B as i,C as l,T as t,L as s,a as o,I as r,i as n,b as v,U as u,A as c,c as h,d as w,e as f,f as g,h as y,j as N,k as _}from"./user-GYQM-VG_.js";import b from"node:fs/promises";import"node:fs";import"node:process";import"node:url";import"node:stream";import"os";import"path";import"node:crypto";import"node:os";import S from"stream";import D from"http";import V from"url";import T from"punycode";import C from"https";import A from"zlib";import"fs";import"constants";import"util";import"assert";import"crypto";import"tty";import"events";import"net";import"tls";import"buffer";import"dns";import"node:child_process";import"node:tls";import"string_decoder";import"node:util";var E="win32"===process.platform;function k(p,e){var a=p[e];return e>0&&("/"===a||E&&"\\"===a)}
2
2
  /*!
3
3
  * normalize-path <https://github.com/jonschlinkert/normalize-path>
4
4
  *