@kenhkl/agent-moss 0.17.44 → 0.17.45

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/server.js CHANGED
@@ -4730,7 +4730,7 @@ function isLLMAvailable() {
4730
4730
  if (!layerEnabledOrDefault("L3_llm_analysis")) return false;
4731
4731
  return llmConfig.apiKey.length > 0;
4732
4732
  }
4733
- async function probeLLMConnection(timeoutMs2 = 3e4) {
4733
+ async function probeLLMConnection(timeoutMs = 3e4) {
4734
4734
  if (!isLLMAvailable()) return false;
4735
4735
  const OpenAI3 = (await import("openai")).default;
4736
4736
  const config = getLLMConfig();
@@ -4739,7 +4739,7 @@ async function probeLLMConnection(timeoutMs2 = 3e4) {
4739
4739
  const client = new OpenAI3({
4740
4740
  baseURL: config.baseUrl,
4741
4741
  apiKey: config.apiKey,
4742
- timeout: timeoutMs2,
4742
+ timeout: timeoutMs,
4743
4743
  maxRetries: 0,
4744
4744
  defaultHeaders: Object.keys(extraHeaders).length > 0 ? extraHeaders : void 0
4745
4745
  });
@@ -11767,7 +11767,7 @@ function maskedBaseUrl(raw) {
11767
11767
  return "(unparseable)";
11768
11768
  }
11769
11769
  }
11770
- function llmErrorDetail(err, config, attempt, maxRetries, elapsedMs, promptChars, timeoutMs2) {
11770
+ function llmErrorDetail(err, config, attempt, maxRetries, elapsedMs, promptChars, timeoutMs) {
11771
11771
  const chain = [];
11772
11772
  let cur = err;
11773
11773
  const seen = /* @__PURE__ */ new Set();
@@ -11779,7 +11779,7 @@ function llmErrorDetail(err, config, attempt, maxRetries, elapsedMs, promptChars
11779
11779
  const proxy = ["HTTP_PROXY", "HTTPS_PROXY", "ALL_PROXY", "NO_PROXY"].filter((n) => process.env[n]).join(",") || "none";
11780
11780
  const cause = err?.cause ?? err?.context;
11781
11781
  const errno = cause?.errno ?? cause?.code ?? err?.errno ?? err?.code;
11782
- return `attempt=${attempt}/${maxRetries + 1} elapsed=${(elapsedMs / 1e3).toFixed(1)}s timeout=${(timeoutMs2 / 1e3).toFixed(1)}s model=${config.model} provider=${config.provider || "auto"} base_url=${maskedBaseUrl(config.baseUrl)} proxy=${proxy} prompt_chars=${promptChars} errno=${errno ?? "-"} chain=${chain.join(" <- ")}`;
11782
+ return `attempt=${attempt}/${maxRetries + 1} elapsed=${(elapsedMs / 1e3).toFixed(1)}s timeout=${(timeoutMs / 1e3).toFixed(1)}s model=${config.model} provider=${config.provider || "auto"} base_url=${maskedBaseUrl(config.baseUrl)} proxy=${proxy} prompt_chars=${promptChars} errno=${errno ?? "-"} chain=${chain.join(" <- ")}`;
11783
11783
  }
11784
11784
  async function analyzeWithLLM(prompt, config) {
11785
11785
  console.log(`[AgentMoss] LLM analyzing with model: ${config.model}, url: ${config.baseUrl}`);
@@ -12551,7 +12551,7 @@ ${reason.slice(0, 500)}
12551
12551
 
12552
12552
  // src/brain/reviewer.ts
12553
12553
  import OpenAI2 from "openai";
12554
- function createBrainReviewer(timeoutMs2 = 1e4) {
12554
+ function createBrainReviewer(timeoutMs = 1e4) {
12555
12555
  return async (opts) => {
12556
12556
  if (process.env.AGENT_MOSS_BRAIN_REVIEW === "0") return null;
12557
12557
  if (!isLLMAvailable()) return null;
@@ -12561,7 +12561,7 @@ function createBrainReviewer(timeoutMs2 = 1e4) {
12561
12561
  const client = new OpenAI2({
12562
12562
  baseURL: config.baseUrl,
12563
12563
  apiKey: config.apiKey,
12564
- timeout: timeoutMs2,
12564
+ timeout: timeoutMs,
12565
12565
  maxRetries: 1,
12566
12566
  defaultHeaders: Object.keys(extraHeaders).length > 0 ? extraHeaders : void 0
12567
12567
  });
@@ -13726,10 +13726,10 @@ function checkNeverExfilAfterPrivesc(graph) {
13726
13726
  const candidates = privescInWindow(nodes, privescIdx, firstEv, windowSec);
13727
13727
  if (candidates.length > 0) {
13728
13728
  const pre = nodes[candidates[candidates.length - 1]];
13729
- const post2 = nodes[firstEv];
13729
+ const post = nodes[firstEv];
13730
13730
  const path10 = [
13731
13731
  { sessionId: pre.sessionId, seq: pre.seq, detail: pre.actionDetail.slice(0, 60) },
13732
- { sessionId: post2.sessionId, seq: post2.seq, detail: post2.actionDetail.slice(0, 60) }
13732
+ { sessionId: post.sessionId, seq: post.seq, detail: post.actionDetail.slice(0, 60) }
13733
13733
  ];
13734
13734
  return [{
13735
13735
  propertyId: "no-exfil-after-privesc",
@@ -13793,10 +13793,10 @@ function checkNeverExfilAfterCred(graph) {
13793
13793
  if (isCredNode(nodes[i])) pre = nodes[i];
13794
13794
  }
13795
13795
  if (pre) {
13796
- const post2 = nodes[firstEv];
13796
+ const post = nodes[firstEv];
13797
13797
  const path10 = [
13798
13798
  { sessionId: pre.sessionId, seq: pre.seq, detail: pre.actionDetail.slice(0, 60) },
13799
- { sessionId: post2.sessionId, seq: post2.seq, detail: post2.actionDetail.slice(0, 60) }
13799
+ { sessionId: post.sessionId, seq: post.seq, detail: post.actionDetail.slice(0, 60) }
13800
13800
  ];
13801
13801
  return [{
13802
13802
  propertyId: "no-exfil-after-credential",
@@ -15295,175 +15295,6 @@ var init_formal_engine = __esm({
15295
15295
  }
15296
15296
  });
15297
15297
 
15298
- // src/engine/intent-guard.ts
15299
- import http from "http";
15300
- function intentGuardServiceUrl() {
15301
- return (getAgentMossSetting("AGENT_MOSS_INTENT_GUARD_URL", "") || "").trim();
15302
- }
15303
- function isIntentGuardEnabled() {
15304
- return intentGuardServiceUrl() !== "";
15305
- }
15306
- function timeoutMs() {
15307
- const raw = parseInt(getAgentMossSetting("AGENT_MOSS_INTENT_GUARD_TIMEOUT_MS", "1500") || "1500", 10);
15308
- return Number.isFinite(raw) && raw > 0 ? raw : 1500;
15309
- }
15310
- function uncertainPolicy() {
15311
- return (getAgentMossSetting("AGENT_MOSS_INTENT_GUARD_UNCERTAIN", "deny") || "deny").trim().toLowerCase();
15312
- }
15313
- function isIntentGuardObserveMode() {
15314
- return getAgentMossSetting("AGENT_MOSS_INTENT_GUARD_OBSERVE", "") === "1";
15315
- }
15316
- function stripEnvironmentNoise(detail, cwd) {
15317
- let s = detail.replace(
15318
- /(^|\s)(?:export\s+)?PATH=(?:"[^"]*"|'[^']*'|\S+)\s*(?:&&\s*|;\s*)?/g,
15319
- "$1"
15320
- );
15321
- const dir = (cwd ?? "").trim().replace(/\/+$/, "");
15322
- if (dir && dir !== "/") {
15323
- const q = dir.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
15324
- s = s.replace(new RegExp(`cd\\s+["']?${q}["']?\\s*(?:&&|;)\\s*`, "g"), "");
15325
- s = s.replace(new RegExp(`\\s+in\\s+${q}\\s*$`), "");
15326
- s = s.split(`${dir}/`).join("");
15327
- s = s.replace(new RegExp(`(?<![\\w./-])${q}(?![\\w./-])`, "g"), "");
15328
- }
15329
- return s.trim();
15330
- }
15331
- function normalizeActionDetail(actionDetail, cwd) {
15332
- const s = (actionDetail ?? "").trim();
15333
- if (!s.startsWith("{")) return stripEnvironmentNoise(s, cwd);
15334
- let o;
15335
- try {
15336
- const parsed = JSON.parse(s);
15337
- if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) return stripEnvironmentNoise(s, cwd);
15338
- o = parsed;
15339
- } catch {
15340
- return stripEnvironmentNoise(s, cwd);
15341
- }
15342
- const str = (k) => typeof o[k] === "string" ? o[k] : "";
15343
- const command = str("command") || str("cmd") || str("script");
15344
- if (command.trim()) return stripEnvironmentNoise(command, cwd);
15345
- const filePath = str("file_path");
15346
- if (filePath.trim()) return stripEnvironmentNoise(`\u8BFB\u53D6\u6587\u4EF6: ${filePath}`, cwd);
15347
- const path10 = str("path");
15348
- const content = str("content");
15349
- if (path10.trim() && content) return stripEnvironmentNoise(`\u5199\u5165\u6587\u4EF6: ${path10} \u2014 ${content.slice(0, 200)}`, cwd);
15350
- const pattern = str("pattern");
15351
- if (pattern.trim()) return stripEnvironmentNoise(`\u641C\u7D22: ${pattern}${path10 ? ` in ${path10}` : ""}`, cwd);
15352
- if (path10.trim()) return stripEnvironmentNoise(`\u6587\u4EF6: ${path10}`, cwd);
15353
- return stripEnvironmentNoise(s, cwd);
15354
- }
15355
- function post(url, payload, ms) {
15356
- return new Promise((resolve13, reject) => {
15357
- let u;
15358
- try {
15359
- u = new URL(url);
15360
- } catch (e) {
15361
- reject(e);
15362
- return;
15363
- }
15364
- const body = Buffer.from(JSON.stringify(payload), "utf-8");
15365
- const req = http.request(
15366
- {
15367
- hostname: u.hostname,
15368
- port: u.port || 80,
15369
- path: u.pathname.replace(/\/$/, "") + "/judge",
15370
- method: "POST",
15371
- headers: { "Content-Type": "application/json", "Content-Length": body.length },
15372
- timeout: ms
15373
- },
15374
- (res) => {
15375
- const chunks = [];
15376
- res.on("data", (c) => chunks.push(c));
15377
- res.on("end", () => {
15378
- try {
15379
- resolve13(JSON.parse(Buffer.concat(chunks).toString("utf-8")));
15380
- } catch (e) {
15381
- reject(e);
15382
- }
15383
- });
15384
- }
15385
- );
15386
- req.on("timeout", () => {
15387
- req.destroy(new Error(`timeout after ${ms}ms`));
15388
- });
15389
- req.on("error", reject);
15390
- req.write(body);
15391
- req.end();
15392
- });
15393
- }
15394
- async function judgeIntentGuard(input) {
15395
- const url = intentGuardServiceUrl();
15396
- if (!url) return null;
15397
- const histTexts = (input.promptHistory ?? []).map((h) => typeof h === "string" ? h : h?.text ?? "");
15398
- if (!(input.promptSession || "").trim() && !histTexts.some((t) => t.trim())) return null;
15399
- const cwd = input.cwd;
15400
- const nextType = input.aNext?.actionType ?? "";
15401
- const nextDetail = normalizeActionDetail(input.aNext?.actionDetail ?? "", cwd);
15402
- const history = (input.actionHistory ?? []).map((a) => ({
15403
- action_type: a.actionType ?? "",
15404
- action_detail: normalizeActionDetail(a.actionDetail ?? "", cwd)
15405
- }));
15406
- while (history.length && history[history.length - 1].action_type === nextType && history[history.length - 1].action_detail === nextDetail) {
15407
- history.pop();
15408
- }
15409
- const payload = {
15410
- intent: input.promptSession || "",
15411
- prompt_history: histTexts.map((text) => ({ text })),
15412
- action_history: history,
15413
- action_type: nextType,
15414
- action_detail: nextDetail,
15415
- // reason 也是模型输入的一部分,同样要剥掉 cwd/PATH 噪声:实测同一误拦里
15416
- // action_detail 已归一成 `python3 fib.py`,但 reason 仍是
15417
- // `cd /tmp/ws/runNNN && python3 fib.py` → 模型仍判 DENY。
15418
- reason: stripEnvironmentNoise(input.reason || "", cwd)
15419
- };
15420
- let body;
15421
- try {
15422
- body = await post(url, payload, timeoutMs());
15423
- } catch (e) {
15424
- console.warn(`[AgentMoss] \u610F\u56FE\u4E00\u81F4\u6027\u670D\u52A1\u4E0D\u53EF\u7528\uFF0C\u8DF3\u8FC7 ${INTENT_GUARD_LAYER}: ${e.message}`);
15425
- return null;
15426
- }
15427
- const rec = body;
15428
- if (!rec || !["ALLOW", "DENY", "UNCERTAIN"].includes(rec.decision)) {
15429
- console.warn(`[AgentMoss] \u610F\u56FE\u4E00\u81F4\u6027\u670D\u52A1\u8FD4\u56DE\u975E\u6CD5\u54CD\u5E94\uFF0C\u8DF3\u8FC7 ${INTENT_GUARD_LAYER}`);
15430
- return null;
15431
- }
15432
- return rec;
15433
- }
15434
- function toIntentGuardJudgment(rec) {
15435
- if (rec.decision === "ALLOW") return null;
15436
- const detail = rec.detail || "";
15437
- const rule = rec.rule || "";
15438
- const probs = `p_allow=${(rec.p_allow ?? 0).toFixed(3)} p_deny=${(rec.p_deny ?? 0).toFixed(3)} p_uncertain=${(rec.p_uncertain ?? 0).toFixed(3)}`;
15439
- if (isIntentGuardObserveMode()) {
15440
- console.warn(
15441
- `[AgentMoss] \u610F\u56FE\u4E00\u81F4\u6027 observe\uFF08\u53EA\u8BB0\u5F55\u4E0D\u62E6\u622A\uFF09: decision=${rec.decision} rule=${rule} ${probs} | ${detail}`
15442
- );
15443
- return null;
15444
- }
15445
- if (rec.decision === "UNCERTAIN" && uncertainPolicy() !== "deny") {
15446
- return null;
15447
- }
15448
- const uncertain = rec.decision === "UNCERTAIN";
15449
- return {
15450
- riskLevel: uncertain ? "medium" : "high",
15451
- riskType: uncertain ? "intent_uncertain" : "intent_deviation",
15452
- reason: `\u52A8\u4F5C\u4E0E\u7528\u6237\u539F\u59CB\u610F\u56FE\u4E0D\u4E00\u81F4\uFF08${uncertain ? "\u65E0\u6CD5\u5224\u5B9A\uFF0C\u9700\u4EBA\u5DE5\u786E\u8BA4" : "\u8D8A\u6743"}\uFF09\uFF1A${detail}\uFF1B${probs}`,
15453
- confidence: Math.round(100 * ((uncertain ? rec.p_uncertain : rec.p_deny) ?? 0)),
15454
- rule
15455
- };
15456
- }
15457
- var INTENT_GUARD_LAYER;
15458
- var init_intent_guard = __esm({
15459
- "src/engine/intent-guard.ts"() {
15460
- "use strict";
15461
- init_esm_shims();
15462
- init_config();
15463
- INTENT_GUARD_LAYER = "L2.4";
15464
- }
15465
- });
15466
-
15467
15298
  // src/engine/coordinator.ts
15468
15299
  var coordinator_exports = {};
15469
15300
  __export(coordinator_exports, {
@@ -15865,28 +15696,6 @@ async function runAnalysis(input) {
15865
15696
  }
15866
15697
  }
15867
15698
  }
15868
- if (isLogicRulesEnabled() && isIntentGuardEnabled()) {
15869
- const rec = await judgeIntentGuard({
15870
- promptSession: input.promptSession,
15871
- actionHistory: input.actionHistory.map((a) => ({ actionType: a.actionType, actionDetail: a.actionDetail })),
15872
- aNext: { actionType: input.aNext.actionType, actionDetail: input.aNext.actionDetail },
15873
- reason: input.reason,
15874
- promptHistory: input.promptHistory,
15875
- cwd: input.cwd
15876
- });
15877
- const hit = rec ? toIntentGuardJudgment(rec) : null;
15878
- if (hit) {
15879
- return {
15880
- allowed: false,
15881
- reason: hit.reason,
15882
- riskLevel: hit.riskLevel,
15883
- riskType: hit.riskType,
15884
- confidence: hit.confidence,
15885
- source: "intent_guard",
15886
- violatedLayers: [...observedFormalLayers, INTENT_GUARD_LAYER]
15887
- };
15888
- }
15889
- }
15890
15699
  if (brainStore) {
15891
15700
  const brainL2 = checkBrainRules(brainStore, {
15892
15701
  layer: 2,
@@ -16040,7 +15849,6 @@ var init_coordinator = __esm({
16040
15849
  init_asset_dir();
16041
15850
  init_runtime_config_bridge();
16042
15851
  init_formal_engine();
16043
- init_intent_guard();
16044
15852
  TRUSTED_SKILLS_BASE = /* @__PURE__ */ new Set([]);
16045
15853
  _brainStore = null;
16046
15854
  _brainExtractor = null;
@@ -18008,13 +17816,6 @@ function createConsoleRouter() {
18008
17816
  };
18009
17817
  console2.get("/", serveIndex);
18010
17818
  console2.get("", serveIndex);
18011
- console2.get("/static/vendor/echarts.min.js", (c) => {
18012
- const asset = join22(STATIC_DIR, "vendor", "echarts.min.js");
18013
- if (!existsSync21(asset)) return c.notFound();
18014
- return c.body(readFileSync21(asset, "utf-8"), 200, {
18015
- "Content-Type": "application/javascript; charset=utf-8"
18016
- });
18017
- });
18018
17819
  console2.get("/api/layers", (c) => {
18019
17820
  const rc = displayRuntimeConfig();
18020
17821
  return c.json({ layers: rc.layers, env_overrides: getEnvOverrides(), builtin_only: isBuiltinOnly(), rules_mode: getRulesMode() });
@@ -4,7 +4,7 @@
4
4
  <meta charset="UTF-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
6
  <title>AgentMoss 安全策略管控台</title>
7
- <script src="/console/static/vendor/echarts.min.js"></script>
7
+ <script src="https://cdn.jsdelivr.net/npm/echarts@5.4.3/dist/echarts.min.js"></script>
8
8
  <style>
9
9
  /* ===== OpenDesk --ag- design tokens(浅色玻璃态 + dark mode)===== */
10
10
  :root {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kenhkl/agent-moss",
3
- "version": "0.17.44",
3
+ "version": "0.17.45",
4
4
  "description": "Multi-layer security analysis engine for AI agents (TypeScript)",
5
5
  "type": "module",
6
6
  "main": "dist/server.js",
@@ -1,222 +0,0 @@
1
-
2
- Apache License
3
- Version 2.0, January 2004
4
- http://www.apache.org/licenses/
5
-
6
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
-
8
- 1. Definitions.
9
-
10
- "License" shall mean the terms and conditions for use, reproduction,
11
- and distribution as defined by Sections 1 through 9 of this document.
12
-
13
- "Licensor" shall mean the copyright owner or entity authorized by
14
- the copyright owner that is granting the License.
15
-
16
- "Legal Entity" shall mean the union of the acting entity and all
17
- other entities that control, are controlled by, or are under common
18
- control with that entity. For the purposes of this definition,
19
- "control" means (i) the power, direct or indirect, to cause the
20
- direction or management of such entity, whether by contract or
21
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
- outstanding shares, or (iii) beneficial ownership of such entity.
23
-
24
- "You" (or "Your") shall mean an individual or Legal Entity
25
- exercising permissions granted by this License.
26
-
27
- "Source" form shall mean the preferred form for making modifications,
28
- including but not limited to software source code, documentation
29
- source, and configuration files.
30
-
31
- "Object" form shall mean any form resulting from mechanical
32
- transformation or translation of a Source form, including but
33
- not limited to compiled object code, generated documentation,
34
- and conversions to other media types.
35
-
36
- "Work" shall mean the work of authorship, whether in Source or
37
- Object form, made available under the License, as indicated by a
38
- copyright notice that is included in or attached to the work
39
- (an example is provided in the Appendix below).
40
-
41
- "Derivative Works" shall mean any work, whether in Source or Object
42
- form, that is based on (or derived from) the Work and for which the
43
- editorial revisions, annotations, elaborations, or other modifications
44
- represent, as a whole, an original work of authorship. For the purposes
45
- of this License, Derivative Works shall not include works that remain
46
- separable from, or merely link (or bind by name) to the interfaces of,
47
- the Work and Derivative Works thereof.
48
-
49
- "Contribution" shall mean any work of authorship, including
50
- the original version of the Work and any modifications or additions
51
- to that Work or Derivative Works thereof, that is intentionally
52
- submitted to Licensor for inclusion in the Work by the copyright owner
53
- or by an individual or Legal Entity authorized to submit on behalf of
54
- the copyright owner. For the purposes of this definition, "submitted"
55
- means any form of electronic, verbal, or written communication sent
56
- to the Licensor or its representatives, including but not limited to
57
- communication on electronic mailing lists, source code control systems,
58
- and issue tracking systems that are managed by, or on behalf of, the
59
- Licensor for the purpose of discussing and improving the Work, but
60
- excluding communication that is conspicuously marked or otherwise
61
- designated in writing by the copyright owner as "Not a Contribution."
62
-
63
- "Contributor" shall mean Licensor and any individual or Legal Entity
64
- on behalf of whom a Contribution has been received by Licensor and
65
- subsequently incorporated within the Work.
66
-
67
- 2. Grant of Copyright License. Subject to the terms and conditions of
68
- this License, each Contributor hereby grants to You a perpetual,
69
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
- copyright license to reproduce, prepare Derivative Works of,
71
- publicly display, publicly perform, sublicense, and distribute the
72
- Work and such Derivative Works in Source or Object form.
73
-
74
- 3. Grant of Patent License. Subject to the terms and conditions of
75
- this License, each Contributor hereby grants to You a perpetual,
76
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
- (except as stated in this section) patent license to make, have made,
78
- use, offer to sell, sell, import, and otherwise transfer the Work,
79
- where such license applies only to those patent claims licensable
80
- by such Contributor that are necessarily infringed by their
81
- Contribution(s) alone or by combination of their Contribution(s)
82
- with the Work to which such Contribution(s) was submitted. If You
83
- institute patent litigation against any entity (including a
84
- cross-claim or counterclaim in a lawsuit) alleging that the Work
85
- or a Contribution incorporated within the Work constitutes direct
86
- or contributory patent infringement, then any patent licenses
87
- granted to You under this License for that Work shall terminate
88
- as of the date such litigation is filed.
89
-
90
- 4. Redistribution. You may reproduce and distribute copies of the
91
- Work or Derivative Works thereof in any medium, with or without
92
- modifications, and in Source or Object form, provided that You
93
- meet the following conditions:
94
-
95
- (a) You must give any other recipients of the Work or
96
- Derivative Works a copy of this License; and
97
-
98
- (b) You must cause any modified files to carry prominent notices
99
- stating that You changed the files; and
100
-
101
- (c) You must retain, in the Source form of any Derivative Works
102
- that You distribute, all copyright, patent, trademark, and
103
- attribution notices from the Source form of the Work,
104
- excluding those notices that do not pertain to any part of
105
- the Derivative Works; and
106
-
107
- (d) If the Work includes a "NOTICE" text file as part of its
108
- distribution, then any Derivative Works that You distribute must
109
- include a readable copy of the attribution notices contained
110
- within such NOTICE file, excluding those notices that do not
111
- pertain to any part of the Derivative Works, in at least one
112
- of the following places: within a NOTICE text file distributed
113
- as part of the Derivative Works; within the Source form or
114
- documentation, if provided along with the Derivative Works; or,
115
- within a display generated by the Derivative Works, if and
116
- wherever such third-party notices normally appear. The contents
117
- of the NOTICE file are for informational purposes only and
118
- do not modify the License. You may add Your own attribution
119
- notices within Derivative Works that You distribute, alongside
120
- or as an addendum to the NOTICE text from the Work, provided
121
- that such additional attribution notices cannot be construed
122
- as modifying the License.
123
-
124
- You may add Your own copyright statement to Your modifications and
125
- may provide additional or different license terms and conditions
126
- for use, reproduction, or distribution of Your modifications, or
127
- for any such Derivative Works as a whole, provided Your use,
128
- reproduction, and distribution of the Work otherwise complies with
129
- the conditions stated in this License.
130
-
131
- 5. Submission of Contributions. Unless You explicitly state otherwise,
132
- any Contribution intentionally submitted for inclusion in the Work
133
- by You to the Licensor shall be under the terms and conditions of
134
- this License, without any additional terms or conditions.
135
- Notwithstanding the above, nothing herein shall supersede or modify
136
- the terms of any separate license agreement you may have executed
137
- with Licensor regarding such Contributions.
138
-
139
- 6. Trademarks. This License does not grant permission to use the trade
140
- names, trademarks, service marks, or product names of the Licensor,
141
- except as required for reasonable and customary use in describing the
142
- origin of the Work and reproducing the content of the NOTICE file.
143
-
144
- 7. Disclaimer of Warranty. Unless required by applicable law or
145
- agreed to in writing, Licensor provides the Work (and each
146
- Contributor provides its Contributions) on an "AS IS" BASIS,
147
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
- implied, including, without limitation, any warranties or conditions
149
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
- PARTICULAR PURPOSE. You are solely responsible for determining the
151
- appropriateness of using or redistributing the Work and assume any
152
- risks associated with Your exercise of permissions under this License.
153
-
154
- 8. Limitation of Liability. In no event and under no legal theory,
155
- whether in tort (including negligence), contract, or otherwise,
156
- unless required by applicable law (such as deliberate and grossly
157
- negligent acts) or agreed to in writing, shall any Contributor be
158
- liable to You for damages, including any direct, indirect, special,
159
- incidental, or consequential damages of any character arising as a
160
- result of this License or out of the use or inability to use the
161
- Work (including but not limited to damages for loss of goodwill,
162
- work stoppage, computer failure or malfunction, or any and all
163
- other commercial damages or losses), even if such Contributor
164
- has been advised of the possibility of such damages.
165
-
166
- 9. Accepting Warranty or Additional Liability. While redistributing
167
- the Work or Derivative Works thereof, You may choose to offer,
168
- and charge a fee for, acceptance of support, warranty, indemnity,
169
- or other liability obligations and/or rights consistent with this
170
- License. However, in accepting such obligations, You may act only
171
- on Your own behalf and on Your sole responsibility, not on behalf
172
- of any other Contributor, and only if You agree to indemnify,
173
- defend, and hold each Contributor harmless for any liability
174
- incurred by, or claims asserted against, such Contributor by reason
175
- of your accepting any such warranty or additional liability.
176
-
177
- END OF TERMS AND CONDITIONS
178
-
179
- APPENDIX: How to apply the Apache License to your work.
180
-
181
- To apply the Apache License to your work, attach the following
182
- boilerplate notice, with the fields enclosed by brackets "[]"
183
- replaced with your own identifying information. (Don't include
184
- the brackets!) The text should be enclosed in the appropriate
185
- comment syntax for the file format. We also recommend that a
186
- file or class name and description of purpose be included on the
187
- same "printed page" as the copyright notice for easier
188
- identification within third-party archives.
189
-
190
- Copyright [yyyy] [name of copyright owner]
191
-
192
- Licensed under the Apache License, Version 2.0 (the "License");
193
- you may not use this file except in compliance with the License.
194
- You may obtain a copy of the License at
195
-
196
- http://www.apache.org/licenses/LICENSE-2.0
197
-
198
- Unless required by applicable law or agreed to in writing, software
199
- distributed under the License is distributed on an "AS IS" BASIS,
200
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
- See the License for the specific language governing permissions and
202
- limitations under the License.
203
-
204
-
205
-
206
-
207
-
208
- ========================================================================
209
- Apache ECharts Subcomponents:
210
-
211
- The Apache ECharts project contains subcomponents with separate copyright
212
- notices and license terms. Your use of the source code for these
213
- subcomponents is also subject to the terms and conditions of the following
214
- licenses.
215
-
216
- BSD 3-Clause (d3.js):
217
- The following files embed [d3.js](https://github.com/d3/d3) BSD 3-Clause:
218
- `/src/chart/treemap/treemapLayout.ts`,
219
- `/src/chart/tree/layoutHelper.ts`,
220
- `/src/chart/graph/forceHelper.ts`,
221
- `/src/util/number.ts`
222
- See `/licenses/LICENSE-d3` for details of the license.
@@ -1,10 +0,0 @@
1
- # Console 内置前端依赖
2
-
3
- 为保证内网/离线环境可用,以下第三方前端库随包内置,不从公网 CDN 加载。
4
-
5
- | 文件 | 版本 | 来源 | 许可证 |
6
- |---|---|---|---|
7
- | `echarts.min.js` | 5.4.3 | https://cdn.jsdelivr.net/npm/echarts@5.4.3/dist/echarts.min.js | Apache-2.0(见 `ECHARTS_LICENSE.txt`) |
8
-
9
- 升级 ECharts 时同时替换 JS 与许可证文件,并同步更新 `agent_moss/console/static/index.html`
10
- 和 `ts/src/console/static/index.html` 中的引用。