@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 CHANGED
@@ -4586,7 +4586,11 @@ var AnalyzeResponseSchema = z.object({
4586
4586
  });
4587
4587
  var HealthResponseSchema = z.object({
4588
4588
  status: z.string().default("healthy"),
4589
- version: z.string().default(version)
4589
+ version: z.string().default(version),
4590
+ // 归属实例标识:值来自 env AGENT_MOSS_INSTANCE(spawn/systemd 注入),默认空串。
4591
+ // 多个 agentmoss 同机并存时,调用方按 instance 过滤避免连到别人的进程。
4592
+ // 空=未配置(独立部署或旧版),调用方可选择兼容或严格过滤。
4593
+ instance: z.string().default("")
4590
4594
  });
4591
4595
 
4592
4596
  // src/routes.ts
@@ -4695,7 +4699,9 @@ function reportEnforcementEvent(opts) {
4695
4699
 
4696
4700
  // src/routes.ts
4697
4701
  async function healthRoute(c) {
4698
- return c.json(HealthResponseSchema.parse({}));
4702
+ return c.json(HealthResponseSchema.parse({
4703
+ instance: process.env.AGENT_MOSS_INSTANCE || ""
4704
+ }));
4699
4705
  }
4700
4706
  async function analyzeRoute(c) {
4701
4707
  const t0 = performance.now();