@kenhkl/agent-moss 0.10.2 → 0.10.3
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/cli.js +8 -2
- package/dist/cli.js.map +1 -1
- package/dist/server.js +8 -2
- package/dist/server.js.map +1 -1
- package/package.json +1 -1
package/dist/server.js
CHANGED
|
@@ -3278,7 +3278,11 @@ var AnalyzeResponseSchema = z.object({
|
|
|
3278
3278
|
});
|
|
3279
3279
|
var HealthResponseSchema = z.object({
|
|
3280
3280
|
status: z.string().default("healthy"),
|
|
3281
|
-
version: z.string().default(version)
|
|
3281
|
+
version: z.string().default(version),
|
|
3282
|
+
// 归属实例标识:值来自 env AGENT_MOSS_INSTANCE(spawn/systemd 注入),默认空串。
|
|
3283
|
+
// 多个 agentmoss 同机并存时,调用方按 instance 过滤避免连到别人的进程。
|
|
3284
|
+
// 空=未配置(独立部署或旧版),调用方可选择兼容或严格过滤。
|
|
3285
|
+
instance: z.string().default("")
|
|
3282
3286
|
});
|
|
3283
3287
|
|
|
3284
3288
|
// src/engine/coordinator.ts
|
|
@@ -4652,7 +4656,9 @@ function reportEnforcementEvent(opts) {
|
|
|
4652
4656
|
|
|
4653
4657
|
// src/routes.ts
|
|
4654
4658
|
async function healthRoute(c) {
|
|
4655
|
-
return c.json(HealthResponseSchema.parse({
|
|
4659
|
+
return c.json(HealthResponseSchema.parse({
|
|
4660
|
+
instance: process.env.AGENT_MOSS_INSTANCE || ""
|
|
4661
|
+
}));
|
|
4656
4662
|
}
|
|
4657
4663
|
async function analyzeRoute(c) {
|
|
4658
4664
|
const t0 = performance.now();
|