@openscout/protocol 0.2.87 → 0.2.88
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/presence.d.ts +10 -0
- package/dist/presence.d.ts.map +1 -1
- package/dist/presence.js +10 -0
- package/dist/runtime-execution.js +3 -3
- package/package.json +6 -5
- package/src/presence.ts +11 -0
- package/src/runtime-execution.ts +3 -3
package/dist/presence.d.ts
CHANGED
|
@@ -22,6 +22,16 @@ import type { ObservedActivity, ObservedStatusPhase } from "./observed-status.js
|
|
|
22
22
|
* beat must never flap an agent out of freshness.
|
|
23
23
|
*/
|
|
24
24
|
export declare const PRESENCE_STALE_AFTER_MS = 45000;
|
|
25
|
+
/**
|
|
26
|
+
* Maximum steady-state gap between freshness-bearing presence updates.
|
|
27
|
+
*
|
|
28
|
+
* A renderer only knows the `staleAt` carried by the last beat it received.
|
|
29
|
+
* The broker therefore republishes an otherwise unchanged beat before that
|
|
30
|
+
* deadline while newer liveness evidence keeps arriving. This remains bounded
|
|
31
|
+
* (two events per minute at the defaults) without letting a continuously
|
|
32
|
+
* heartbeating agent expire in a connected client.
|
|
33
|
+
*/
|
|
34
|
+
export declare const PRESENCE_REFRESH_INTERVAL_MS = 30000;
|
|
25
35
|
/**
|
|
26
36
|
* How long a stale beat lingers before it is dropped entirely.
|
|
27
37
|
*
|
package/dist/presence.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presence.d.ts","sourceRoot":"","sources":["../src/presence.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAElF;;;;;;;;;;;;;;GAcG;AAEH;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,QAAS,CAAC;AAE9C;;;;;;;GAOG;AACH,eAAO,MAAM,4BAA4B,QAAS,CAA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IAChB,UAAU,EAAE,MAAM,CAAC;IACnB;;;;;;;;;OASG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;;;;;;;OAWG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,iEAAiE;AACjE,MAAM,WAAW,gBAAgB;IAC/B,sEAAsE;IACtE,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,YAAY,EAAE,CAAC;CACvB;AAED,MAAM,WAAW,wBAAwB;IACvC,kDAAkD;IAClD,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,EACnC,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,wBAA6B,GACrC,iBAAiB,CAKnB;AAED,2EAA2E;AAC3E,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,YAAY,EAAE,cAAc,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAE3F;AAED,kFAAkF;AAClF,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,YAAY,EAAE,WAAW,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAE5F;AAED;;;;;;;GAOG;AACH,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,IAAI,CAAC,YAAY,EAAE,qBAAqB,CAAC,EAC/C,cAAc,EAAE,OAAO,GACtB,OAAO,CAET;AAED,kFAAkF;AAClF,wBAAgB,cAAc,CAC5B,IAAI,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,EACnC,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,wBAA6B,GACrC,OAAO,CAET"}
|
package/dist/presence.js
CHANGED
|
@@ -20,6 +20,16 @@
|
|
|
20
20
|
* beat must never flap an agent out of freshness.
|
|
21
21
|
*/
|
|
22
22
|
export const PRESENCE_STALE_AFTER_MS = 45_000;
|
|
23
|
+
/**
|
|
24
|
+
* Maximum steady-state gap between freshness-bearing presence updates.
|
|
25
|
+
*
|
|
26
|
+
* A renderer only knows the `staleAt` carried by the last beat it received.
|
|
27
|
+
* The broker therefore republishes an otherwise unchanged beat before that
|
|
28
|
+
* deadline while newer liveness evidence keeps arriving. This remains bounded
|
|
29
|
+
* (two events per minute at the defaults) without letting a continuously
|
|
30
|
+
* heartbeating agent expire in a connected client.
|
|
31
|
+
*/
|
|
32
|
+
export const PRESENCE_REFRESH_INTERVAL_MS = 30_000;
|
|
23
33
|
/**
|
|
24
34
|
* How long a stale beat lingers before it is dropped entirely.
|
|
25
35
|
*
|
|
@@ -177,8 +177,8 @@ export function parseScoutRuntimeSpec(input) {
|
|
|
177
177
|
};
|
|
178
178
|
}
|
|
179
179
|
const rawHarness = parts[0].trim().toLowerCase();
|
|
180
|
-
const harness = (rawHarness
|
|
181
|
-
if (!
|
|
180
|
+
const harness = normalizeScoutLaunchableHarness(rawHarness);
|
|
181
|
+
if (!harness) {
|
|
182
182
|
return {
|
|
183
183
|
ok: false,
|
|
184
184
|
error: `unsupported runtime harness "${parts[0]}"; expected one of: ${SCOUT_LAUNCHABLE_HARNESSES.join(", ")}`,
|
|
@@ -226,7 +226,7 @@ export function isScoutLaunchableHarness(value) {
|
|
|
226
226
|
if (!value)
|
|
227
227
|
return false;
|
|
228
228
|
const normalized = value.trim().toLowerCase();
|
|
229
|
-
return
|
|
229
|
+
return SCOUT_LAUNCHABLE_HARNESSES.includes(normalized);
|
|
230
230
|
}
|
|
231
231
|
export function normalizeScoutReasoningEffort(value) {
|
|
232
232
|
const normalized = value?.trim().toLowerCase();
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openscout/protocol",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.88",
|
|
4
4
|
"description": "Typed protocol for the OpenScout local control plane",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"author": "Arach Tchoupani",
|
|
8
|
-
"homepage": "https://github.com/
|
|
8
|
+
"homepage": "https://github.com/oscout/scout/tree/main/packages/protocol#readme",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
|
-
"url": "git+https://github.com/
|
|
11
|
+
"url": "git+https://github.com/oscout/scout.git",
|
|
12
12
|
"directory": "packages/protocol"
|
|
13
13
|
},
|
|
14
14
|
"bugs": {
|
|
15
|
-
"url": "https://github.com/
|
|
15
|
+
"url": "https://github.com/oscout/scout/issues"
|
|
16
16
|
},
|
|
17
17
|
"keywords": [
|
|
18
18
|
"openscout",
|
|
@@ -56,5 +56,6 @@
|
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"typescript": "^5"
|
|
59
|
-
}
|
|
59
|
+
},
|
|
60
|
+
"gitHead": "0b038ccae278e10851b0a1a16108b94ecd4e7cdc"
|
|
60
61
|
}
|
package/src/presence.ts
CHANGED
|
@@ -25,6 +25,17 @@ import type { ObservedActivity, ObservedStatusPhase } from "./observed-status.js
|
|
|
25
25
|
*/
|
|
26
26
|
export const PRESENCE_STALE_AFTER_MS = 45_000;
|
|
27
27
|
|
|
28
|
+
/**
|
|
29
|
+
* Maximum steady-state gap between freshness-bearing presence updates.
|
|
30
|
+
*
|
|
31
|
+
* A renderer only knows the `staleAt` carried by the last beat it received.
|
|
32
|
+
* The broker therefore republishes an otherwise unchanged beat before that
|
|
33
|
+
* deadline while newer liveness evidence keeps arriving. This remains bounded
|
|
34
|
+
* (two events per minute at the defaults) without letting a continuously
|
|
35
|
+
* heartbeating agent expire in a connected client.
|
|
36
|
+
*/
|
|
37
|
+
export const PRESENCE_REFRESH_INTERVAL_MS = 30_000;
|
|
38
|
+
|
|
28
39
|
/**
|
|
29
40
|
* How long a stale beat lingers before it is dropped entirely.
|
|
30
41
|
*
|
package/src/runtime-execution.ts
CHANGED
|
@@ -353,8 +353,8 @@ export function parseScoutRuntimeSpec(input: string): ScoutRuntimeSpecParseResul
|
|
|
353
353
|
};
|
|
354
354
|
}
|
|
355
355
|
const rawHarness = parts[0]!.trim().toLowerCase();
|
|
356
|
-
const harness = (rawHarness
|
|
357
|
-
if (!
|
|
356
|
+
const harness = normalizeScoutLaunchableHarness(rawHarness);
|
|
357
|
+
if (!harness) {
|
|
358
358
|
return {
|
|
359
359
|
ok: false,
|
|
360
360
|
error: `unsupported runtime harness "${parts[0]}"; expected one of: ${SCOUT_LAUNCHABLE_HARNESSES.join(", ")}`,
|
|
@@ -415,7 +415,7 @@ export function normalizeScoutLaunchableHarness(
|
|
|
415
415
|
export function isScoutLaunchableHarness(value: string | null | undefined): value is ScoutLaunchableHarness {
|
|
416
416
|
if (!value) return false;
|
|
417
417
|
const normalized = value.trim().toLowerCase();
|
|
418
|
-
return
|
|
418
|
+
return SCOUT_LAUNCHABLE_HARNESSES.includes(normalized as ScoutLaunchableHarness);
|
|
419
419
|
}
|
|
420
420
|
|
|
421
421
|
export function normalizeScoutReasoningEffort(
|