@kenhkl/agent-moss 0.13.0 → 0.14.0

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.
@@ -679,14 +679,14 @@ function countEnabledSkills(ls, layerKey) {
679
679
  // 方案B:L2 总规则数 = 文本规则 + LTL 时序规则(都属 L2 大类)
680
680
  function countRulesL2() {
681
681
  const text = countRules(state.config.L2_rules);
682
- const ltl = (state.config.L2_4?.ltl_rules || []).length;
682
+ const ltl = (state.config.L2_2?.ltl_rules || []).length;
683
683
  return text + ltl;
684
684
  }
685
685
  // L2 启用数 = 文本启用 + LTL 启用(层级总开关关闭时 LTL 归 0,与引擎 gating 一致)
686
686
  function countEnabledL2() {
687
687
  const text = countEnabled(state.config.L2_rules, 'L2_logic_rules');
688
688
  const layerOn = state.config.layers?.L2_logic_rules !== false;
689
- const ltlOn = layerOn ? (state.config.L2_4?.ltl_rules || []).filter(r => r.enabled !== false).length : 0;
689
+ const ltlOn = layerOn ? (state.config.L2_2?.ltl_rules || []).filter(r => r.enabled !== false).length : 0;
690
690
  return text + ltlOn;
691
691
  }
692
692
 
@@ -829,10 +829,10 @@ function render_l2() {
829
829
  renderLtlCard('page-l2');
830
830
  renderRuleLayer('L2_rules', 'page-l2', customOnly, true, false, true);
831
831
  }
832
- // LTL 时序攻击模式规则卡(L2.2/L2.4,并入 L2 页展示;数据源 state.config.L2_4.ltl_rules)
832
+ // LTL 时序攻击模式规则卡(L2.2,并入 L2 页展示;数据源 state.config.L2_2.ltl_rules)
833
833
  function renderLtlCard(containerId) {
834
- const l24 = state.config.L2_4 || {};
835
- const ltl = l24.ltl_rules || [];
834
+ const l22 = state.config.L2_2 || {};
835
+ const ltl = l22.ltl_rules || [];
836
836
  const isL2On = state.config.layers?.L2_logic_rules !== false;
837
837
  // 与其他分类一致:默认折叠,用户展开过则保持(expandedCats)
838
838
  const expanded = expandedCats.has(`${containerId}-ltl_rules`);
@@ -856,7 +856,7 @@ function renderLtlCard(containerId) {
856
856
  <div class="ag-rule-pattern"><span class="ag-rule-field-label">${t('检测', 'Detects')}:</span> ${escapeHtml(r.human || r.reason || r.id)}</div>
857
857
  <div class="ag-rule-reason"><span class="ag-rule-field-label">${t('规则说明', 'Description')}:</span> ${escapeHtml(r.reason || '')} <span class="ag-rule-id">[${escapeHtml(r.id)}]</span></div>
858
858
  <div class="ag-rule-id">${t('动作', 'Action')}: ${action}</div>
859
- </div><div class="ag-rule-controls">${toggle(r.enabled !== false, false, `toggleRule('L2_4','ltl_rules','${r.id}',${!(r.enabled !== false)})`)}</div></div>`;
859
+ </div><div class="ag-rule-controls">${toggle(r.enabled !== false, false, `toggleRule('L2_2','ltl_rules','${r.id}',${!(r.enabled !== false)})`)}</div></div>`;
860
860
  }
861
861
  }
862
862
  html += '</div></div>';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kenhkl/agent-moss",
3
- "version": "0.13.0",
3
+ "version": "0.14.0",
4
4
  "description": "Multi-layer security analysis engine for AI agents (TypeScript)",
5
5
  "type": "module",
6
6
  "main": "dist/server.js",