@lingda-ai/dsh-plugin-hublink 0.1.0 → 0.1.2

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
@@ -59,6 +59,13 @@ hublink enroll --hub http://10.0.0.8:3000/extension/agentops/api/openapi --token
59
59
 
60
60
  `hubUrl` 填到 `.../api/openapi` 为止,插件自己拼 `/ingest`、`/policy`、`/enroll`。
61
61
 
62
+ 生产环境两种写法:
63
+
64
+ - SaaS:`https://api.lingport.lingda-ai.com/extension/agentops/api/openapi`
65
+ - 私有化:`https://hub.<客户内网域名>/extension/agentops/api/openapi`(无反代时 `http://10.0.0.8:3000/extension/agentops/api/openapi`)
66
+
67
+ `hubUrl` 缺失或非法时插件拒绝启动(宁可起不来,也不要半套配置静默跑,导致 spool 无限增长)。
68
+
62
69
  ## CLI
63
70
 
64
71
  ```bash
package/bin/hublink.js CHANGED
@@ -19,7 +19,7 @@ import { createClient } from "../lib/http.js"
19
19
  import { createOutbox } from "../lib/outbox.js"
20
20
  import { readCache } from "../lib/policy.js"
21
21
 
22
- const USAGE = `hublink 0.1.0 — 灵港(LingPort)采集端
22
+ const USAGE = `hublink 0.1.1 — 灵港(LingPort)采集端
23
23
 
24
24
  hublink enroll --hub <url> --token <令牌> [--machine-id <id>] [--config <path>]
25
25
  hublink status [--config <path>]
package/lib/index.js CHANGED
@@ -9,13 +9,13 @@
9
9
  * 刻意不做:面板、图表、额度拦截。拦截必须在 LLM 网关,插件侧拦不住;
10
10
  * 面板由 hub 控制台与空港套件负责,这里重复做只会造成"两个金额"。
11
11
  */
12
- import { createTelemetryBackend, collectFromLedger } from "./lib/collect.js"
13
- import { normalizeConfig } from "./lib/config.js"
14
- import { loadCredentials } from "./lib/credentials.js"
15
- import { flushOnce } from "./lib/flush.js"
16
- import { createClient } from "./lib/http.js"
17
- import { createOutbox } from "./lib/outbox.js"
18
- import { refreshPolicy, evaluateBudget } from "./lib/policy.js"
12
+ import { createTelemetryBackend, collectFromLedger } from "./collect.js"
13
+ import { normalizeConfig } from "./config.js"
14
+ import { loadCredentials } from "./credentials.js"
15
+ import { flushOnce } from "./flush.js"
16
+ import { createClient } from "./http.js"
17
+ import { createOutbox } from "./outbox.js"
18
+ import { refreshPolicy, evaluateBudget } from "./policy.js"
19
19
 
20
20
  export const name = "@lingda-ai/dsh-plugin-hublink"
21
21
  export const inject = []
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingda-ai/dsh-plugin-hublink",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "description": "DSH 插件:把本机用量上报到灵港(LingPort)hub。outbox + 批量 + 幂等键,凭证只落 0600 文件,脱敏规则强制生效,拉策略走 ETag。零运行时依赖。",
@@ -63,11 +63,12 @@
63
63
  ]
64
64
  }
65
65
  },
66
- "peerDependencies": {
67
- "@deepseek-ai/cordis": "*"
68
- },
69
66
  "scripts": {
70
67
  "test": "node --test test/*.test.mjs",
71
- "e2e": "node --test test/e2e.test.mjs"
68
+ "e2e": "node --test test/e2e.test.mjs",
69
+ "prepublishOnly": "node --test test/*.test.mjs"
70
+ },
71
+ "peerDependencies": {
72
+ "@deepseek-ai/cordis": "*"
72
73
  }
73
74
  }