@ycodium-ai/plugin-redteam-model 0.2.5763 → 0.2.5877
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/assets/ui.js +1 -1
- package/dist/index.js +1 -1
- package/locales/zh-CN.json +2 -2
- package/package.json +2 -2
package/assets/ui.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var ne=window.__ycodiumPluginHost.react;var{Activity:Ce,Children:Te,Component:te,Fragment:re,Profiler:Ee,PureComponent:Re,StrictMode:Ie,Suspense:Pe,__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE:Me,__COMPILER_RUNTIME:Ae,act:De,cache:_e,cacheSignal:ze,captureOwnerStack:Oe,cloneElement:Be,createContext:z,createElement:N,createRef:Le,forwardRef:$e,isValidElement:He,lazy:Fe,memo:oe,startTransition:Ue,unstable_useCacheRefresh:Ve,use:O,useActionState:Ge,useCallback:v,useContext:Ke,useDebugValue:We,useDeferredValue:Xe,useEffect:w,useEffectEvent:je,useId:Ye,useImperativeHandle:qe,useInsertionEffect:ie,useLayoutEffect:Je,useMemo:ae,useOptimistic:Ze,useReducer:Qe,useRef:E,useState:f,useSyncExternalStore:se,useTransition:en,version:nn}=ne;var{jsx:t,jsxs:i,Fragment:R}=window.__ycodiumPluginHost.jsxRuntime;var B=z(null);function b(e){return N(B,{value:e.bridge},e.children)}var le=new Set(["Collapsible","CollapsiblePanel","CollapsibleTrigger"]);function p(e){let n=r=>{let o=O(B)?.ui?.[e];return o===void 0?le.has(e)?N("div",{className:r.className},r.children):null:N(o,r)};return n.displayName=e,n}var I="[a-zA-Z][a-zA-Z0-9:_-]*";var de="ycodium",Cn=`${de}:`,Tn=new RegExp(String.raw`(^|\s)([$/])(${I})(?=\s|$)`,"g");var En=new RegExp(String.raw`([$/])(${I})(?=\s|$)`,"y");var Rn=new RegExp(String.raw`^/(${I})$`);var u=p("Button"),L=p("Collapsible"),$=p("CollapsibleTrigger"),H=p("CollapsiblePanel"),m=p("EmptyInline"),F=p("ChevronDown");var h="redteam-model",g=["authorization","scope","evidence","report"],U=[{id:"redteam",group:"general"},{id:"pentest",group:"professional"},{id:"code-audit",group:"professional"},{id:"binary-analysis",group:"professional"},{id:"attack-defense",group:"professional"},{id:"av-evasion",group:"professional"},{id:"incident-response",group:"professional"},{id:"cloud-security",group:"professional"},{id:"ctf-solver",group:"professional"},{id:"asset-mapping",group:"professional"}],ue={redteam:{displayName:"Researcher",detail:"General session. Gates are optional."},pentest:{displayName:"Assessment",detail:"Authorized review."},"code-audit":{displayName:"Code review",detail:"Source review."},"binary-analysis":{displayName:"Binary review",detail:"Binary review."},"attack-defense":{displayName:"Exercise",detail:"Authorized exercise."},"av-evasion":{displayName:"Detection review",detail:"Detection review. No evasion steps, payloads, or refusal bypass."},"incident-response":{displayName:"Incident review",detail:"Incident review."},"cloud-security":{displayName:"Cloud review",detail:"Cloud review."},"ctf-solver":{displayName:"Puzzle workspace",detail:"Puzzle workspace."},"asset-mapping":{displayName:"Asset inventory",detail:"Inventory workflow."}};function ce(e){let n=U.find(s=>s.id===e);if(n===void 0)return null;let r=ue[n.id];return{id:n.id,group:n.group,...r}}function P(){return U.map(e=>ce(e.id)).filter(e=>e!==null)}var V="board",St={gates:`${h}_gates_list`,goal:`${h}_operation_goal`,progress:`${h}_operation_progress`,publish:`${h}_publish`,probe:`${h}_probe`,note:`${h}_ledger_note`};function G(e){let{t:n}=e,[r,s]=f(e.initialProfessionalOpen===!0),[a,o]=f(e.presetId??null),[l,c]=f(!1),x=P(),C=x.filter(d=>d.group==="general"),y=x.filter(d=>d.group==="professional");w(()=>{o(e.presetId??null)},[e.presetId]),w(()=>{let d=k=>{let _=k.detail;o(typeof _?.presetId=="string"?_.presetId:null)};return window.addEventListener("ycodium-draft-preset",d),()=>window.removeEventListener("ycodium-draft-preset",d)},[]);let T=d=>{if(o(d),!e.deployed)return;if(typeof e.onSelectPreset=="function"){e.onSelectPreset(d),c(!1);return}let k=e.bridge.agentPreset?.select;if(k!==void 0){k(d),c(!1);return}c(!0)};return i("section",{className:"rm-hero",children:[t("p",{className:"rm-kicker",children:n("hero.title")}),e.deployed?null:t("p",{className:"rm-banner",children:n("hero.deployFirst")}),e.selectable===!1?t("p",{className:"rm-muted",children:n("hero.readOnly")}):null,l?t("p",{className:"rm-muted",children:n("hero.unwired")}):null,i("div",{className:"rm-modes",children:[C.map(d=>t(u,{size:"xs",type:"button",variant:a===d.id?"default":"outline",disabled:!e.deployed,"aria-pressed":a===d.id,onClick:()=>T(d.id),children:n(`mode.${d.id}.name`)},d.id)),t(u,{size:"xs",variant:"outline",type:"button","aria-expanded":r,onClick:()=>s(d=>!d),children:n(r?"hero.hideProfessional":"hero.professional")}),a===null?null:t(u,{size:"xs",variant:"outline",type:"button",disabled:!e.deployed,onClick:()=>T(null),children:n("hero.clear")})]}),r?t("div",{className:"rm-modes",children:y.map(d=>t(u,{size:"xs",type:"button",variant:a===d.id?"default":"outline",disabled:!e.deployed,"aria-pressed":a===d.id,onClick:()=>T(d.id),children:t("span",{children:n(`mode.${d.id}.name`)})},d.id))}):null,a===null?null:t("p",{className:"rm-muted",children:n("hero.selected")})]})}var pe=12,me=20;function M(e=null){return{modeId:e,phase:"authorization",goal:"",done:0,total:g.length,reportOpen:!1,authorizationRecorded:!1,denials:[],notes:[]}}function K(e){if(typeof e!="object"||e===null)return null;let n=e;return typeof n.deployed!="boolean"||!Array.isArray(n.modules)||!Array.isArray(n.modes)?null:n}function ge(e){return g.includes(e)}function W(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function fe(e){return!W(e)||typeof e.tool!="string"||typeof e.reason!="string"?null:{tool:e.tool,code:typeof e.code=="string"?e.code:"denied",reason:e.reason,at:typeof e.at=="string"?e.at:""}}function X(e){if(!W(e))return M();let n=typeof e.phase=="string"&&ge(e.phase)?e.phase:"authorization",r=Array.isArray(e.denials)?e.denials.flatMap(a=>{let o=fe(a);return o===null?[]:[o]}):[],s=Array.isArray(e.notes)?e.notes.filter(a=>typeof a=="string").slice(0,me):[];return{modeId:typeof e.modeId=="string"?e.modeId:null,phase:n,goal:typeof e.goal=="string"?e.goal:"",done:typeof e.done=="number"?e.done:0,total:typeof e.total=="number"?e.total:g.length,reportOpen:e.reportOpen===!0,authorizationRecorded:e.authorizationRecorded===!0,denials:r.slice(0,pe),notes:s}}var ye={};function S(e){return e.i18n.usePluginTranslation()}function be(e,n){return e!==null?{next:e,claimed:!1}:{next:n,claimed:!0}}function j(e){return{disabled:e!==null,labelKey:e==="deploy"?"settings.deploying":"settings.deploy"}}function A(e){let n=e.commands.useSubscription("live",ye),r=n.data,s=r?.board===void 0?null:K(r.board),a=E(null),[o,l]=f(null),c=v(async(x,C={})=>{let y=be(a.current,x);if(!(!y.claimed||y.next===null)){a.current=y.next,l(y.next);try{await e.commands.invoke(x,C)}finally{a.current=null,l(null)}}},[e]);return{board:s,pending:n.isPending,error:n.error,runningCommand:o,run:c}}function D(e,n){let r=e.sessionProjections.useProjection(V,n||null),s=r,a=n===null||n.length===0?null:s.present?X(s.value):M(),o=v(async(l,c={})=>{await e.commands.invoke(l,{threadId:n??"",...c})},[e,n]);return{session:a,pending:r.isPending,isUnavailable:r.isUnavailable,error:r.error,run:o}}function Y(e){let{t:n,board:r}=e,s=e.runningCommand!==null,a=j(e.runningCommand);return r===null?t("section",{className:"rm-root",children:t(m,{title:e.pending?n("common.loading"):n("common.empty")})}):i("section",{className:"rm-root",children:[i("header",{className:"rm-head",children:[t("div",{children:t("h2",{className:"rm-title",children:n("settings.title")})}),t("span",{className:r.deployed?"rm-pill rm-pill-ok":"rm-pill",children:r.deployed?n("settings.deployed"):n("settings.notDeployed")})]}),i("div",{className:"rm-card",children:[i("div",{className:"rm-actions",children:[t(u,{size:"xs",variant:"default",type:"button",onClick:e.onDeploy,disabled:a.disabled,children:n(a.labelKey)}),t(u,{size:"xs",variant:"outline",type:"button",onClick:e.onRemove,disabled:!r.deployed||s,children:n("settings.remove")}),t(u,{size:"xs",variant:"outline",type:"button",onClick:e.onRepair,disabled:s,children:n("settings.repair")}),t(u,{size:"xs",variant:"outline",type:"button",onClick:()=>e.onProbe(!r.probeDenial),disabled:s,children:r.probeDenial?n("settings.probeHold"):n("settings.probeAllow")})]}),t("p",{className:"rm-lead",children:n("settings.routing")}),r.lastDenial===null?t("p",{className:"rm-muted",children:n("settings.noDenial")}):i("p",{className:"rm-banner",role:"status",children:[n("settings.denial")," ",r.lastDenial.tool,": ",r.lastDenial.reason]})]}),i("div",{className:"rm-card",children:[t("h3",{className:"rm-title",children:n("settings.modes")}),["general","professional"].map(o=>i("div",{children:[t("p",{className:"rm-kicker",children:n(`group.${o}`)}),t("p",{className:"rm-muted",children:n(`group.${o}Note`)}),t("div",{className:"rm-modes",children:r.modes.filter(l=>l.group===o).map(l=>i("article",{className:"rm-card",children:[t("strong",{children:n(`mode.${l.id}.name`)}),l.id==="av-evasion"?t("p",{className:"rm-muted",children:n("mode.av-evasion.detail")}):null]},l.id))})]},o))]}),i("div",{className:"rm-card",children:[t("h3",{className:"rm-title",children:n("settings.modules")}),t("p",{className:"rm-lead",children:n("settings.withheldNote")}),r.modules.map(o=>i("div",{className:"rm-module",children:[i("div",{children:[t("strong",{children:n(`module.${o.id}`)}),i("p",{className:"rm-muted",children:[n(`availability.${o.availability}`),","," ",o.installed?n("common.installed"):n("common.absent")]})]}),i("div",{className:"rm-actions",children:[t(u,{size:"xs",variant:"outline",type:"button",disabled:s,onClick:()=>e.onInstall(o.id),children:n("settings.install")}),t(u,{size:"xs",variant:"outline",type:"button",disabled:!o.installed||s,onClick:()=>e.onUpdate(o.id),children:n("settings.update")}),t(u,{size:"xs",variant:"outline",type:"button",disabled:!o.installed||s,onClick:()=>e.onUninstall(o.id),children:n("settings.uninstall")})]})]},o.id)),t("p",{className:"rm-muted",children:n("settings.mcpNote")})]}),i("div",{className:"rm-card",children:[t("h3",{className:"rm-title",children:n("settings.operations")}),r.operations.length===0?t("p",{className:"rm-muted",children:n("settings.noOperations")}):t("ul",{className:"rm-log",children:r.operations.map(o=>i("li",{children:[i("span",{children:[o.kind,", ",n(`op.${o.status}`)]}),t("span",{className:"rm-muted",children:o.detail})]},o.id))})]})]})}function q(e){return{authorization:e.authorizationRecorded?"secondary":"primary",report:e.authorizationRecorded&&!e.reportOpen?"primary":"secondary"}}function J(e){let{t:n,session:r}=e;if(e.threadId===null||e.threadId.length===0||r===null||r.modeId===null)return null;let s=Math.min(r.done,g.length),a=q(r);return i(L,{className:"rm-seat",defaultOpen:!0,children:[i($,{className:"rm-seat-trigger",children:[t(F,{className:"rm-seat-chevron"}),n("session.title")]}),t(H,{children:t("div",{className:"rm-seat-body",children:i("section",{className:"rm-session",children:[i("header",{className:"rm-head",children:[t("div",{children:t("p",{className:"rm-muted",children:n(`mode.${r.modeId}.name`)})}),i("span",{className:"rm-pill",children:[n("session.progress")," ",r.done,"/",r.total]})]}),t("div",{className:"rm-rail","aria-label":n("session.phase"),children:g.map(o=>t(u,{size:"xs",type:"button",variant:r.phase===o?"default":"outline","aria-pressed":r.phase===o,onClick:()=>e.onPhase(o),children:n(`phase.${o}`)},o))}),t("div",{className:"rm-dots","aria-label":n("session.coverage"),children:g.map((o,l)=>t("span",{className:"rm-dot","data-on":l<s?"true":"false"},o))}),t("p",{className:"rm-lead",children:r.goal.length===0?n("session.noGoal"):r.goal}),i("div",{className:"rm-actions",children:[i("div",{className:"rm-action",children:[t(u,{size:"xs",type:"button",variant:a.authorization==="primary"?"default":"outline","data-tone":a.authorization,onClick:e.onAuthorize,disabled:r.authorizationRecorded,children:r.authorizationRecorded?n("session.authorizationDone"):n("session.authorization")}),t("p",{className:"rm-hint",children:n("session.authorizationHint")})]}),t("div",{className:"rm-action",children:t(u,{size:"xs",type:"button",variant:a.report==="primary"?"default":"outline","data-tone":a.report,onClick:e.onReport,disabled:r.reportOpen,children:r.reportOpen?n("session.reportOpen"):n("session.report")})}),i("div",{className:"rm-action",children:[t(u,{size:"xs",type:"button",variant:"outline","data-tone":"secondary",onClick:e.onRemind,children:n("session.reminder")}),t("p",{className:"rm-hint",children:n("session.reminderHint")})]})]}),i("div",{className:"rm-card",children:[t("h3",{className:"rm-title",children:n("session.denials")}),r.denials.length===0?t(m,{title:n("session.noDenials")}):r.denials.map(o=>i("p",{className:"rm-banner",role:"status",children:[o.tool,": ",o.reason]},`${o.at}-${o.tool}`))]}),i("div",{className:"rm-card",children:[t("h3",{className:"rm-title",children:n("session.notes")}),r.notes.length===0?t(m,{title:n("session.noNotes")}):t("ul",{className:"rm-note",children:r.notes.map(o=>t("li",{children:o},o))})]})]})})})]})}function Z(e){if(e.threadId===null||e.threadId.length===0||e.session===null||e.session.modeId===null)return null;let n=e.session.total>0&&e.session.done>=e.session.total;return i("span",{className:"rm-chip","data-done":n?"true":"false",children:[i("span",{children:[e.t("header.progress")," ",e.session.done,"/",e.session.total]}),i("span",{children:[e.t("header.denials")," ",e.session.denials.length]})]})}var he=`
|
|
1
|
+
var ne=window.__ycodiumPluginHost.react;var{Activity:Ce,Children:Ee,Component:te,Fragment:re,Profiler:Te,PureComponent:Re,StrictMode:Pe,Suspense:Ie,__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE:Me,__COMPILER_RUNTIME:Ae,act:De,cache:_e,cacheSignal:ze,captureOwnerStack:Oe,cloneElement:Be,createContext:z,createElement:N,createRef:Le,forwardRef:$e,isValidElement:He,lazy:Fe,memo:oe,startTransition:Ue,unstable_useCacheRefresh:Ve,use:O,useActionState:Ge,useCallback:v,useContext:Ke,useDebugValue:We,useDeferredValue:Xe,useEffect:w,useEffectEvent:je,useId:Ye,useImperativeHandle:qe,useInsertionEffect:ie,useLayoutEffect:Je,useMemo:ae,useOptimistic:Ze,useReducer:Qe,useRef:T,useState:f,useSyncExternalStore:se,useTransition:en,version:nn}=ne;var{jsx:t,jsxs:i,Fragment:R}=window.__ycodiumPluginHost.jsxRuntime;var B=z(null);function b(e){return N(B,{value:e.bridge},e.children)}var le=new Set(["Collapsible","CollapsiblePanel","CollapsibleTrigger"]);function p(e){let n=r=>{let o=O(B)?.ui?.[e];return o===void 0?le.has(e)?N("div",{className:r.className},r.children):null:N(o,r)};return n.displayName=e,n}var P="[a-zA-Z][a-zA-Z0-9:_-]*";var de="ycodium",Cn=`${de}:`,En=new RegExp(String.raw`(^|\s)([$/])(${P})(?=\s|$)`,"g");var Tn=new RegExp(String.raw`([$/])(${P})(?=\s|$)`,"y");var Rn=new RegExp(String.raw`^/(${P})$`);var u=p("Button"),L=p("Collapsible"),$=p("CollapsibleTrigger"),H=p("CollapsiblePanel"),m=p("EmptyInline"),F=p("ChevronDown");var h="redteam-model",g=["authorization","scope","evidence","report"],U=[{id:"redteam",group:"general"},{id:"pentest",group:"professional"},{id:"code-audit",group:"professional"},{id:"binary-analysis",group:"professional"},{id:"attack-defense",group:"professional"},{id:"av-evasion",group:"professional"},{id:"incident-response",group:"professional"},{id:"cloud-security",group:"professional"},{id:"ctf-solver",group:"professional"},{id:"asset-mapping",group:"professional"}],ue={redteam:{displayName:"Researcher",detail:"General session. Gates are optional."},pentest:{displayName:"Assessment",detail:"Authorized review."},"code-audit":{displayName:"Code review",detail:"Source review."},"binary-analysis":{displayName:"Binary review",detail:"Binary review."},"attack-defense":{displayName:"Exercise",detail:"Authorized exercise."},"av-evasion":{displayName:"Detection review",detail:"Detection review. No evasion steps, payloads, or refusal bypass."},"incident-response":{displayName:"Incident review",detail:"Incident review."},"cloud-security":{displayName:"Cloud review",detail:"Cloud review."},"ctf-solver":{displayName:"Puzzle workspace",detail:"Puzzle workspace."},"asset-mapping":{displayName:"Asset inventory",detail:"Inventory workflow."}};function ce(e){let n=U.find(s=>s.id===e);if(n===void 0)return null;let r=ue[n.id];return{id:n.id,group:n.group,...r}}function I(){return U.map(e=>ce(e.id)).filter(e=>e!==null)}var V="board",St={gates:`${h}_gates_list`,goal:`${h}_operation_goal`,progress:`${h}_operation_progress`,publish:`${h}_publish`,probe:`${h}_probe`,note:`${h}_ledger_note`};function G(e){let{t:n}=e,[r,s]=f(e.initialProfessionalOpen===!0),[a,o]=f(e.presetId??null),[l,c]=f(!1),x=I(),C=x.filter(d=>d.group==="general"),y=x.filter(d=>d.group==="professional");w(()=>{o(e.presetId??null)},[e.presetId]),w(()=>{let d=k=>{let _=k.detail;o(typeof _?.presetId=="string"?_.presetId:null)};return window.addEventListener("ycodium-draft-preset",d),()=>window.removeEventListener("ycodium-draft-preset",d)},[]);let E=d=>{if(o(d),!e.deployed)return;if(typeof e.onSelectPreset=="function"){e.onSelectPreset(d),c(!1);return}let k=e.bridge.agentPreset?.select;if(k!==void 0){k(d),c(!1);return}c(!0)};return i("section",{className:"rm-hero",children:[t("p",{className:"rm-kicker",children:n("hero.title")}),e.deployed?null:t("p",{className:"rm-banner",children:n("hero.deployFirst")}),e.selectable===!1?t("p",{className:"rm-muted",children:n("hero.readOnly")}):null,l?t("p",{className:"rm-muted",children:n("hero.unwired")}):null,i("div",{className:"rm-modes",children:[C.map(d=>t(u,{size:"xs",type:"button",variant:a===d.id?"default":"outline",disabled:!e.deployed,"aria-pressed":a===d.id,onClick:()=>E(d.id),children:n(`mode.${d.id}.name`)},d.id)),t(u,{size:"xs",variant:"outline",type:"button","aria-expanded":r,onClick:()=>s(d=>!d),children:n(r?"hero.hideProfessional":"hero.professional")}),a===null?null:t(u,{size:"xs",variant:"outline",type:"button",disabled:!e.deployed,onClick:()=>E(null),children:n("hero.clear")})]}),r?t("div",{className:"rm-modes",children:y.map(d=>t(u,{size:"xs",type:"button",variant:a===d.id?"default":"outline",disabled:!e.deployed,"aria-pressed":a===d.id,onClick:()=>E(d.id),children:t("span",{children:n(`mode.${d.id}.name`)})},d.id))}):null,a===null?null:t("p",{className:"rm-muted",children:n("hero.selected")})]})}var pe=12,me=20;function M(e=null){return{modeId:e,phase:"authorization",goal:"",done:0,total:g.length,reportOpen:!1,authorizationRecorded:!1,denials:[],notes:[]}}function K(e){if(typeof e!="object"||e===null)return null;let n=e;return typeof n.deployed!="boolean"||!Array.isArray(n.modules)||!Array.isArray(n.modes)?null:n}function ge(e){return g.includes(e)}function W(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function fe(e){return!W(e)||typeof e.tool!="string"||typeof e.reason!="string"?null:{tool:e.tool,code:typeof e.code=="string"?e.code:"denied",reason:e.reason,at:typeof e.at=="string"?e.at:""}}function X(e){if(!W(e))return M();let n=typeof e.phase=="string"&&ge(e.phase)?e.phase:"authorization",r=Array.isArray(e.denials)?e.denials.flatMap(a=>{let o=fe(a);return o===null?[]:[o]}):[],s=Array.isArray(e.notes)?e.notes.filter(a=>typeof a=="string").slice(0,me):[];return{modeId:typeof e.modeId=="string"?e.modeId:null,phase:n,goal:typeof e.goal=="string"?e.goal:"",done:typeof e.done=="number"?e.done:0,total:typeof e.total=="number"?e.total:g.length,reportOpen:e.reportOpen===!0,authorizationRecorded:e.authorizationRecorded===!0,denials:r.slice(0,pe),notes:s}}var ye={};function S(e){return e.i18n.usePluginTranslation()}function be(e,n){return e!==null?{next:e,claimed:!1}:{next:n,claimed:!0}}function j(e){return{disabled:e!==null,labelKey:e==="deploy"?"settings.deploying":"settings.deploy"}}function A(e){let n=e.commands.useSubscription("live",ye),r=n.data,s=r?.board===void 0?null:K(r.board),a=T(null),[o,l]=f(null),c=v(async(x,C={})=>{let y=be(a.current,x);if(!(!y.claimed||y.next===null)){a.current=y.next,l(y.next);try{await e.commands.invoke(x,C)}finally{a.current=null,l(null)}}},[e]);return{board:s,pending:n.isPending,error:n.error,runningCommand:o,run:c}}function D(e,n){let r=e.sessionProjections.useProjection(V,n||null),s=r,a=n===null||n.length===0?null:s.present?X(s.value):M(),o=v(async(l,c={})=>{await e.commands.invoke(l,{threadId:n??"",...c})},[e,n]);return{session:a,pending:r.isPending,isUnavailable:r.isUnavailable,error:r.error,run:o}}function Y(e){let{t:n,board:r}=e,s=e.runningCommand!==null,a=j(e.runningCommand);return r===null?t("section",{className:"rm-root",children:t(m,{title:e.pending?n("common.loading"):n("common.empty")})}):i("section",{className:"rm-root",children:[t("header",{className:"rm-head",children:t("span",{className:r.deployed?"rm-pill rm-pill-ok":"rm-pill",children:r.deployed?n("settings.deployed"):n("settings.notDeployed")})}),i("div",{className:"rm-card",children:[i("div",{className:"rm-actions",children:[t(u,{size:"xs",variant:"default",type:"button",onClick:e.onDeploy,disabled:a.disabled,children:n(a.labelKey)}),t(u,{size:"xs",variant:"outline",type:"button",onClick:e.onRemove,disabled:!r.deployed||s,children:n("settings.remove")}),t(u,{size:"xs",variant:"outline",type:"button",onClick:e.onRepair,disabled:s,children:n("settings.repair")}),t(u,{size:"xs",variant:"outline",type:"button",onClick:()=>e.onProbe(!r.probeDenial),disabled:s,children:r.probeDenial?n("settings.probeHold"):n("settings.probeAllow")})]}),t("p",{className:"rm-lead",children:n("settings.routing")}),r.lastDenial===null?t("p",{className:"rm-muted",children:n("settings.noDenial")}):i("p",{className:"rm-banner",role:"status",children:[n("settings.denial")," ",r.lastDenial.tool,": ",r.lastDenial.reason]})]}),i("div",{className:"rm-card",children:[t("h3",{className:"rm-title",children:n("settings.modes")}),["general","professional"].map(o=>i("div",{children:[t("p",{className:"rm-kicker",children:n(`group.${o}`)}),t("p",{className:"rm-muted",children:n(`group.${o}Note`)}),t("div",{className:"rm-modes",children:r.modes.filter(l=>l.group===o).map(l=>i("article",{className:"rm-card",children:[t("strong",{children:n(`mode.${l.id}.name`)}),l.id==="av-evasion"?t("p",{className:"rm-muted",children:n("mode.av-evasion.detail")}):null]},l.id))})]},o))]}),i("div",{className:"rm-card",children:[t("h3",{className:"rm-title",children:n("settings.modules")}),t("p",{className:"rm-lead",children:n("settings.withheldNote")}),r.modules.map(o=>i("div",{className:"rm-module",children:[i("div",{children:[t("strong",{children:n(`module.${o.id}`)}),i("p",{className:"rm-muted",children:[n(`availability.${o.availability}`),","," ",o.installed?n("common.installed"):n("common.absent")]})]}),i("div",{className:"rm-actions",children:[t(u,{size:"xs",variant:"outline",type:"button",disabled:s,onClick:()=>e.onInstall(o.id),children:n("settings.install")}),t(u,{size:"xs",variant:"outline",type:"button",disabled:!o.installed||s,onClick:()=>e.onUpdate(o.id),children:n("settings.update")}),t(u,{size:"xs",variant:"outline",type:"button",disabled:!o.installed||s,onClick:()=>e.onUninstall(o.id),children:n("settings.uninstall")})]})]},o.id)),t("p",{className:"rm-muted",children:n("settings.mcpNote")})]}),i("div",{className:"rm-card",children:[t("h3",{className:"rm-title",children:n("settings.operations")}),r.operations.length===0?t("p",{className:"rm-muted",children:n("settings.noOperations")}):t("ul",{className:"rm-log",children:r.operations.map(o=>i("li",{children:[i("span",{children:[o.kind,", ",n(`op.${o.status}`)]}),t("span",{className:"rm-muted",children:o.detail})]},o.id))})]})]})}function q(e){return{authorization:e.authorizationRecorded?"secondary":"primary",report:e.authorizationRecorded&&!e.reportOpen?"primary":"secondary"}}function J(e){let{t:n,session:r}=e;if(e.threadId===null||e.threadId.length===0||r===null||r.modeId===null)return null;let s=Math.min(r.done,g.length),a=q(r);return i(L,{className:"rm-seat",defaultOpen:!0,children:[i($,{className:"rm-seat-trigger",children:[t(F,{className:"rm-seat-chevron"}),n("session.title")]}),t(H,{children:t("div",{className:"rm-seat-body",children:i("section",{className:"rm-session",children:[i("header",{className:"rm-head",children:[t("div",{children:t("p",{className:"rm-muted",children:n(`mode.${r.modeId}.name`)})}),i("span",{className:"rm-pill",children:[n("session.progress")," ",r.done,"/",r.total]})]}),t("div",{className:"rm-rail","aria-label":n("session.phase"),children:g.map(o=>t(u,{size:"xs",type:"button",variant:r.phase===o?"default":"outline","aria-pressed":r.phase===o,onClick:()=>e.onPhase(o),children:n(`phase.${o}`)},o))}),t("div",{className:"rm-dots","aria-label":n("session.coverage"),children:g.map((o,l)=>t("span",{className:"rm-dot","data-on":l<s?"true":"false"},o))}),t("p",{className:"rm-lead",children:r.goal.length===0?n("session.noGoal"):r.goal}),i("div",{className:"rm-actions",children:[i("div",{className:"rm-action",children:[t(u,{size:"xs",type:"button",variant:a.authorization==="primary"?"default":"outline","data-tone":a.authorization,onClick:e.onAuthorize,disabled:r.authorizationRecorded,children:r.authorizationRecorded?n("session.authorizationDone"):n("session.authorization")}),t("p",{className:"rm-hint",children:n("session.authorizationHint")})]}),t("div",{className:"rm-action",children:t(u,{size:"xs",type:"button",variant:a.report==="primary"?"default":"outline","data-tone":a.report,onClick:e.onReport,disabled:r.reportOpen,children:r.reportOpen?n("session.reportOpen"):n("session.report")})}),i("div",{className:"rm-action",children:[t(u,{size:"xs",type:"button",variant:"outline","data-tone":"secondary",onClick:e.onRemind,children:n("session.reminder")}),t("p",{className:"rm-hint",children:n("session.reminderHint")})]})]}),i("div",{className:"rm-card",children:[t("h3",{className:"rm-title",children:n("session.denials")}),r.denials.length===0?t(m,{title:n("session.noDenials")}):r.denials.map(o=>i("p",{className:"rm-banner",role:"status",children:[o.tool,": ",o.reason]},`${o.at}-${o.tool}`))]}),i("div",{className:"rm-card",children:[t("h3",{className:"rm-title",children:n("session.notes")}),r.notes.length===0?t(m,{title:n("session.noNotes")}):t("ul",{className:"rm-note",children:r.notes.map(o=>t("li",{children:o},o))})]})]})})})]})}function Z(e){if(e.threadId===null||e.threadId.length===0||e.session===null||e.session.modeId===null)return null;let n=e.session.total>0&&e.session.done>=e.session.total;return i("span",{className:"rm-chip","data-done":n?"true":"false",children:[i("span",{children:[e.t("header.progress")," ",e.session.done,"/",e.session.total]}),i("span",{children:[e.t("header.denials")," ",e.session.denials.length]})]})}var he=`
|
|
2
2
|
.rm-root, .rm-hero, .rm-session, .rm-chip {
|
|
3
3
|
color: var(--foreground);
|
|
4
4
|
font: inherit;
|
package/dist/index.js
CHANGED
package/locales/zh-CN.json
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"repair": "修复",
|
|
18
18
|
"deployed": "已部署",
|
|
19
19
|
"notDeployed": "未部署",
|
|
20
|
-
"routing": "
|
|
20
|
+
"routing": "模型路由留在执行器上。选择模式不会切换 provider、端点或凭据。",
|
|
21
21
|
"probeHold": "探针保持拦截",
|
|
22
22
|
"probeAllow": "探针已放行",
|
|
23
23
|
"denial": "最近一次拒绝",
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"refusal-guard": "绕过拒绝",
|
|
93
93
|
"trace-vault": "痕迹库",
|
|
94
94
|
"auto-advance": "提醒",
|
|
95
|
-
"product-subagents": "
|
|
95
|
+
"product-subagents": "子智能体",
|
|
96
96
|
"mcp-studio": "服务列表",
|
|
97
97
|
"results": "结果",
|
|
98
98
|
"hunter": "核验",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ycodium-ai/plugin-redteam-model",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5877",
|
|
4
4
|
"description": "Deploys ten session modes, a gate rail, and a tool guard. The executor keeps the model connection.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"redteam-model",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"react": "19.2.6",
|
|
25
25
|
"typescript": "~6.0.3",
|
|
26
26
|
"vite-plus": "0.2.2",
|
|
27
|
-
"@ycodium-ai/plugin-api": "0.2.
|
|
27
|
+
"@ycodium-ai/plugin-api": "0.2.5877",
|
|
28
28
|
"ycodium-plugin-testing": "0.0.0",
|
|
29
29
|
"@ycodium/contracts": "0.0.33"
|
|
30
30
|
},
|