@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.
- package/dist/adapters/device-android-adb.js +7 -8
- package/dist/adapters/device-android-adb.js.map +1 -1
- package/dist/bootstrap.js +2 -4
- package/dist/bootstrap.js.map +1 -1
- package/dist/config/paths.d.ts +10 -0
- package/dist/config/paths.js +12 -0
- package/dist/config/paths.js.map +1 -1
- package/dist/device/android.js +19 -2
- package/dist/device/android.js.map +1 -1
- package/dist/messaging/message-client.d.ts +28 -1
- package/dist/messaging/message-client.js +11 -0
- package/dist/messaging/message-client.js.map +1 -1
- package/dist/plugins/agent-sync/index.d.ts +7 -7
- package/dist/plugins/agent-sync/index.js +9 -13
- package/dist/plugins/agent-sync/index.js.map +1 -1
- package/dist/plugins/message-bus/cancel.js +4 -1
- package/dist/plugins/message-bus/cancel.js.map +1 -1
- package/dist/plugins/message-bus/inbound.js +8 -0
- package/dist/plugins/message-bus/inbound.js.map +1 -1
- package/dist/plugins/message-bus/ms-channel-notifier.d.ts +46 -36
- package/dist/plugins/message-bus/ms-channel-notifier.js +365 -65
- package/dist/plugins/message-bus/ms-channel-notifier.js.map +1 -1
- package/dist/plugins/message-bus/ms-inflight-tracker.d.ts +3 -0
- package/dist/plugins/message-bus/ms-inflight-tracker.js +6 -0
- package/dist/plugins/message-bus/ms-inflight-tracker.js.map +1 -1
- package/dist/runtime-authority/contract.d.ts +16 -15
- package/dist/runtime-authority/contract.js +24 -28
- package/dist/runtime-authority/contract.js.map +1 -1
- package/package.json +2 -2
|
@@ -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
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
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
|
|
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
|
-
*
|
|
16
|
-
*
|
|
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
|
|
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
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
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
|
|
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
|
-
*
|
|
19
|
-
*
|
|
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 =
|
|
25
|
-
|
|
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
|
-
|
|
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(`
|
|
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,EAA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AC5C,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.
|
|
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.
|
|
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",
|