@kenhkl/agent-moss 0.12.7 → 0.12.8
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/dist/agents/__pycache__/base.cpython-312.pyc +0 -0
- package/dist/agents/base.py +41 -4
- package/dist/cli.js +3382 -449
- package/dist/cli.js.map +1 -1
- package/dist/engine/coordinator.d.ts +13 -5
- package/dist/engine/coordinator.js +2387 -318
- package/dist/engine/coordinator.js.map +1 -1
- package/dist/rules/l2_rules.json +136 -1
- package/dist/scenarios/__init__.py +119 -0
- package/dist/scenarios/__pycache__/__init__.cpython-312.pyc +0 -0
- package/dist/scenarios/bank/rules.json +23 -0
- package/dist/server.js +4045 -1202
- package/dist/server.js.map +1 -1
- package/dist/static/index.html +119 -1
- package/package.json +2 -1
|
@@ -26,6 +26,16 @@ interface AnalysisInput {
|
|
|
26
26
|
actionDetail: string;
|
|
27
27
|
}[];
|
|
28
28
|
} | string)[];
|
|
29
|
+
/** 多 session 历史动作(可选),每项 {sessionId, actionHistory}。供 L2.4 形式化引擎
|
|
30
|
+
* 做跨会话组合链/敏感数据传播验证;缺省时仅用当前 session 构建行为图(向后兼容)。
|
|
31
|
+
* 由调用方(含未来 agentgate 非侵入式采集)提供。 */
|
|
32
|
+
sessionHistory?: {
|
|
33
|
+
sessionId?: string;
|
|
34
|
+
actionHistory: {
|
|
35
|
+
actionType: string;
|
|
36
|
+
actionDetail: string;
|
|
37
|
+
}[];
|
|
38
|
+
}[];
|
|
29
39
|
aNext: {
|
|
30
40
|
actionType: string;
|
|
31
41
|
actionDetail: string;
|
|
@@ -35,6 +45,9 @@ interface AnalysisInput {
|
|
|
35
45
|
cwd: string;
|
|
36
46
|
/** 调用方 agent 标识(如 'xiaoo' / 'opencode' / 'opendesk')。空 = 通用模式。 */
|
|
37
47
|
agentId: string;
|
|
48
|
+
/** 调用方场景标识(如 'bank'),用于加载场景定制规则(客户沙箱的目录访问边界/禁 ssh 等)。
|
|
49
|
+
* 空时兜底环境变量 AGENT_MOSS_SCENARIO(部署级,客户沙箱设一次,所有请求生效)。 */
|
|
50
|
+
scenarioId?: string;
|
|
38
51
|
/** 可选的 per-request LLM 配置覆盖(由 OpenDesk 按当前会话模型传入) */
|
|
39
52
|
llmConfig?: {
|
|
40
53
|
baseUrl: string;
|
|
@@ -53,11 +66,6 @@ interface AnalysisInput {
|
|
|
53
66
|
declare const TRUSTED_SKILLS_BASE: Set<string>;
|
|
54
67
|
/** 供测试隔离:重置 brain 单例 */
|
|
55
68
|
declare function _resetBrainForTest(): void;
|
|
56
|
-
/**
|
|
57
|
-
* Three-layer defense coordinator.
|
|
58
|
-
* Layer 1 → fast-pass check → Layer 2 → Layer 3.
|
|
59
|
-
* Fast-pass: whitelisted safe tools/commands skip L2+L3 or L3 only.
|
|
60
|
-
*/
|
|
61
69
|
declare function runAnalysis(input: AnalysisInput): Promise<SecurityJudgment>;
|
|
62
70
|
|
|
63
71
|
export { type AnalysisInput, TRUSTED_SKILLS_BASE, _resetBrainForTest, runAnalysis };
|