@beeos-ai/device-agent 0.12.1 → 0.12.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.
@@ -1,26 +1,27 @@
1
1
  export declare const DEVICE_RUNTIME_CONTRACT_REVISION = "2026-07-14.3";
2
2
  export declare const DEVICE_RUNTIME_RPC_PROTOCOL_VERSION = 1;
3
3
  /**
4
- * Review-frozen digest of the BeeOS Types 4 method manifest, which is the only
5
- * manifest the Agent Gateway admits. It is kept outside the manifest so the
6
- * hash input can never become self-referential.
7
- *
8
- * The digest identifies the *contract vocabulary* both sides compiled against;
9
- * it is not a claim that this runtime serves every method in it. What this
10
- * runtime actually serves is declared separately in DEVICE_RUNTIME_METHODS,
11
- * which the gateway uses as the dispatch allowlist.
4
+ * Projection-only runtimes hold a lease only to publish their Agent projection;
5
+ * they do not accept runtime RPC. This object is the exact canonical contract
6
+ * admitted by Backend's shared/runtimeauth registry.
12
7
  */
13
- export declare const ADMITTED_RUNTIME_MANIFEST_DIGEST = "2746b3d10fd1aed3fa23f717c58dbf7175d04e74274aee8a5a56230f7ce18206";
8
+ export declare const DEVICE_RUNTIME_MANIFEST: Readonly<{
9
+ schemaVersion: 1;
10
+ kind: "beeos.device-agent.projection-runtime";
11
+ contractRevision: "2026-07-14.3";
12
+ runtimeRpcProtocolVersion: 1;
13
+ runtimeMethods: readonly string[];
14
+ capabilities: readonly string[];
15
+ authorityRoutes: readonly string[];
16
+ }>;
17
+ export declare const ADMITTED_RUNTIME_MANIFEST_DIGEST = "0c5cc7469a6373ffac9b7ca9cba90df9ee24bf48f38487a949bf352b7a2ee73c";
14
18
  /**
15
- * Projection-only runtime: device-agent holds a runtime lease so it can publish
16
- * its Agent projection, and does not accept ACP service RPC. These names stay
17
- * deliberately outside the ACP method vocabulary so the gateway's exact-match
18
- * dispatch allowlist can never route session/* traffic to a handler this
19
- * runtime does not own.
19
+ * Keep the registration claims honest. Empty arrays are intentional and are
20
+ * encoded as [] (not omitted/null), which Backend admits for this digest only.
20
21
  */
21
22
  export declare const DEVICE_RUNTIME_METHODS: readonly string[];
22
23
  export declare const DEVICE_RUNTIME_CAPABILITIES: readonly string[];
23
- /** Recompute the digest from the exact installed registry artifact. */
24
+ /** Recompute the digest from the exact device projection contract. */
24
25
  export declare function computeAdmittedManifestDigest(): string;
25
26
  export declare function requireAdmittedManifestDigest(actual: string): string;
26
27
  /** Registration must fail closed before any runtime authority is advertised. */
@@ -1,42 +1,38 @@
1
- import { readFileSync } from "node:fs";
2
- import { createRequire } from "node:module";
3
1
  import { canonicalizeJcs, sha256Hex } from "./canonical.js";
4
2
  export const DEVICE_RUNTIME_CONTRACT_REVISION = "2026-07-14.3";
5
3
  export const DEVICE_RUNTIME_RPC_PROTOCOL_VERSION = 1;
6
4
  /**
7
- * Review-frozen digest of the BeeOS Types 4 method manifest, which is the only
8
- * manifest the Agent Gateway admits. It is kept outside the manifest so the
9
- * hash input can never become self-referential.
10
- *
11
- * The digest identifies the *contract vocabulary* both sides compiled against;
12
- * it is not a claim that this runtime serves every method in it. What this
13
- * runtime actually serves is declared separately in DEVICE_RUNTIME_METHODS,
14
- * which the gateway uses as the dispatch allowlist.
5
+ * Projection-only runtimes hold a lease only to publish their Agent projection;
6
+ * they do not accept runtime RPC. This object is the exact canonical contract
7
+ * admitted by Backend's shared/runtimeauth registry.
15
8
  */
16
- export const ADMITTED_RUNTIME_MANIFEST_DIGEST = "2746b3d10fd1aed3fa23f717c58dbf7175d04e74274aee8a5a56230f7ce18206";
9
+ export const DEVICE_RUNTIME_MANIFEST = Object.freeze({
10
+ schemaVersion: 1,
11
+ kind: "beeos.device-agent.projection-runtime",
12
+ contractRevision: DEVICE_RUNTIME_CONTRACT_REVISION,
13
+ runtimeRpcProtocolVersion: DEVICE_RUNTIME_RPC_PROTOCOL_VERSION,
14
+ runtimeMethods: Object.freeze([]),
15
+ capabilities: Object.freeze([]),
16
+ authorityRoutes: Object.freeze([
17
+ "POST /api/v1/runtime/registrations",
18
+ "POST /api/v1/runtime/registrations/{registrationId}/heartbeat",
19
+ "POST /api/v1/agents/sync",
20
+ ]),
21
+ });
22
+ export const ADMITTED_RUNTIME_MANIFEST_DIGEST = "0c5cc7469a6373ffac9b7ca9cba90df9ee24bf48f38487a949bf352b7a2ee73c";
17
23
  /**
18
- * Projection-only runtime: device-agent holds a runtime lease so it can publish
19
- * its Agent projection, and does not accept ACP service RPC. These names stay
20
- * deliberately outside the ACP method vocabulary so the gateway's exact-match
21
- * dispatch allowlist can never route session/* traffic to a handler this
22
- * runtime does not own.
24
+ * Keep the registration claims honest. Empty arrays are intentional and are
25
+ * encoded as [] (not omitted/null), which Backend admits for this digest only.
23
26
  */
24
- export const DEVICE_RUNTIME_METHODS = Object.freeze([
25
- "device-agent/agents.sync",
26
- ]);
27
- export const DEVICE_RUNTIME_CAPABILITIES = Object.freeze([
28
- "device-agent-projection",
29
- ]);
30
- const require = createRequire(import.meta.url);
31
- /** Recompute the digest from the exact installed registry artifact. */
27
+ export const DEVICE_RUNTIME_METHODS = DEVICE_RUNTIME_MANIFEST.runtimeMethods;
28
+ export const DEVICE_RUNTIME_CAPABILITIES = DEVICE_RUNTIME_MANIFEST.capabilities;
29
+ /** Recompute the digest from the exact device projection contract. */
32
30
  export function computeAdmittedManifestDigest() {
33
- const manifestPath = require.resolve("@beeos-ai/beeos-types/contracts/runtime-method-manifest.v1.json");
34
- const manifest = JSON.parse(readFileSync(manifestPath, "utf8"));
35
- return sha256Hex(canonicalizeJcs(manifest));
31
+ return sha256Hex(canonicalizeJcs(DEVICE_RUNTIME_MANIFEST));
36
32
  }
37
33
  export function requireAdmittedManifestDigest(actual) {
38
34
  if (actual !== ADMITTED_RUNTIME_MANIFEST_DIGEST) {
39
- throw new Error(`BeeOS Types manifest digest mismatch: expected ${ADMITTED_RUNTIME_MANIFEST_DIGEST}, received ${actual}`);
35
+ throw new Error(`device projection manifest digest mismatch: expected ${ADMITTED_RUNTIME_MANIFEST_DIGEST}, received ${actual}`);
40
36
  }
41
37
  return actual;
42
38
  }
@@ -1 +1 @@
1
- {"version":3,"file":"contract.js","sourceRoot":"","sources":["../../src/runtime-authority/contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE5D,MAAM,CAAC,MAAM,gCAAgC,GAAG,cAAc,CAAC;AAC/D,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,CAAC;AAErD;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAC3C,kEAAkE,CAAC;AAErE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAsB,MAAM,CAAC,MAAM,CAAC;IACrE,0BAA0B;CAC3B,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,2BAA2B,GAAsB,MAAM,CAAC,MAAM,CAAC;IAC1E,yBAAyB;CAC1B,CAAC,CAAC;AAEH,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAE/C,uEAAuE;AACvE,MAAM,UAAU,6BAA6B;IAC3C,MAAM,YAAY,GAAG,OAAO,CAAC,OAAO,CAClC,iEAAiE,CAClE,CAAC;IACF,MAAM,QAAQ,GAAY,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAC;IACzE,OAAO,SAAS,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,6BAA6B,CAAC,MAAc;IAC1D,IAAI,MAAM,KAAK,gCAAgC,EAAE,CAAC;QAChD,MAAM,IAAI,KAAK,CACb,kDAAkD,gCAAgC,cAAc,MAAM,EAAE,CACzG,CAAC;IACJ,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,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;AAC7D,CAAC;AAED,MAAM,UAAU,6BAA6B,CAAC,MAAc;IAC1D,IAAI,MAAM,KAAK,gCAAgC,EAAE,CAAC;QAChD,MAAM,IAAI,KAAK,CACb,wDAAwD,gCAAgC,cAAc,MAAM,EAAE,CAC/G,CAAC;IACJ,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,gFAAgF;AAChF,MAAM,UAAU,8BAA8B;IAC5C,OAAO,6BAA6B,CAAC,6BAA6B,EAAE,CAAC,CAAC;AACxE,CAAC;AAED,MAAM,CAAC,MAAM,gCAAgC,GAAG,+BAA+B,CAAC;AAChF,MAAM,CAAC,MAAM,6BAA6B,GAAG,4BAA4B,CAAC;AAC1E,MAAM,CAAC,MAAM,4BAA4B,GAAG,mCAAmC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@beeos-ai/device-agent",
3
- "version": "0.12.1",
3
+ "version": "0.12.3",
4
4
  "description": "BeeOS device-agent — Android/desktop AI control agent (TypeScript) speaking ACP over Bridge WebSocket. Connects to a sibling device-mcp-server process for device control.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -71,7 +71,7 @@
71
71
  "tsx": "^4.19.0",
72
72
  "typescript": "^5.8.0",
73
73
  "vitest": "^4.1.5",
74
- "@beeos-ai/device-mcp-server": "0.4.6"
74
+ "@beeos-ai/device-mcp-server": "0.4.7"
75
75
  },
76
76
  "scripts": {
77
77
  "build": "tsc -p tsconfig.json && chmod +x dist/inbound/cli/main.js",