agentosity 0.1.0 → 0.1.1

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/package.json CHANGED
@@ -1,14 +1,26 @@
1
1
  {
2
2
  "name": "agentosity",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Agentosity — AI-native is a number now. Automatic attendance for your AI agents (stdio MCP lifecycle + activity probes) + human clock-out CLI.",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "agentosity": "./bin/agentosity.js"
8
8
  },
9
- "files": ["bin", "src"],
10
- "engines": { "node": ">=18" },
11
- "keywords": ["mcp", "agent", "agent-hours", "claude-code", "codex", "xiabanbang"],
9
+ "files": [
10
+ "bin",
11
+ "src"
12
+ ],
13
+ "engines": {
14
+ "node": ">=18"
15
+ },
16
+ "keywords": [
17
+ "mcp",
18
+ "agent",
19
+ "agent-hours",
20
+ "claude-code",
21
+ "codex",
22
+ "xiabanbang"
23
+ ],
12
24
  "homepage": "https://agentosity.com",
13
25
  "repository": {
14
26
  "type": "git",
package/src/index.js CHANGED
@@ -8,7 +8,7 @@ export async function main(argv) {
8
8
  switch (cmd) {
9
9
  case "serve": {
10
10
  const cfg = loadConfig();
11
- serve({ company: argv[1] || cfg.company });
11
+ serve({ company: argv[1] || cfg.company, deviceId: cfg.deviceId });
12
12
  return; // 常驻,直到 harness 关闭
13
13
  }
14
14
  case "init":
package/src/mcp.js CHANGED
@@ -9,7 +9,7 @@ const HEARTBEAT_MS = parseInt(process.env.AGENTOSITY_HB_MS ?? "", 10) || 60_000;
9
9
  * stdio MCP 考勤服务:harness 拉起本进程即上班,杀掉即下班。
10
10
  * 模型零参与:initialize 握手 = start,stdin EOF / SIGTERM = end(遗言),心跳为准。
11
11
  */
12
- export function serve({ company }) {
12
+ export function serve({ company, deviceId }) {
13
13
  const startMs = Date.now();
14
14
  let sessionId = null;
15
15
  let startPromise = null;
@@ -24,7 +24,7 @@ export function serve({ company }) {
24
24
 
25
25
  function startSession() {
26
26
  if (!company || startPromise) return;
27
- startPromise = post("/api/agent/start", { company, harness, probe: probeLabel }).then((r) => {
27
+ startPromise = post("/api/agent/start", { company, harness, probe: probeLabel, deviceId }).then((r) => {
28
28
  if (r?.session_id) sessionId = r.session_id;
29
29
  });
30
30
  }