@ycodium-ai/plugin-redteam-model 0.0.0-stage → 0.2.2942
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 +51 -2
- package/assets/icon.svg +6 -0
- package/assets/ui.js +108 -0
- package/dist/index.js +1041 -0
- package/locales/en.json +170 -0
- package/locales/zh-CN.json +143 -0
- package/package.json +81 -3
- package/skills/redteam-model/SKILL.md +19 -0
package/README.md
CHANGED
|
@@ -1,3 +1,52 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @ycodium-ai/plugin-redteam-model
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Deploys ten session modes, a gate rail, and a tool guard. The executor keeps the model connection.
|
|
4
|
+
|
|
5
|
+
## What it does
|
|
6
|
+
|
|
7
|
+
Settings can deploy or remove the ten presets and install the modules this package is allowed to run. Install and uninstall of other plugins opens the host Plugins page. 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.
|
|
8
|
+
|
|
9
|
+
The manager is stored in the plugin data directory on the machine.
|
|
10
|
+
|
|
11
|
+
## Requirements
|
|
12
|
+
|
|
13
|
+
A Ycodium app that loads plugin API version 4, including system prompt sections, tool guards, agent presets, session projections, and the settings, preset, session, and header seats.
|
|
14
|
+
|
|
15
|
+
## Install
|
|
16
|
+
|
|
17
|
+
From a checkout, build first, then install the directory:
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
vp run --filter @ycodium-ai/plugin-redteam-model build
|
|
21
|
+
ycodium plugin add ./plugins/redteam-model
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
From a published package:
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
ycodium plugin add @ycodium-ai/plugin-redteam-model
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
The plugin is not part of the default install. Approve the declared permissions before it can add a preset, refuse a tool, or send a reminder.
|
|
31
|
+
|
|
32
|
+
## Read this before installing
|
|
33
|
+
|
|
34
|
+
Deploying modes adds ten presets to the picker. They can be chosen only before the first turn. The reminder starts a user turn on the open session. Installing or uninstalling another plugin happens on the host Plugins page, which asks for that plugin's own permissions. Withheld modules fail on purpose.
|
|
35
|
+
|
|
36
|
+
## Limits
|
|
37
|
+
|
|
38
|
+
- The standing prompt section is on every session and does not name a mode. The mode envelope appears only after route boost is installed and that session recorded a mode.
|
|
39
|
+
- A preset does not hide tools from the tool list. The guard refuses a call before it runs.
|
|
40
|
+
- The host picker shows one English label. The plugin seats translate.
|
|
41
|
+
- The first turn can start before the created event is stored. The preset prefix still applies.
|
|
42
|
+
- A phone drops a preset id it cannot see yet. Deploy, then choose again after the list refreshes.
|
|
43
|
+
- Scanner programs, audit runners, shell desks, refusal bypass, and subagent providers are withheld.
|
|
44
|
+
- Live sessions on every agent runtime, and Direct or Relay paths, are outside this package's checks.
|
|
45
|
+
|
|
46
|
+
## Developing
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
vp run --filter @ycodium-ai/plugin-redteam-model typecheck
|
|
50
|
+
vp run --filter @ycodium-ai/plugin-redteam-model test
|
|
51
|
+
vp run --filter @ycodium-ai/plugin-redteam-model build
|
|
52
|
+
```
|
package/assets/icon.svg
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="none">
|
|
2
|
+
<rect x="3" y="4" width="26" height="24" rx="6" stroke="#9a3412" stroke-width="2"/>
|
|
3
|
+
<circle cx="11" cy="12" r="2" fill="#9a3412"/>
|
|
4
|
+
<path d="M16 12h9M8 20h16" stroke="#9a3412" stroke-width="1.8" stroke-linecap="round"/>
|
|
5
|
+
<circle cx="22" cy="20" r="2" fill="#c2410c"/>
|
|
6
|
+
</svg>
|
package/assets/ui.js
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
var Z=window.__ycodiumPluginHost.react;var{Activity:be,Children:ve,Component:xe,Fragment:Se,Profiler:Ne,PureComponent:we,StrictMode:Pe,Suspense:ke,__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE:Me,__COMPILER_RUNTIME:Re,act:Ie,cache:Ce,cacheSignal:De,captureOwnerStack:Ee,cloneElement:Oe,createContext:O,createElement:P,createRef:ze,forwardRef:Be,isValidElement:Ae,lazy:_e,memo:Te,startTransition:He,unstable_useCacheRefresh:Ue,use:z,useActionState:$e,useCallback:k,useContext:Ve,useDebugValue:Le,useDeferredValue:Fe,useEffect:M,useEffectEvent:Ge,useId:qe,useImperativeHandle:je,useInsertionEffect:Xe,useLayoutEffect:Ye,useMemo:Je,useOptimistic:Ke,useReducer:We,useRef:B,useState:y,useSyncExternalStore:Qe,useTransition:Ze,version:en}=Z;var{jsx:t,jsxs:i,Fragment:tn}=window.__ycodiumPluginHost.jsxRuntime;var A=O(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=z(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 d=f("Button"),_=f("Collapsible"),T=f("CollapsibleTrigger"),H=f("CollapsiblePanel"),b=f("EmptyInline"),U=f("ChevronDown");var h="redteam-model",p=["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 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",ln={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),[a,r]=y(e.presetId??null),[u,c]=y(!1),m=R(),N=m.filter(l=>l.group==="general"),g=m.filter(l=>l.group==="professional");M(()=>{r(e.presetId??null)},[e.presetId]),M(()=>{let l=x=>{let E=x.detail;r(typeof E?.presetId=="string"?E.presetId:null)};return window.addEventListener("ycodium-draft-preset",l),()=>window.removeEventListener("ycodium-draft-preset",l)},[]);let w=l=>{if(r(l),!e.deployed)return;if(typeof e.onSelectPreset=="function"){e.onSelectPreset(l),c(!1);return}let x=e.bridge.agentPreset?.select;if(x!==void 0){x(l),c(!1);return}c(!0)};return i("section",{className:"rm-hero",children:[t("p",{className:"rm-kicker",children:n("hero.title")}),t("p",{className:"rm-lead",children:n("hero.lead")}),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,u?t("p",{className:"rm-muted",children:n("hero.unwired")}):null,i("div",{className:"rm-modes",children:[N.map(l=>t(d,{size:"xs",type:"button",variant:a===l.id?"default":"outline",disabled:!e.deployed,"aria-pressed":a===l.id,onClick:()=>w(l.id),children:n(`mode.${l.id}.name`)},l.id)),t(d,{size:"xs",variant:"outline",type:"button","aria-expanded":o,onClick:()=>s(l=>!l),children:n(o?"hero.hideProfessional":"hero.professional")}),a===null?null:t(d,{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(l=>t(d,{size:"xs",type:"button",variant:a===l.id?"default":"outline",disabled:!e.deployed,"aria-pressed":a===l.id,onClick:()=>w(l.id),children:t("span",{children:n(`mode.${l.id}.name`)})},l.id))}):null,a===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:p.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 ie(e){return p.includes(e)}function G(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function ae(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"&&ie(e.phase)?e.phase:"authorization",o=Array.isArray(e.denials)?e.denials.flatMap(a=>{let r=ae(a);return r===null?[]:[r]}):[],s=Array.isArray(e.notes)?e.notes.filter(a=>typeof a=="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:p.length,reportOpen:e.reportOpen===!0,authorizationRecorded:e.authorizationRecorded===!0,denials:o.slice(0,re),notes:s}}var se={},le="ycodium.sessionProjection";function de(e){if(typeof e!="object"||e===null)return{present:!1,value:null};let n=e;return{present:n.present===!0,value:n.value??null}}function v(e){return e.i18n.usePluginTranslation()}function ue(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),o=n.data,s=o?.board===void 0?null:F(o.board),a=B(null),[r,u]=y(null),c=k(async(m,N={})=>{let g=ue(a.current,m);if(!(!g.claimed||g.next===null)){a.current=g.next,u(g.next);try{await e.commands.invoke(m,N)}finally{a.current=null,u(null)}}},[e]);return{board:s,pending:n.isPending,error:n.error,runningCommand:r,run:c}}function D(e,n){let o=n!==null&&n.length>0?n:"_",s=e.commands.useSubscription(le,{name:V,threadId:o}),a=de(s.data),r=n===null||n.length===0?null:a.present?q(a.value):I(),u=k(async(c,m={})=>{await e.commands.invoke(c,{threadId:n??"",...m})},[e,n]);return{session:r,pending:s.isPending,run:u}}var pe=["settings.limitBundle","settings.limitIsolate","settings.limitSection","settings.limitList","settings.limitEvents","settings.limitFollowup","settings.limitSubagent","settings.limitScanner","settings.limitPicker","settings.limitTurn","settings.limitRefresh"];function X(e){let{t:n,board:o}=e,s=e.runningCommand!==null,a=j(e.runningCommand);return o===null?t("section",{className:"rm-root",children:t(b,{title:e.pending?n("common.loading"):n("common.empty")})}):i("section",{className:"rm-root",children:[i("header",{className:"rm-head",children:[i("div",{children:[t("p",{className:"rm-kicker",children:n("common.source")}),t("h2",{className:"rm-title",children:n("settings.title")}),t("p",{className:"rm-lead",children:n("settings.lead")})]}),t("span",{className:o.deployed?"rm-pill rm-pill-ok":"rm-pill",children:o.deployed?n("settings.deployed"):n("settings.notDeployed")})]}),i("div",{className:"rm-card",children:[i("div",{className:"rm-actions",children:[t(d,{size:"xs",variant:"default",type:"button",onClick:e.onDeploy,disabled:a.disabled,children:n(a.labelKey)}),t(d,{size:"xs",variant:"outline",type:"button",onClick:e.onRemove,disabled:!o.deployed||s,children:n("settings.remove")}),t(d,{size:"xs",variant:"outline",type:"button",onClick:e.onRepair,disabled:s,children:n("settings.repair")}),t(d,{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")}):i("p",{className:"rm-banner",role:"status",children:[n("settings.denial")," ",o.lastDenial.tool,": ",o.lastDenial.reason]})]}),i("div",{className:"rm-card",children:[t("h3",{className:"rm-title",children:n("settings.modes")}),t("div",{className:"rm-modes",children:o.modes.map(r=>i("article",{className:"rm-card",children:[t("p",{className:"rm-kicker",children:n(`group.${r.group}`)}),t("strong",{children:n(`mode.${r.id}.name`)}),t("p",{className:"rm-muted",children:n(`mode.${r.id}.detail`)})]},r.id))})]}),i("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=>i("div",{className:"rm-module",children:[i("div",{children:[t("strong",{children:n(`module.${r.id}`)}),i("p",{className:"rm-muted",children:[n(`plane.${r.plane}`)," \xB7 ",n(`availability.${r.availability}`)," \xB7"," ",r.installed?n("common.installed"):n("common.absent")]})]}),i("div",{className:"rm-actions",children:[t(d,{size:"xs",variant:"outline",type:"button",disabled:s,onClick:()=>e.onInstall(r.id),children:n("settings.install")}),t(d,{size:"xs",variant:"outline",type:"button",disabled:!r.installed||s,onClick:()=>e.onUpdate(r.id),children:n("settings.update")}),t(d,{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")})]}),i("div",{className:"rm-card",children:[t("h3",{className:"rm-title",children:n("settings.hostPluginsTitle")}),t("p",{className:"rm-lead",children:n("settings.hostPluginsLead")}),t(d,{size:"xs",variant:"outline",type:"button",onClick:e.onOpenHostPlugins,children:n("settings.hostPluginsAction")})]}),i("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=>i("li",{children:[i("span",{children:[r.kind," \xB7 ",n(`op.${r.status}`)]}),t("span",{className:"rm-muted",children:r.detail})]},r.id))})]}),i("div",{className:"rm-card",children:[t("h3",{className:"rm-title",children:n("settings.limitsTitle")}),t("ul",{className:"rm-note",children:pe.map(r=>t("li",{children:n(r)},r))})]})]})}function Y(e){return{authorization:e.authorizationRecorded?"secondary":"primary",report:e.authorizationRecorded&&!e.reportOpen?"primary":"secondary"}}function J(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,p.length),a=Y(o);return i(_,{className:"rm-seat",defaultOpen:!0,children:[i(T,{className:"rm-seat-trigger",children:[t(U,{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.${o.modeId}.name`)})}),i("span",{className:"rm-pill",children:[n("session.progress")," ",o.done,"/",o.total]})]}),t("div",{className:"rm-rail","aria-label":n("session.phase"),children:p.map(r=>t(d,{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:p.map((r,u)=>t("span",{className:"rm-dot","data-on":u<s?"true":"false"},r))}),t("p",{className:"rm-lead",children:o.goal.length===0?n("session.noGoal"):o.goal}),t("p",{className:"rm-muted",children:n("session.actionsLead")}),i("div",{className:"rm-actions",children:[i("div",{className:"rm-action",children:[t(d,{size:"xs",type:"button",variant:a.authorization==="primary"?"default":"outline","data-tone":a.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")})]}),i("div",{className:"rm-action",children:[t(d,{size:"xs",type:"button",variant:a.report==="primary"?"default":"outline","data-tone":a.report,onClick:e.onReport,disabled:o.reportOpen,children:o.reportOpen?n("session.reportOpen"):n("session.report")}),t("p",{className:"rm-hint",children:n("session.reportHint")})]}),i("div",{className:"rm-action",children:[t(d,{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")}),o.denials.length===0?t(b,{title:n("session.noDenials")}):o.denials.map(r=>i("p",{className:"rm-banner",role:"status",children:[r.tool,": ",r.reason]},`${r.at}-${r.tool}`))]}),i("div",{className:"rm-card",children:[t("h3",{className:"rm-title",children:n("session.notes")}),o.notes.length===0?t(b,{title:n("session.noNotes")}):t("ul",{className:"rm-note",children:o.notes.map(r=>t("li",{children:r},r))})]})]})})})]})}function K(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 ce=`
|
|
2
|
+
.rm-root, .rm-hero, .rm-session, .rm-chip {
|
|
3
|
+
color: var(--foreground);
|
|
4
|
+
font: inherit;
|
|
5
|
+
color-scheme: light dark;
|
|
6
|
+
}
|
|
7
|
+
.rm-root {
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
gap: 14px;
|
|
11
|
+
padding: 16px;
|
|
12
|
+
background: var(--background);
|
|
13
|
+
}
|
|
14
|
+
.rm-hero, .rm-session {
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
gap: 10px;
|
|
18
|
+
padding: 12px;
|
|
19
|
+
}
|
|
20
|
+
.rm-card {
|
|
21
|
+
background: var(--card);
|
|
22
|
+
color: var(--card-foreground);
|
|
23
|
+
border: 1px solid var(--border);
|
|
24
|
+
border-radius: var(--card-radius, 12px);
|
|
25
|
+
padding: 14px;
|
|
26
|
+
}
|
|
27
|
+
.rm-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
|
|
28
|
+
.rm-title { margin: 0; font-size: 18px; font-weight: 680; letter-spacing: -0.02em; }
|
|
29
|
+
.rm-lead, .rm-muted, .rm-hint { color: var(--muted-foreground); }
|
|
30
|
+
.rm-lead { margin: 4px 0 0; max-width: 68ch; }
|
|
31
|
+
.rm-hint { margin: 0; font-size: 12px; }
|
|
32
|
+
.rm-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
|
|
33
|
+
.rm-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
|
|
34
|
+
.rm-action { display: flex; flex-direction: column; gap: 4px; flex: 1 1 14rem; min-width: min(100%, 14rem); }
|
|
35
|
+
.rm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
|
|
36
|
+
.rm-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
|
|
37
|
+
.rm-module {
|
|
38
|
+
display: grid;
|
|
39
|
+
grid-template-columns: 1fr auto;
|
|
40
|
+
gap: 8px;
|
|
41
|
+
align-items: center;
|
|
42
|
+
padding: 10px 0;
|
|
43
|
+
border-top: 1px solid var(--border);
|
|
44
|
+
}
|
|
45
|
+
.rm-pill {
|
|
46
|
+
display: inline-flex;
|
|
47
|
+
align-items: center;
|
|
48
|
+
min-height: 28px;
|
|
49
|
+
padding: 0 8px;
|
|
50
|
+
border-radius: 999px;
|
|
51
|
+
background: var(--warning-surface);
|
|
52
|
+
color: var(--warning);
|
|
53
|
+
font-size: 12px;
|
|
54
|
+
}
|
|
55
|
+
.rm-pill-bad { background: var(--error-surface); color: var(--destructive, var(--error)); }
|
|
56
|
+
.rm-pill-ok { background: color-mix(in srgb, var(--success) 16%, transparent); color: var(--success-foreground); }
|
|
57
|
+
.rm-rail { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
|
|
58
|
+
.rm-dots { display: flex; gap: 6px; }
|
|
59
|
+
.rm-dot { width: 10px; height: 10px; border-radius: 99px; background: var(--border); }
|
|
60
|
+
.rm-dot[data-on="true"] { background: var(--primary); }
|
|
61
|
+
.rm-log { max-height: 240px; overflow: auto; display: flex; flex-direction: column; gap: 6px; }
|
|
62
|
+
.rm-log li { list-style: none; display: flex; justify-content: space-between; gap: 8px; }
|
|
63
|
+
.rm-banner {
|
|
64
|
+
border-radius: 12px;
|
|
65
|
+
padding: 10px 12px;
|
|
66
|
+
background: var(--error-surface);
|
|
67
|
+
color: var(--destructive, var(--error));
|
|
68
|
+
}
|
|
69
|
+
.rm-note { margin: 0; padding-left: 18px; }
|
|
70
|
+
.rm-chip {
|
|
71
|
+
display: inline-flex;
|
|
72
|
+
align-items: center;
|
|
73
|
+
gap: 8px;
|
|
74
|
+
min-height: 28px;
|
|
75
|
+
padding: 0 12px;
|
|
76
|
+
border-radius: 999px;
|
|
77
|
+
border: 1px solid var(--border);
|
|
78
|
+
background: var(--card);
|
|
79
|
+
}
|
|
80
|
+
.rm-chip[data-done="true"] { background: color-mix(in srgb, var(--success) 16%, transparent); }
|
|
81
|
+
.rm-kicker { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--primary); }
|
|
82
|
+
.rm-seat { min-width: 0; }
|
|
83
|
+
.rm-seat-trigger {
|
|
84
|
+
display: flex;
|
|
85
|
+
align-items: center;
|
|
86
|
+
gap: 6px;
|
|
87
|
+
}
|
|
88
|
+
.rm-seat-chevron {
|
|
89
|
+
width: 14px;
|
|
90
|
+
height: 14px;
|
|
91
|
+
flex: none;
|
|
92
|
+
}
|
|
93
|
+
.rm-seat-trigger:not([data-panel-open]) .rm-seat-chevron {
|
|
94
|
+
transform: rotate(-90deg);
|
|
95
|
+
}
|
|
96
|
+
.rm-seat-body {
|
|
97
|
+
max-height: min(240px, 32vh);
|
|
98
|
+
overflow: auto;
|
|
99
|
+
}
|
|
100
|
+
/* \u624B\u673A\u4E0A\u5185\u5D4C\u7684\u5EA7\u4F4D\u6309\u5185\u5BB9\u5B9A\u9AD8\uFF08\u5BBF\u4E3B\u7ED9 html \u6253 data-fit-content\uFF09\uFF1A\u90A3\u91CC\u7684\u89C6\u53E3\u5C31\u662F\u5EA7\u4F4D\u81EA\u5DF1\u4E0A\u4E00\u6B21\u62A5\u7684
|
|
101
|
+
\u9AD8\u5EA6\uFF0C\u6309 vh \u5C01\u9876\u4F1A\u8BA9\u9AD8\u5EA6\u4E00\u8F6E\u4E00\u8F6E\u5F80\u4E0B\u7F29\uFF0C\u6700\u540E\u6B63\u6587\u53EA\u5269\u4E00\u6761\u7F1D\u3002\u53EA\u6309\u50CF\u7D20\u5C01\u9876\u3002 */
|
|
102
|
+
html[data-fit-content] .rm-seat-body { max-height: 240px; }
|
|
103
|
+
@media (max-width: 720px) {
|
|
104
|
+
.rm-module { grid-template-columns: 1fr; }
|
|
105
|
+
.rm-rail { grid-template-columns: 1fr 1fr; }
|
|
106
|
+
.rm-root { padding: 12px; }
|
|
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=ce,document.head.appendChild(e)}function me(e){let n=v(e.bridge),{board:o,pending:s,runningCommand:a,run:r}=C(e.bridge);return t(S,{bridge:e.bridge,children:t(X,{t:n,board:o,pending:s,runningCommand:a,onDeploy:()=>{r("deploy")},onRemove:()=>{r("remove")},onRepair:()=>{r("repair")},onInstall:u=>{r("module.install",{id:u})},onUpdate:u=>{r("module.update",{id:u})},onUninstall:u=>{r("module.uninstall",{id:u})},onProbe:u=>{r("fields.set",{probeDenial:u})},onOpenHostPlugins:()=>e.bridge.navigate("/settings/plugins")})})}function ge(e){let n=v(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 ye(e){let n=v(e.bridge),o=e.threadId??null,{session:s,run:a}=D(e.bridge,o);return t(S,{bridge:e.bridge,children:t(J,{t:n,session:s,threadId:o,onPhase:r=>{a("phase.set",{phase:r})},onAuthorize:()=>{a("authorization.record")},onReport:()=>{a("report.open")},onRemind:()=>{a("reminder")}})})}function fe(e){let n=v(e.bridge),o=e.threadId??null,{session:s}=D(e.bridge,o);return t(K,{t:n,session:s,threadId:o})}function he(e){return Q(),{slots:[{name:"settings.section",order:40,component(){return t(me,{bridge:e})}},{name:"conversation.hero.agentPreset",order:10,component(n){return t(ge,{bridge:e,...n})}},{name:"conversation.view",order:30,component(n){return t(ye,{bridge:e,threadId:n.threadId})}},{name:"conversation.session.header.actions",order:30,component(n){return t(fe,{bridge:e,threadId:n.threadId})}}]}}export{he as default};
|