pi-radar 0.3.0 → 0.5.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.
Files changed (36) hide show
  1. package/README.md +4 -2
  2. package/dist/extension/baseline.js +227 -402
  3. package/dist/extension/radar-client.js +53 -13
  4. package/dist/extension/radar-communication.js +5 -5
  5. package/dist/extension/radar-execution.js +168 -383
  6. package/dist/extension/radar-launch.js +13 -13
  7. package/dist/extension/radar-publication.js +160 -299
  8. package/dist/index.js +239 -414
  9. package/extension/generated-contracts.ts +1249 -13
  10. package/extension/radar-client.ts +92 -29
  11. package/extension/radar-communication.ts +5 -5
  12. package/extension/radar-execution.ts +11 -58
  13. package/extension/radar-launch.ts +21 -21
  14. package/extension/radar-publication.ts +209 -412
  15. package/package.json +6 -5
  16. package/schema/public/v1/handoff-publish-params.deserialize.schema.json +2 -2
  17. package/schema/public/v1/handoff-publish-params.serialize.schema.json +2 -2
  18. package/schema/public/v1/handoff-receipt.deserialize.schema.json +4 -4
  19. package/schema/public/v1/handoff-receipt.serialize.schema.json +4 -4
  20. package/schema/public/v1/handoff.deserialize.schema.json +4 -4
  21. package/schema/public/v1/handoff.serialize.schema.json +4 -4
  22. package/schema/public/v1/observation-get-params.deserialize.schema.json +46 -0
  23. package/schema/public/v1/observation-get-params.serialize.schema.json +52 -0
  24. package/schema/public/v1/observation-get-response.deserialize.schema.json +2731 -0
  25. package/schema/public/v1/observation-get-response.serialize.schema.json +2862 -0
  26. package/schema/public/v1/observation-snapshot.deserialize.schema.json +2616 -0
  27. package/schema/public/v1/observation-snapshot.serialize.schema.json +2741 -0
  28. package/schema/public/v1/presence-answer.deserialize.schema.json +40 -0
  29. package/schema/public/v1/presence-answer.serialize.schema.json +40 -0
  30. package/schema/public/v1/presence-release.deserialize.schema.json +51 -0
  31. package/schema/public/v1/presence-release.serialize.schema.json +52 -0
  32. package/schema/public/v1/presence-report.deserialize.schema.json +149 -0
  33. package/schema/public/v1/presence-report.serialize.schema.json +157 -0
  34. package/extension/radar-session-marker.ts +0 -146
  35. package/schema/public/v1/launch-identity-marker.deserialize.schema.json +0 -32
  36. package/schema/public/v1/launch-identity-marker.serialize.schema.json +0 -32
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-radar",
3
- "version": "0.3.0",
3
+ "version": "0.5.0",
4
4
  "type": "module",
5
5
  "description": "Radar daemon client, communication, publication, execution, location, launch and inspection surface for Pi extensions.",
6
6
  "license": "Apache-2.0",
@@ -14,7 +14,9 @@
14
14
  },
15
15
  "types": "./index.ts",
16
16
  "pi": {
17
- "extensions": ["./extension/baseline.ts"]
17
+ "extensions": [
18
+ "./extension/baseline.ts"
19
+ ]
18
20
  },
19
21
  "exports": {
20
22
  ".": {
@@ -77,15 +79,14 @@
77
79
  "extension/radar-launch.ts",
78
80
  "extension/radar-location.ts",
79
81
  "extension/radar-publication.ts",
80
- "extension/radar-session-marker.ts",
81
82
  "extension/radar-runtime.ts",
82
83
  "extension/baseline.ts"
83
84
  ],
84
85
  "scripts": {
85
- "build": "esbuild index.ts extension/generated-contracts.ts extension/radar-client.ts extension/radar-communication.ts extension/radar-execution.ts extension/radar-inspection.ts extension/radar-launch.ts extension/radar-location.ts extension/radar-publication.ts extension/radar-session-marker.ts extension/radar-runtime.ts extension/baseline.ts --outbase=. --outdir=dist --bundle --platform=node --format=esm --target=node22",
86
+ "build": "esbuild index.ts extension/generated-contracts.ts extension/radar-client.ts extension/radar-communication.ts extension/radar-execution.ts extension/radar-inspection.ts extension/radar-launch.ts extension/radar-location.ts extension/radar-publication.ts extension/radar-runtime.ts extension/baseline.ts --outbase=. --outdir=dist --bundle --platform=node --format=esm --target=node22",
86
87
  "generate:contracts": "node tools/generate-contracts.mjs",
87
88
  "check:contracts": "node tools/generate-contracts.mjs --check",
88
- "typecheck:contracts": "tsc --noEmit --strict --skipLibCheck --target ES2022 --module NodeNext --moduleResolution NodeNext --allowImportingTsExtensions --types node index.ts extension/baseline.ts extension/generated-contracts.ts extension/generated-contracts.typecheck.ts extension/radar-client.ts extension/radar-communication.ts extension/radar-execution.ts extension/radar-launch.test.ts extension/radar-publication.ts extension/radar-session-marker.ts extension/radar-session-marker.test.ts extension/radar-runtime.ts extension/radar-runtime.test.ts",
89
+ "typecheck:contracts": "tsc --noEmit --strict --skipLibCheck --target ES2022 --module NodeNext --moduleResolution NodeNext --allowImportingTsExtensions --types node index.ts extension/baseline.ts extension/generated-contracts.ts extension/generated-contracts.typecheck.ts extension/radar-client.ts extension/radar-communication.ts extension/radar-execution.ts extension/radar-launch.test.ts extension/radar-publication.ts extension/radar-runtime.ts extension/radar-runtime.test.ts",
89
90
  "prepack": "npm run build",
90
91
  "test": "npm run check:contracts && npm run typecheck:contracts && node --experimental-strip-types --test extension/*.test.ts"
91
92
  },
@@ -15,7 +15,7 @@
15
15
  "recipient_subject_id": {
16
16
  "type": "string"
17
17
  },
18
- "sender_agent_id": {
18
+ "sender_registration_id": {
19
19
  "type": "string"
20
20
  },
21
21
  "summary": {
@@ -23,7 +23,7 @@
23
23
  }
24
24
  },
25
25
  "required": [
26
- "sender_agent_id",
26
+ "sender_registration_id",
27
27
  "recipient_subject_id",
28
28
  "summary",
29
29
  "content"
@@ -15,7 +15,7 @@
15
15
  "recipient_subject_id": {
16
16
  "type": "string"
17
17
  },
18
- "sender_agent_id": {
18
+ "sender_registration_id": {
19
19
  "type": "string"
20
20
  },
21
21
  "summary": {
@@ -23,7 +23,7 @@
23
23
  }
24
24
  },
25
25
  "required": [
26
- "sender_agent_id",
26
+ "sender_registration_id",
27
27
  "recipient_subject_id",
28
28
  "summary",
29
29
  "content"
@@ -4,9 +4,6 @@
4
4
  "additionalProperties": false,
5
5
  "description": "The current managed Pi execution that published or received a handoff.\n`subject_id` is stable across verified successors; `execution_id` and\ngeneration identify the exact execution that took the action.",
6
6
  "properties": {
7
- "agent_id": {
8
- "type": "string"
9
- },
10
7
  "execution_generation": {
11
8
  "format": "uint32",
12
9
  "maximum": 4294967295,
@@ -16,6 +13,9 @@
16
13
  "execution_id": {
17
14
  "type": "string"
18
15
  },
16
+ "registration_id": {
17
+ "type": "string"
18
+ },
19
19
  "session_id": {
20
20
  "type": "string"
21
21
  },
@@ -24,7 +24,7 @@
24
24
  }
25
25
  },
26
26
  "required": [
27
- "agent_id",
27
+ "registration_id",
28
28
  "session_id",
29
29
  "subject_id",
30
30
  "execution_id",
@@ -4,9 +4,6 @@
4
4
  "additionalProperties": false,
5
5
  "description": "The current managed Pi execution that published or received a handoff.\n`subject_id` is stable across verified successors; `execution_id` and\ngeneration identify the exact execution that took the action.",
6
6
  "properties": {
7
- "agent_id": {
8
- "type": "string"
9
- },
10
7
  "execution_generation": {
11
8
  "format": "uint32",
12
9
  "maximum": 4294967295,
@@ -16,6 +13,9 @@
16
13
  "execution_id": {
17
14
  "type": "string"
18
15
  },
16
+ "registration_id": {
17
+ "type": "string"
18
+ },
19
19
  "session_id": {
20
20
  "type": "string"
21
21
  },
@@ -24,7 +24,7 @@
24
24
  }
25
25
  },
26
26
  "required": [
27
- "agent_id",
27
+ "registration_id",
28
28
  "session_id",
29
29
  "subject_id",
30
30
  "execution_id",
@@ -4,9 +4,6 @@
4
4
  "additionalProperties": false,
5
5
  "description": "The current managed Pi execution that published or received a handoff.\n`subject_id` is stable across verified successors; `execution_id` and\ngeneration identify the exact execution that took the action.",
6
6
  "properties": {
7
- "agent_id": {
8
- "type": "string"
9
- },
10
7
  "execution_generation": {
11
8
  "format": "uint32",
12
9
  "maximum": 4294967295,
@@ -16,6 +13,9 @@
16
13
  "execution_id": {
17
14
  "type": "string"
18
15
  },
16
+ "registration_id": {
17
+ "type": "string"
18
+ },
19
19
  "session_id": {
20
20
  "type": "string"
21
21
  },
@@ -24,7 +24,7 @@
24
24
  }
25
25
  },
26
26
  "required": [
27
- "agent_id",
27
+ "registration_id",
28
28
  "session_id",
29
29
  "subject_id",
30
30
  "execution_id",
@@ -4,9 +4,6 @@
4
4
  "additionalProperties": false,
5
5
  "description": "The current managed Pi execution that published or received a handoff.\n`subject_id` is stable across verified successors; `execution_id` and\ngeneration identify the exact execution that took the action.",
6
6
  "properties": {
7
- "agent_id": {
8
- "type": "string"
9
- },
10
7
  "execution_generation": {
11
8
  "format": "uint32",
12
9
  "maximum": 4294967295,
@@ -16,6 +13,9 @@
16
13
  "execution_id": {
17
14
  "type": "string"
18
15
  },
16
+ "registration_id": {
17
+ "type": "string"
18
+ },
19
19
  "session_id": {
20
20
  "type": "string"
21
21
  },
@@ -24,7 +24,7 @@
24
24
  }
25
25
  },
26
26
  "required": [
27
- "agent_id",
27
+ "registration_id",
28
28
  "session_id",
29
29
  "subject_id",
30
30
  "execution_id",
@@ -0,0 +1,46 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "additionalProperties": false,
4
+ "description": "Input accepted by `observation.get`.",
5
+ "properties": {
6
+ "classes": {
7
+ "default": null,
8
+ "items": {
9
+ "type": "string"
10
+ },
11
+ "type": [
12
+ "array",
13
+ "null"
14
+ ]
15
+ },
16
+ "epoch": {
17
+ "default": null,
18
+ "type": [
19
+ "string",
20
+ "null"
21
+ ]
22
+ },
23
+ "since_revision": {
24
+ "default": null,
25
+ "format": "uint64",
26
+ "maximum": 9007199254740991,
27
+ "minimum": 0,
28
+ "type": [
29
+ "integer",
30
+ "null"
31
+ ]
32
+ },
33
+ "wait_ms": {
34
+ "default": null,
35
+ "format": "uint64",
36
+ "maximum": 30000,
37
+ "minimum": 0,
38
+ "type": [
39
+ "integer",
40
+ "null"
41
+ ]
42
+ }
43
+ },
44
+ "title": "observation-get-params-deserialize",
45
+ "type": "object"
46
+ }
@@ -0,0 +1,52 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "additionalProperties": false,
4
+ "description": "Input accepted by `observation.get`.",
5
+ "properties": {
6
+ "classes": {
7
+ "default": null,
8
+ "items": {
9
+ "type": "string"
10
+ },
11
+ "type": [
12
+ "array",
13
+ "null"
14
+ ]
15
+ },
16
+ "epoch": {
17
+ "default": null,
18
+ "type": [
19
+ "string",
20
+ "null"
21
+ ]
22
+ },
23
+ "since_revision": {
24
+ "default": null,
25
+ "format": "uint64",
26
+ "maximum": 9007199254740991,
27
+ "minimum": 0,
28
+ "type": [
29
+ "integer",
30
+ "null"
31
+ ]
32
+ },
33
+ "wait_ms": {
34
+ "default": null,
35
+ "format": "uint64",
36
+ "maximum": 30000,
37
+ "minimum": 0,
38
+ "type": [
39
+ "integer",
40
+ "null"
41
+ ]
42
+ }
43
+ },
44
+ "required": [
45
+ "epoch",
46
+ "since_revision",
47
+ "wait_ms",
48
+ "classes"
49
+ ],
50
+ "title": "observation-get-params-serialize",
51
+ "type": "object"
52
+ }