@ycodium-ai/plugin-redteam-model 0.2.3614 → 0.2.3671

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/README.md CHANGED
@@ -4,7 +4,7 @@ Deploys ten session modes, a gate rail, and a tool guard. The executor keeps the
4
4
 
5
5
  ## What it does
6
6
 
7
- Settings can deploy or remove the ten presets and install the modules this package is allowed to run. A session view shows the four gates, a refusal, notes, and a reminder you send yourself. The preset seat offers the general mode first and the professional modes behind a button.
7
+ Settings can deploy or remove the ten presets and install the modules this package is allowed to run. A session view shows the four gates, a refusal, notes, and a reminder you send yourself. The preset seat offers the general mode first and the professional modes behind a button. With the sec-enforce module installed, professional modes refuse the publish tool and reports/ paths until the report gate is open; the other gates are not enforced by code.
8
8
 
9
9
  The manager is stored in the plugin data directory on the machine.
10
10
 
package/assets/ui.js CHANGED
@@ -1,4 +1,4 @@
1
- var Z=window.__ycodiumPluginHost.react;var{Activity:ye,Children:fe,Component:he,Fragment:be,Profiler:xe,PureComponent:ve,StrictMode:Se,Suspense:we,__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE:Ne,__COMPILER_RUNTIME:Pe,act:ke,cache:Me,cacheSignal:Re,captureOwnerStack:Ie,cloneElement:Ce,createContext:z,createElement:P,createRef:De,forwardRef:Ee,isValidElement:ze,lazy:Be,memo:Oe,startTransition:Ae,unstable_useCacheRefresh:_e,use:B,useActionState:Te,useCallback:k,useContext:Ue,useDebugValue:He,useDeferredValue:$e,useEffect:M,useEffectEvent:Ve,useId:Le,useImperativeHandle:Fe,useInsertionEffect:Ge,useLayoutEffect:qe,useMemo:je,useOptimistic:Xe,useReducer:Ye,useRef:O,useState:y,useSyncExternalStore:Ke,useTransition:Je,version:We}=Z;var{jsx:t,jsxs:a,Fragment:Ze}=window.__ycodiumPluginHost.jsxRuntime;var A=z(null);function S(e){return t(A,{value:e.bridge,children:e.children})}var ee=new Set(["Collapsible","CollapsiblePanel","CollapsibleTrigger"]);function f(e){let n=r=>{let o=B(A)?.ui?.[e];return o===void 0?ee.has(e)?P("div",{className:r.className},r.children):null:P(o,r)};return n.displayName=e,n}var u=f("Button"),_=f("Collapsible"),T=f("CollapsibleTrigger"),U=f("CollapsiblePanel"),c=f("EmptyInline"),H=f("ChevronDown");var h="redteam-model",m=["authorization","scope","evidence","report"],$=[{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"}],ne={redteam:{displayName:"Researcher",detail:"General session. Gates are optional."},pentest:{displayName:"Assessment",detail:"Authorized review with the four gates required."},"code-audit":{displayName:"Code review",detail:"Source review with the four gates required."},"binary-analysis":{displayName:"Binary review",detail:"Binary review with the four gates required."},"attack-defense":{displayName:"Exercise",detail:"Authorized exercise with the four gates required."},"av-evasion":{displayName:"Detection review",detail:"Detection review. No evasion steps, payloads, or refusal bypass."},"incident-response":{displayName:"Incident review",detail:"Incident review with the four gates required."},"cloud-security":{displayName:"Cloud review",detail:"Cloud review with the four gates required."},"ctf-solver":{displayName:"Puzzle workspace",detail:"Puzzle workspace with the four gates required."},"asset-mapping":{displayName:"Asset inventory",detail:"Inventory workflow with the four gates required."}};function te(e){let n=$.find(s=>s.id===e);if(n===void 0)return null;let r=ne[n.id];return{id:n.id,group:n.group,...r}}function R(){return $.map(e=>te(e.id)).filter(e=>e!==null)}var V="board",on={gates:`${h}_gates_list`,goal:`${h}_operation_goal`,progress:`${h}_operation_progress`,publish:`${h}_publish`,probe:`${h}_probe`,note:`${h}_ledger_note`};function L(e){let{t:n}=e,[r,s]=y(e.initialProfessionalOpen===!0),[i,o]=y(e.presetId??null),[l,p]=y(!1),b=R(),w=b.filter(d=>d.group==="general"),g=b.filter(d=>d.group==="professional");M(()=>{o(e.presetId??null)},[e.presetId]),M(()=>{let d=v=>{let E=v.detail;o(typeof E?.presetId=="string"?E.presetId:null)};return window.addEventListener("ycodium-draft-preset",d),()=>window.removeEventListener("ycodium-draft-preset",d)},[]);let N=d=>{if(o(d),!e.deployed)return;if(typeof e.onSelectPreset=="function"){e.onSelectPreset(d),p(!1);return}let v=e.bridge.agentPreset?.select;if(v!==void 0){v(d),p(!1);return}p(!0)};return a("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,a("div",{className:"rm-modes",children:[w.map(d=>t(u,{size:"xs",type:"button",variant:i===d.id?"default":"outline",disabled:!e.deployed,"aria-pressed":i===d.id,onClick:()=>N(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")}),i===null?null:t(u,{size:"xs",variant:"outline",type:"button",disabled:!e.deployed,onClick:()=>N(null),children:n("hero.clear")})]}),r?t("div",{className:"rm-modes",children:g.map(d=>t(u,{size:"xs",type:"button",variant:i===d.id?"default":"outline",disabled:!e.deployed,"aria-pressed":i===d.id,onClick:()=>N(d.id),children:t("span",{children:n(`mode.${d.id}.name`)})},d.id))}):null,i===null?null:t("p",{className:"rm-muted",children:n("hero.selected")})]})}var re=12,oe=20;function I(e=null){return{modeId:e,phase:"authorization",goal:"",done:0,total:m.length,reportOpen:!1,authorizationRecorded:!1,denials:[],notes:[]}}function F(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 ae(e){return m.includes(e)}function G(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function ie(e){return!G(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 q(e){if(!G(e))return I();let n=typeof e.phase=="string"&&ae(e.phase)?e.phase:"authorization",r=Array.isArray(e.denials)?e.denials.flatMap(i=>{let o=ie(i);return o===null?[]:[o]}):[],s=Array.isArray(e.notes)?e.notes.filter(i=>typeof i=="string").slice(0,oe):[];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:m.length,reportOpen:e.reportOpen===!0,authorizationRecorded:e.authorizationRecorded===!0,denials:r.slice(0,re),notes:s}}var se={};function x(e){return e.i18n.usePluginTranslation()}function le(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 C(e){let n=e.commands.useSubscription("live",se),r=n.data,s=r?.board===void 0?null:F(r.board),i=O(null),[o,l]=y(null),p=k(async(b,w={})=>{let g=le(i.current,b);if(!(!g.claimed||g.next===null)){i.current=g.next,l(g.next);try{await e.commands.invoke(b,w)}finally{i.current=null,l(null)}}},[e]);return{board:s,pending:n.isPending,error:n.error,runningCommand:o,run:p}}function D(e,n){let r=e.sessionProjections.useProjection(V,n||null),s=r,i=n===null||n.length===0?null:s.present?q(s.value):I(),o=k(async(l,p={})=>{await e.commands.invoke(l,{threadId:n??"",...p})},[e,n]);return{session:i,pending:r.isPending,isUnavailable:r.isUnavailable,error:r.error,run:o}}function X(e){let{t:n,board:r}=e,s=e.runningCommand!==null,i=j(e.runningCommand);return r===null?t("section",{className:"rm-root",children:t(c,{title:e.pending?n("common.loading"):n("common.empty")})}):a("section",{className:"rm-root",children:[a("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")})]}),a("div",{className:"rm-card",children:[a("div",{className:"rm-actions",children:[t(u,{size:"xs",variant:"default",type:"button",onClick:e.onDeploy,disabled:i.disabled,children:n(i.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")}):a("p",{className:"rm-banner",role:"status",children:[n("settings.denial")," ",r.lastDenial.tool,": ",r.lastDenial.reason]})]}),a("div",{className:"rm-card",children:[t("h3",{className:"rm-title",children:n("settings.modes")}),["general","professional"].map(o=>a("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=>a("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))]}),a("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=>a("div",{className:"rm-module",children:[a("div",{children:[t("strong",{children:n(`module.${o.id}`)}),a("p",{className:"rm-muted",children:[n(`availability.${o.availability}`),","," ",o.installed?n("common.installed"):n("common.absent")]})]}),a("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")})]}),a("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=>a("li",{children:[a("span",{children:[o.kind,", ",n(`op.${o.status}`)]}),t("span",{className:"rm-muted",children:o.detail})]},o.id))})]})]})}function Y(e){return{authorization:e.authorizationRecorded?"secondary":"primary",report:e.authorizationRecorded&&!e.reportOpen?"primary":"secondary"}}function K(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,m.length),i=Y(r);return a(_,{className:"rm-seat",defaultOpen:!0,children:[a(T,{className:"rm-seat-trigger",children:[t(H,{className:"rm-seat-chevron"}),n("session.title")]}),t(U,{children:t("div",{className:"rm-seat-body",children:a("section",{className:"rm-session",children:[a("header",{className:"rm-head",children:[t("div",{children:t("p",{className:"rm-muted",children:n(`mode.${r.modeId}.name`)})}),a("span",{className:"rm-pill",children:[n("session.progress")," ",r.done,"/",r.total]})]}),t("div",{className:"rm-rail","aria-label":n("session.phase"),children:m.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:m.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}),a("div",{className:"rm-actions",children:[a("div",{className:"rm-action",children:[t(u,{size:"xs",type:"button",variant:i.authorization==="primary"?"default":"outline","data-tone":i.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:i.report==="primary"?"default":"outline","data-tone":i.report,onClick:e.onReport,disabled:r.reportOpen,children:r.reportOpen?n("session.reportOpen"):n("session.report")})}),a("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")})]})]}),a("div",{className:"rm-card",children:[t("h3",{className:"rm-title",children:n("session.denials")}),r.denials.length===0?t(c,{title:n("session.noDenials")}):r.denials.map(o=>a("p",{className:"rm-banner",role:"status",children:[o.tool,": ",o.reason]},`${o.at}-${o.tool}`))]}),a("div",{className:"rm-card",children:[t("h3",{className:"rm-title",children:n("session.notes")}),r.notes.length===0?t(c,{title:n("session.noNotes")}):t("ul",{className:"rm-note",children:r.notes.map(o=>t("li",{children:o},o))})]})]})})})]})}function J(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 a("span",{className:"rm-chip","data-done":n?"true":"false",children:[a("span",{children:[e.t("header.progress")," ",e.session.done,"/",e.session.total]}),a("span",{children:[e.t("header.denials")," ",e.session.denials.length]})]})}var de=`
1
+ var Z=window.__ycodiumPluginHost.react;var{Activity:ye,Children:fe,Component:he,Fragment:be,Profiler:xe,PureComponent:ve,StrictMode:Se,Suspense:Ne,__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE:we,__COMPILER_RUNTIME:Pe,act:ke,cache:Me,cacheSignal:Re,captureOwnerStack:Ie,cloneElement:Ce,createContext:z,createElement:P,createRef:De,forwardRef:Ee,isValidElement:ze,lazy:Be,memo:Oe,startTransition:Ae,unstable_useCacheRefresh:_e,use:B,useActionState:Te,useCallback:k,useContext:Ue,useDebugValue:He,useDeferredValue:$e,useEffect:M,useEffectEvent:Ve,useId:Le,useImperativeHandle:Fe,useInsertionEffect:Ge,useLayoutEffect:je,useMemo:Xe,useOptimistic:Ye,useReducer:Ke,useRef:O,useState:y,useSyncExternalStore:qe,useTransition:Je,version:We}=Z;var{jsx:t,jsxs:a,Fragment:Ze}=window.__ycodiumPluginHost.jsxRuntime;var A=z(null);function S(e){return t(A,{value:e.bridge,children:e.children})}var ee=new Set(["Collapsible","CollapsiblePanel","CollapsibleTrigger"]);function f(e){let n=o=>{let r=B(A)?.ui?.[e];return r===void 0?ee.has(e)?P("div",{className:o.className},o.children):null:P(r,o)};return n.displayName=e,n}var u=f("Button"),_=f("Collapsible"),T=f("CollapsibleTrigger"),U=f("CollapsiblePanel"),c=f("EmptyInline"),H=f("ChevronDown");var h="redteam-model",m=["authorization","scope","evidence","report"],$=[{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"}],ne={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 te(e){let n=$.find(s=>s.id===e);if(n===void 0)return null;let o=ne[n.id];return{id:n.id,group:n.group,...o}}function R(){return $.map(e=>te(e.id)).filter(e=>e!==null)}var V="board",rn={gates:`${h}_gates_list`,goal:`${h}_operation_goal`,progress:`${h}_operation_progress`,publish:`${h}_publish`,probe:`${h}_probe`,note:`${h}_ledger_note`};function L(e){let{t:n}=e,[o,s]=y(e.initialProfessionalOpen===!0),[i,r]=y(e.presetId??null),[l,p]=y(!1),b=R(),N=b.filter(d=>d.group==="general"),g=b.filter(d=>d.group==="professional");M(()=>{r(e.presetId??null)},[e.presetId]),M(()=>{let d=v=>{let E=v.detail;r(typeof E?.presetId=="string"?E.presetId:null)};return window.addEventListener("ycodium-draft-preset",d),()=>window.removeEventListener("ycodium-draft-preset",d)},[]);let w=d=>{if(r(d),!e.deployed)return;if(typeof e.onSelectPreset=="function"){e.onSelectPreset(d),p(!1);return}let v=e.bridge.agentPreset?.select;if(v!==void 0){v(d),p(!1);return}p(!0)};return a("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,a("div",{className:"rm-modes",children:[N.map(d=>t(u,{size:"xs",type:"button",variant:i===d.id?"default":"outline",disabled:!e.deployed,"aria-pressed":i===d.id,onClick:()=>w(d.id),children:n(`mode.${d.id}.name`)},d.id)),t(u,{size:"xs",variant:"outline",type:"button","aria-expanded":o,onClick:()=>s(d=>!d),children:n(o?"hero.hideProfessional":"hero.professional")}),i===null?null:t(u,{size:"xs",variant:"outline",type:"button",disabled:!e.deployed,onClick:()=>w(null),children:n("hero.clear")})]}),o?t("div",{className:"rm-modes",children:g.map(d=>t(u,{size:"xs",type:"button",variant:i===d.id?"default":"outline",disabled:!e.deployed,"aria-pressed":i===d.id,onClick:()=>w(d.id),children:t("span",{children:n(`mode.${d.id}.name`)})},d.id))}):null,i===null?null:t("p",{className:"rm-muted",children:n("hero.selected")})]})}var oe=12,re=20;function I(e=null){return{modeId:e,phase:"authorization",goal:"",done:0,total:m.length,reportOpen:!1,authorizationRecorded:!1,denials:[],notes:[]}}function F(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 ae(e){return m.includes(e)}function G(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function ie(e){return!G(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 j(e){if(!G(e))return I();let n=typeof e.phase=="string"&&ae(e.phase)?e.phase:"authorization",o=Array.isArray(e.denials)?e.denials.flatMap(i=>{let r=ie(i);return r===null?[]:[r]}):[],s=Array.isArray(e.notes)?e.notes.filter(i=>typeof i=="string").slice(0,re):[];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:m.length,reportOpen:e.reportOpen===!0,authorizationRecorded:e.authorizationRecorded===!0,denials:o.slice(0,oe),notes:s}}var se={};function x(e){return e.i18n.usePluginTranslation()}function le(e,n){return e!==null?{next:e,claimed:!1}:{next:n,claimed:!0}}function X(e){return{disabled:e!==null,labelKey:e==="deploy"?"settings.deploying":"settings.deploy"}}function C(e){let n=e.commands.useSubscription("live",se),o=n.data,s=o?.board===void 0?null:F(o.board),i=O(null),[r,l]=y(null),p=k(async(b,N={})=>{let g=le(i.current,b);if(!(!g.claimed||g.next===null)){i.current=g.next,l(g.next);try{await e.commands.invoke(b,N)}finally{i.current=null,l(null)}}},[e]);return{board:s,pending:n.isPending,error:n.error,runningCommand:r,run:p}}function D(e,n){let o=e.sessionProjections.useProjection(V,n||null),s=o,i=n===null||n.length===0?null:s.present?j(s.value):I(),r=k(async(l,p={})=>{await e.commands.invoke(l,{threadId:n??"",...p})},[e,n]);return{session:i,pending:o.isPending,isUnavailable:o.isUnavailable,error:o.error,run:r}}function Y(e){let{t:n,board:o}=e,s=e.runningCommand!==null,i=X(e.runningCommand);return o===null?t("section",{className:"rm-root",children:t(c,{title:e.pending?n("common.loading"):n("common.empty")})}):a("section",{className:"rm-root",children:[a("header",{className:"rm-head",children:[t("div",{children:t("h2",{className:"rm-title",children:n("settings.title")})}),t("span",{className:o.deployed?"rm-pill rm-pill-ok":"rm-pill",children:o.deployed?n("settings.deployed"):n("settings.notDeployed")})]}),a("div",{className:"rm-card",children:[a("div",{className:"rm-actions",children:[t(u,{size:"xs",variant:"default",type:"button",onClick:e.onDeploy,disabled:i.disabled,children:n(i.labelKey)}),t(u,{size:"xs",variant:"outline",type:"button",onClick:e.onRemove,disabled:!o.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(!o.probeDenial),disabled:s,children:o.probeDenial?n("settings.probeHold"):n("settings.probeAllow")})]}),t("p",{className:"rm-lead",children:n("settings.routing")}),o.lastDenial===null?t("p",{className:"rm-muted",children:n("settings.noDenial")}):a("p",{className:"rm-banner",role:"status",children:[n("settings.denial")," ",o.lastDenial.tool,": ",o.lastDenial.reason]})]}),a("div",{className:"rm-card",children:[t("h3",{className:"rm-title",children:n("settings.modes")}),["general","professional"].map(r=>a("div",{children:[t("p",{className:"rm-kicker",children:n(`group.${r}`)}),t("p",{className:"rm-muted",children:n(`group.${r}Note`)}),t("div",{className:"rm-modes",children:o.modes.filter(l=>l.group===r).map(l=>a("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))})]},r))]}),a("div",{className:"rm-card",children:[t("h3",{className:"rm-title",children:n("settings.modules")}),t("p",{className:"rm-lead",children:n("settings.withheldNote")}),o.modules.map(r=>a("div",{className:"rm-module",children:[a("div",{children:[t("strong",{children:n(`module.${r.id}`)}),a("p",{className:"rm-muted",children:[n(`availability.${r.availability}`),","," ",r.installed?n("common.installed"):n("common.absent")]})]}),a("div",{className:"rm-actions",children:[t(u,{size:"xs",variant:"outline",type:"button",disabled:s,onClick:()=>e.onInstall(r.id),children:n("settings.install")}),t(u,{size:"xs",variant:"outline",type:"button",disabled:!r.installed||s,onClick:()=>e.onUpdate(r.id),children:n("settings.update")}),t(u,{size:"xs",variant:"outline",type:"button",disabled:!r.installed||s,onClick:()=>e.onUninstall(r.id),children:n("settings.uninstall")})]})]},r.id)),t("p",{className:"rm-muted",children:n("settings.mcpNote")})]}),a("div",{className:"rm-card",children:[t("h3",{className:"rm-title",children:n("settings.operations")}),o.operations.length===0?t("p",{className:"rm-muted",children:n("settings.noOperations")}):t("ul",{className:"rm-log",children:o.operations.map(r=>a("li",{children:[a("span",{children:[r.kind,", ",n(`op.${r.status}`)]}),t("span",{className:"rm-muted",children:r.detail})]},r.id))})]})]})}function K(e){return{authorization:e.authorizationRecorded?"secondary":"primary",report:e.authorizationRecorded&&!e.reportOpen?"primary":"secondary"}}function q(e){let{t:n,session:o}=e;if(e.threadId===null||e.threadId.length===0||o===null||o.modeId===null)return null;let s=Math.min(o.done,m.length),i=K(o);return a(_,{className:"rm-seat",defaultOpen:!0,children:[a(T,{className:"rm-seat-trigger",children:[t(H,{className:"rm-seat-chevron"}),n("session.title")]}),t(U,{children:t("div",{className:"rm-seat-body",children:a("section",{className:"rm-session",children:[a("header",{className:"rm-head",children:[t("div",{children:t("p",{className:"rm-muted",children:n(`mode.${o.modeId}.name`)})}),a("span",{className:"rm-pill",children:[n("session.progress")," ",o.done,"/",o.total]})]}),t("div",{className:"rm-rail","aria-label":n("session.phase"),children:m.map(r=>t(u,{size:"xs",type:"button",variant:o.phase===r?"default":"outline","aria-pressed":o.phase===r,onClick:()=>e.onPhase(r),children:n(`phase.${r}`)},r))}),t("div",{className:"rm-dots","aria-label":n("session.coverage"),children:m.map((r,l)=>t("span",{className:"rm-dot","data-on":l<s?"true":"false"},r))}),t("p",{className:"rm-lead",children:o.goal.length===0?n("session.noGoal"):o.goal}),a("div",{className:"rm-actions",children:[a("div",{className:"rm-action",children:[t(u,{size:"xs",type:"button",variant:i.authorization==="primary"?"default":"outline","data-tone":i.authorization,onClick:e.onAuthorize,disabled:o.authorizationRecorded,children:o.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:i.report==="primary"?"default":"outline","data-tone":i.report,onClick:e.onReport,disabled:o.reportOpen,children:o.reportOpen?n("session.reportOpen"):n("session.report")})}),a("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")})]})]}),a("div",{className:"rm-card",children:[t("h3",{className:"rm-title",children:n("session.denials")}),o.denials.length===0?t(c,{title:n("session.noDenials")}):o.denials.map(r=>a("p",{className:"rm-banner",role:"status",children:[r.tool,": ",r.reason]},`${r.at}-${r.tool}`))]}),a("div",{className:"rm-card",children:[t("h3",{className:"rm-title",children:n("session.notes")}),o.notes.length===0?t(c,{title:n("session.noNotes")}):t("ul",{className:"rm-note",children:o.notes.map(r=>t("li",{children:r},r))})]})]})})})]})}function J(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 a("span",{className:"rm-chip","data-done":n?"true":"false",children:[a("span",{children:[e.t("header.progress")," ",e.session.done,"/",e.session.total]}),a("span",{children:[e.t("header.denials")," ",e.session.denials.length]})]})}var de=`
2
2
  .rm-root, .rm-hero, .rm-session, .rm-chip {
3
3
  color: var(--foreground);
4
4
  font: inherit;
@@ -105,4 +105,4 @@ html[data-fit-content] .rm-seat-body { max-height: 240px; }
105
105
  .rm-rail { grid-template-columns: 1fr 1fr; }
106
106
  .rm-root { padding: 12px; }
107
107
  }
108
- `,W=!1;function Q(){if(W||typeof document>"u")return;W=!0;let e=document.createElement("style");e.dataset.redteamModel="1",e.textContent=de,document.head.appendChild(e)}function ue(e){let n=x(e.bridge),{board:r,pending:s,runningCommand:i,run:o}=C(e.bridge);return t(S,{bridge:e.bridge,children:t(X,{t:n,board:r,pending:s,runningCommand:i,onDeploy:()=>{o("deploy")},onRemove:()=>{o("remove")},onRepair:()=>{o("repair")},onInstall:l=>{o("module.install",{id:l})},onUpdate:l=>{o("module.update",{id:l})},onUninstall:l=>{o("module.uninstall",{id:l})},onProbe:l=>{o("fields.set",{probeDenial:l})}})})}function pe(e){let n=x(e.bridge),{board:r}=C(e.bridge);return t(S,{bridge:e.bridge,children:t(L,{bridge:e.bridge,t:n,deployed:r?.deployed===!0,presetId:e.presetId,selectable:e.selectable,onSelectPreset:e.onSelectPreset})})}function ce(e){let n=x(e.bridge),r=e.threadId??null,{session:s,run:i,isUnavailable:o,error:l}=D(e.bridge,r);return t(S,{bridge:e.bridge,children:o?t(c,{title:n("projection.unavailable")}):l!==null?t(c,{title:n("projection.readFailed")}):t(K,{t:n,session:s,threadId:r,onPhase:p=>{i("phase.set",{phase:p})},onAuthorize:()=>{i("authorization.record")},onReport:()=>{i("report.open")},onRemind:()=>{i("reminder")}})})}function me(e){let n=x(e.bridge),r=e.threadId??null,{session:s}=D(e.bridge,r);return t(J,{t:n,session:s,threadId:r})}function ge(e){return Q(),{slots:[{name:"settings.section",order:40,component(){return t(ue,{bridge:e})}},{name:"conversation.hero.agentPreset",order:10,component(n){return t(pe,{bridge:e,...n})}},{name:"conversation.view",order:30,component(n){return t(ce,{bridge:e,threadId:n.threadId})}},{name:"conversation.session.header.actions",order:30,component(n){return t(me,{bridge:e,threadId:n.threadId})}}]}}export{ge as default};
108
+ `,W=!1;function Q(){if(W||typeof document>"u")return;W=!0;let e=document.createElement("style");e.dataset.redteamModel="1",e.textContent=de,document.head.appendChild(e)}function ue(e){let n=x(e.bridge),{board:o,pending:s,runningCommand:i,run:r}=C(e.bridge);return t(S,{bridge:e.bridge,children:t(Y,{t:n,board:o,pending:s,runningCommand:i,onDeploy:()=>{r("deploy")},onRemove:()=>{r("remove")},onRepair:()=>{r("repair")},onInstall:l=>{r("module.install",{id:l})},onUpdate:l=>{r("module.update",{id:l})},onUninstall:l=>{r("module.uninstall",{id:l})},onProbe:l=>{r("fields.set",{probeDenial:l})}})})}function pe(e){let n=x(e.bridge),{board:o}=C(e.bridge);return t(S,{bridge:e.bridge,children:t(L,{bridge:e.bridge,t:n,deployed:o?.deployed===!0,presetId:e.presetId,selectable:e.selectable,onSelectPreset:e.onSelectPreset})})}function ce(e){let n=x(e.bridge),o=e.threadId??null,{session:s,run:i,isUnavailable:r,error:l}=D(e.bridge,o);return t(S,{bridge:e.bridge,children:r?t(c,{title:n("projection.unavailable")}):l!==null?t(c,{title:n("projection.readFailed")}):t(q,{t:n,session:s,threadId:o,onPhase:p=>{i("phase.set",{phase:p})},onAuthorize:()=>{i("authorization.record")},onReport:()=>{i("report.open")},onRemind:()=>{i("reminder")}})})}function me(e){let n=x(e.bridge),o=e.threadId??null,{session:s}=D(e.bridge,o);return t(J,{t:n,session:s,threadId:o})}function ge(e){return Q(),{slots:[{name:"settings.section",order:40,component(){return t(ue,{bridge:e})}},{name:"conversation.hero.agentPreset",order:10,component(n){return t(pe,{bridge:e,...n})}},{name:"conversation.view",order:30,component(n){return t(ce,{bridge:e,threadId:n.threadId})}},{name:"conversation.session.header.actions",order:30,component(n){return t(me,{bridge:e,threadId:n.threadId})}}]}}export{ge as default};
package/dist/index.js CHANGED
@@ -23,19 +23,19 @@ var MODE_COPY = {
23
23
  },
24
24
  pentest: {
25
25
  displayName: "Assessment",
26
- detail: "Authorized review with the four gates required."
26
+ detail: "Authorized review."
27
27
  },
28
28
  "code-audit": {
29
29
  displayName: "Code review",
30
- detail: "Source review with the four gates required."
30
+ detail: "Source review."
31
31
  },
32
32
  "binary-analysis": {
33
33
  displayName: "Binary review",
34
- detail: "Binary review with the four gates required."
34
+ detail: "Binary review."
35
35
  },
36
36
  "attack-defense": {
37
37
  displayName: "Exercise",
38
- detail: "Authorized exercise with the four gates required."
38
+ detail: "Authorized exercise."
39
39
  },
40
40
  "av-evasion": {
41
41
  displayName: "Detection review",
@@ -43,19 +43,19 @@ var MODE_COPY = {
43
43
  },
44
44
  "incident-response": {
45
45
  displayName: "Incident review",
46
- detail: "Incident review with the four gates required."
46
+ detail: "Incident review."
47
47
  },
48
48
  "cloud-security": {
49
49
  displayName: "Cloud review",
50
- detail: "Cloud review with the four gates required."
50
+ detail: "Cloud review."
51
51
  },
52
52
  "ctf-solver": {
53
53
  displayName: "Puzzle workspace",
54
- detail: "Puzzle workspace with the four gates required."
54
+ detail: "Puzzle workspace."
55
55
  },
56
56
  "asset-mapping": {
57
57
  displayName: "Asset inventory",
58
- detail: "Inventory workflow with the four gates required."
58
+ detail: "Inventory workflow."
59
59
  }
60
60
  };
61
61
  function modeById(id) {
@@ -1018,7 +1018,7 @@ function createTools(host) {
1018
1018
  // src/index.ts
1019
1019
  var redteamModelPlugin = definePlugin({
1020
1020
  id: "redteam-model",
1021
- apiVersion: 49,
1021
+ apiVersion: 51,
1022
1022
  activate(ctx) {
1023
1023
  const runtime = openRuntime(ctx);
1024
1024
  ctx.sessionProjections.register({ name: PROJECTION_NAME });
package/locales/en.json CHANGED
@@ -39,9 +39,7 @@
39
39
  },
40
40
  "group": {
41
41
  "general": "General",
42
- "professional": "Professional",
43
- "generalNote": "Gates are optional.",
44
- "professionalNote": "The four gates are required."
42
+ "professional": "Professional"
45
43
  },
46
44
  "availability": {
47
45
  "active": "Active",
@@ -39,9 +39,7 @@
39
39
  },
40
40
  "group": {
41
41
  "general": "通用",
42
- "professional": "专业",
43
- "generalNote": "门是可选的。",
44
- "professionalNote": "四道门都要过。"
42
+ "professional": "专业"
45
43
  },
46
44
  "availability": {
47
45
  "active": "可用",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ycodium-ai/plugin-redteam-model",
3
- "version": "0.2.3614",
3
+ "version": "0.2.3671",
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",
@@ -25,7 +25,7 @@
25
25
  "react": "19.2.6",
26
26
  "typescript": "~6.0.3",
27
27
  "vite-plus": "0.2.2",
28
- "@ycodium-ai/plugin-api": "0.2.3614",
28
+ "@ycodium-ai/plugin-api": "0.2.3671",
29
29
  "@ycodium/contracts": "0.0.33"
30
30
  },
31
31
  "ycodium": {