@awarevue/agent-sdk 1.0.38 → 1.0.39

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 ADDED
@@ -0,0 +1,27 @@
1
+ # Agent Typescript SDK
2
+ An SDK that helps build an agent in Javascript / Typescript. An agent is a process written in any programming language, responsible for connecting devices of partner technologies in the area of perimeter security.
3
+
4
+ # Agent Responsibilities and Guidelines
5
+ AWARE platform is a one-stop shop for monitoring and controlling perimeter security equipment including but limited to, CCTV cameras, electronic door locks, motion sensors, IO boards ... etc. This is all achieved by agents where each agent specializes in one technology and connects to devices of that technology to source state updates, events and run commands forwarded by AWARE platform. Also, it is responsible for updating access control policies based on the master policies defined in AWARE.
6
+
7
+ ## State, Events and Commands
8
+ The general mental model / abstraction of a device in AWARE deals with 3 concepts:
9
+ - State Updates: For each device, there is an object of certain shape that describes the current state of a device. Agents are expected to continuously emit those state updates once they're started
10
+ - Events: For each device, there are types of events that can take place and the agent's responsibility is to communicate those with low latency to AWARE adhering to the structure of these standard events per device type
11
+ - Commands: Depending on device type (camera, door ... etc), platform users can issues commands to run on devices. Those commands are executed by an agent responsible for that particular tehchnology / partner system.
12
+
13
+ ## Access Control
14
+ Another area that an agent deals with is access control policies. Access control policies are about which person can access which resource at what time. Those access policies are defined in AWARE platform but they're distributed to partner systems via agents. When a user changes an access policy. Access control policies are stored and managed according to the following object model:
15
+ - Persons: Persons are people who are expected to be relevant in a facility
16
+ - Schedules: Weekly time tables that specify include time ranges. Typically, schedules are used by access rules to set when a collection of people can access a collection of resources (devices)
17
+ - Access Rules: Each access rule contains info about which collection of people can access which collection of resources at certain time schedules
18
+ - Zones: a zone is a non-overlapping physical grouping of resources
19
+
20
+ AWARE platform will propagate those changes to agents on two phases:
21
+ - Validation phase: AWARE will send a message mentioning all the changes (mutations) of access control objects. Mutations are either merges or deletes
22
+ - Apply Phase: Upon successful validation, the agent will be sent a message to apply the changes on the partner system. Applying the changes MUST be idempotent. That includes adding, updating or removing. Operations must always be able to recover if the partner system access objects have been manipulated outside AWARE platform. Taht includes cases like assigning a token to a person where the token has been assigned to someone else on the partner system, or update an object that no more exists in the partner system.
23
+
24
+ In both, validation and apply phases, the platform will send along all the reference translations for all objects mentioned in change descriptions. It is expected that the agent will inspect the shared references to makes sure they are still valid and to complain if there are objects that do not have needed references.
25
+
26
+
27
+
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awarevue/agent-sdk",
3
- "version": "1.0.38",
3
+ "version": "1.0.39",
4
4
  "description": "SDK for building Agent implementations that speak the Aware protocol.",
5
5
  "author": "Yaser Awajan",
6
6
  "license": "MIT",
@@ -27,7 +27,7 @@
27
27
  "lint:fix": "yarn lint --fix"
28
28
  },
29
29
  "dependencies": {
30
- "@awarevue/api-types": "^1.0.37",
30
+ "@awarevue/api-types": "^1.0.39",
31
31
  "rxjs": "^7.8.2",
32
32
  "ws": "^8",
33
33
  "zod": "3.24.2"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awarevue/agent-sdk",
3
- "version": "1.0.38",
3
+ "version": "1.0.39",
4
4
  "description": "SDK for building Agent implementations that speak the Aware protocol.",
5
5
  "author": "Yaser Awajan",
6
6
  "license": "MIT",
@@ -27,7 +27,7 @@
27
27
  "lint:fix": "yarn lint --fix"
28
28
  },
29
29
  "dependencies": {
30
- "@awarevue/api-types": "^1.0.37",
30
+ "@awarevue/api-types": "^1.0.39",
31
31
  "rxjs": "^7.8.2",
32
32
  "ws": "^8",
33
33
  "zod": "3.24.2"