@lovelace_lol/polymer 0.0.5 → 0.0.6
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 +13 -0
- package/dist/index.d.ts +17 -1
- package/dist/index.js +937 -936
- package/dist/worker/agency-worker.js +846 -843
- package/package.json +1 -1
- package/src/polymer/character.cljs +281 -349
- package/src/polymer/society.cljs +31 -17
- package/src/polymer/worker.cljs +11 -0
package/README.md
CHANGED
|
@@ -33,6 +33,19 @@ Host applications may dispatch external commands, observe outgoing streams, and
|
|
|
33
33
|
read snapshots for diagnostics or configuration. Host applications should not
|
|
34
34
|
serve as the normal message bus between Polymer agencies.
|
|
35
35
|
|
|
36
|
+
The character profile may provide an `agencySociety` document that controls
|
|
37
|
+
which existing agencies and message routes are enabled. A host-side graph editor
|
|
38
|
+
can apply route admission changes without recreating agency-local state:
|
|
39
|
+
|
|
40
|
+
```js
|
|
41
|
+
const nextSociety = agencies.updateSocietyRouting(profile.agencySociety);
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
The update is deliberately limited to routing. Agency-local `configure` and
|
|
45
|
+
`priors` values are applied when `createCharacterAgencies` creates the agencies;
|
|
46
|
+
the graph is not a central planner and cannot bypass their planners or
|
|
47
|
+
schedulers.
|
|
48
|
+
|
|
36
49
|
## Current Agencies
|
|
37
50
|
|
|
38
51
|
Polymer currently includes early Blink, Animation, Gaze, Eye/Head Tracking,
|
package/dist/index.d.ts
CHANGED
|
@@ -1506,6 +1506,17 @@ export interface PolymerInputStream<TCommand> extends PolymerStream<{ type: 'com
|
|
|
1506
1506
|
|
|
1507
1507
|
|
|
1508
1508
|
export type PolymerDomainEvent =
|
|
1509
|
+
| {
|
|
1510
|
+
/** Diagnostic telemetry emitted after a graph route dispatch succeeds. */
|
|
1511
|
+
type: 'society.routeActivated';
|
|
1512
|
+
agency: 'character';
|
|
1513
|
+
edgeId: string;
|
|
1514
|
+
from: string;
|
|
1515
|
+
to: string;
|
|
1516
|
+
eventType: string;
|
|
1517
|
+
credit: number;
|
|
1518
|
+
at: number;
|
|
1519
|
+
}
|
|
1509
1520
|
| {
|
|
1510
1521
|
type: 'blinkConfigChanged';
|
|
1511
1522
|
agency: 'blink';
|
|
@@ -2051,6 +2062,8 @@ export interface CharacterAgencies {
|
|
|
2051
2062
|
readonly agencySociety: AgencySociety;
|
|
2052
2063
|
dispatch(message: CharacterAgencyDispatch): void;
|
|
2053
2064
|
snapshot(): CharacterAgencySnapshot;
|
|
2065
|
+
/** Replace live route admission settings without recreating agency-local state. */
|
|
2066
|
+
updateSocietyRouting(society: AgencySociety): AgencySociety;
|
|
2054
2067
|
agency(name: 'animation'): AnimationAgency;
|
|
2055
2068
|
agency(name: 'blink'): BlinkAgency | null;
|
|
2056
2069
|
agency(name: 'gaze'): GazeAgency | null;
|
|
@@ -2063,7 +2076,10 @@ export interface CharacterAgencies {
|
|
|
2063
2076
|
agency(name: 'lipSync'): LipSyncAgency;
|
|
2064
2077
|
agency(name: 'prosodic'): ProsodicAgency | null;
|
|
2065
2078
|
agency(name: string): unknown | null;
|
|
2066
|
-
subscribeInput(listener: (event:
|
|
2079
|
+
subscribeInput(listener: (event:
|
|
2080
|
+
| { type: 'command'; agency: string; message: CharacterAgencyDispatch }
|
|
2081
|
+
| { type: 'agencySociety.update'; agencySociety: AgencySociety }
|
|
2082
|
+
) => void): () => void;
|
|
2067
2083
|
subscribeEvents(listener: (event: PolymerDomainEvent) => void): () => void;
|
|
2068
2084
|
/** Compatibility alias for events. Prefer subscribeEvents. */
|
|
2069
2085
|
subscribe(listener: (event: PolymerStatusEvent) => void): () => void;
|