@agentworkforce/events 0.1.0
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/README.md +15 -0
- package/package.json +43 -0
package/README.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# @agentworkforce/events
|
|
2
|
+
|
|
3
|
+
Canonical, transport-independent Event wire contracts for AgentWorkforce.
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
import { decodeEventFrame, getEventContract } from '@agentworkforce/events';
|
|
7
|
+
|
|
8
|
+
const decoded = decodeEventFrame(input);
|
|
9
|
+
const contract = getEventContract(decoded.frame.type, decoded.frame.contractVersion);
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
`decodeEventFrame` accepts the canonical `EventFrameV1` and the legacy
|
|
13
|
+
Workforce gateway envelope. Legacy decoding is explicit in the returned
|
|
14
|
+
`compatibility` metadata. Known versioned frames reject unknown top-level
|
|
15
|
+
fields; forward-compatible data belongs in `extensions`.
|
package/package.json
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@agentworkforce/events",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"default": "./dist/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./schemas": {
|
|
14
|
+
"types": "./dist/schemas.d.ts",
|
|
15
|
+
"default": "./dist/schemas.js"
|
|
16
|
+
},
|
|
17
|
+
"./package.json": "./package.json"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist",
|
|
21
|
+
"README.md",
|
|
22
|
+
"package.json"
|
|
23
|
+
],
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "https://github.com/AgentWorkforce/workforce",
|
|
27
|
+
"directory": "packages/events"
|
|
28
|
+
},
|
|
29
|
+
"publishConfig": {
|
|
30
|
+
"access": "public"
|
|
31
|
+
},
|
|
32
|
+
"scripts": {
|
|
33
|
+
"build": "tsc -p tsconfig.json",
|
|
34
|
+
"dev": "tsc -p tsconfig.json --watch --preserveWatchOutput",
|
|
35
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
36
|
+
"test": "tsc -p tsconfig.json && node --test dist/*.test.js",
|
|
37
|
+
"lint": "tsc -p tsconfig.json --noEmit"
|
|
38
|
+
},
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"ajv": "8.20.0",
|
|
41
|
+
"ajv-formats": "3.0.1"
|
|
42
|
+
}
|
|
43
|
+
}
|