holomime 2.4.0 → 2.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.
- package/README.md +5 -3
- package/dist/index.js +135 -0
- package/package.json +1 -1
- package/registry/bodies/figure-03.body.api +32 -0
- package/dist/index.d.ts +0 -7908
- package/registry/bodies/figure-02.body.api +0 -21
package/README.md
CHANGED
|
@@ -85,7 +85,7 @@ holomime diagnose --log agent.jsonl
|
|
|
85
85
|
holomime benchmark --personality .personality.json
|
|
86
86
|
|
|
87
87
|
# Push identity to a robot or avatar
|
|
88
|
-
holomime embody --body registry/bodies/figure-
|
|
88
|
+
holomime embody --body registry/bodies/figure-03.body.api
|
|
89
89
|
```
|
|
90
90
|
|
|
91
91
|
## Robotics Integrations
|
|
@@ -100,6 +100,7 @@ holomime embody --body registry/bodies/figure-02.body.api
|
|
|
100
100
|
| Unity | Real-time personality push via HTTP/SSE | `--adapter unity` |
|
|
101
101
|
| gRPC | Custom robotics stacks | `--adapter grpc` |
|
|
102
102
|
| MQTT | IoT/edge robots | `--adapter mqtt` |
|
|
103
|
+
| Neural Action Gate | Conscience gate for learned controllers (VLA, RL, IL) | `neural-action-gate.ts` |
|
|
103
104
|
|
|
104
105
|
## ISO Compliance
|
|
105
106
|
|
|
@@ -130,8 +131,9 @@ Pre-built body profiles for commercial robots and virtual avatars. Each defines
|
|
|
130
131
|
|
|
131
132
|
| Template | OEM | DOF | Morphology | File |
|
|
132
133
|
|----------|-----|----:|------------|------|
|
|
133
|
-
| Figure
|
|
134
|
+
| Figure 03 | Figure AI | 44 | `humanoid` | `registry/bodies/figure-03.body.api` |
|
|
134
135
|
| Unitree H1 | Unitree | 23 | `humanoid` | `registry/bodies/unitree-h1.body.api` |
|
|
136
|
+
| Unitree G1 | Unitree | 23 | `humanoid` | `registry/bodies/unitree-g1.body.api` |
|
|
135
137
|
| Phoenix | Sanctuary AI | 69 | `humanoid` | `registry/bodies/phoenix.body.api` |
|
|
136
138
|
| Ameca | Engineered Arts | 52 | `humanoid_upper` | `registry/bodies/ameca.body.api` |
|
|
137
139
|
| Asimov V1 | asimov-inc | 25 | `humanoid` | `registry/bodies/asimov-v1.body.api` |
|
|
@@ -143,7 +145,7 @@ Pre-built body profiles for commercial robots and virtual avatars. Each defines
|
|
|
143
145
|
Same soul. Different body. One command.
|
|
144
146
|
|
|
145
147
|
```bash
|
|
146
|
-
# Move your agent from Figure
|
|
148
|
+
# Move your agent from Figure 03 to Spot
|
|
147
149
|
holomime embody --swap-body registry/bodies/spot.body.api
|
|
148
150
|
|
|
149
151
|
# The soul, mind, and conscience stay the same.
|
package/dist/index.js
CHANGED
|
@@ -13856,6 +13856,140 @@ function buildMotionRequest(prompt, bigFive, options) {
|
|
|
13856
13856
|
duration: options?.duration
|
|
13857
13857
|
};
|
|
13858
13858
|
}
|
|
13859
|
+
|
|
13860
|
+
// src/adapters/neural-action-gate.ts
|
|
13861
|
+
var NeuralActionGate = class {
|
|
13862
|
+
safetyEnvelope;
|
|
13863
|
+
denyRules;
|
|
13864
|
+
stats;
|
|
13865
|
+
mediationMode;
|
|
13866
|
+
constructor(options = {}) {
|
|
13867
|
+
this.safetyEnvelope = options.safetyEnvelope ?? {};
|
|
13868
|
+
this.denyRules = options.denyRules ?? [];
|
|
13869
|
+
this.mediationMode = options.mediationMode ?? "clamp";
|
|
13870
|
+
this.stats = { totalEvaluated: 0, allowed: 0, blocked: 0, modified: 0, passRate: 1 };
|
|
13871
|
+
}
|
|
13872
|
+
/**
|
|
13873
|
+
* Evaluate a single action vector before motor execution.
|
|
13874
|
+
*
|
|
13875
|
+
* @param action - Raw action vector from neural net (joint angles, velocities, etc.)
|
|
13876
|
+
* @param context - Current state context for safety checks
|
|
13877
|
+
* @returns Evaluation result with allowed/modified action
|
|
13878
|
+
*/
|
|
13879
|
+
evaluate(action, context) {
|
|
13880
|
+
this.stats.totalEvaluated++;
|
|
13881
|
+
if (context?.taskDescription) {
|
|
13882
|
+
for (const rule of this.denyRules) {
|
|
13883
|
+
const patterns = rule.patterns ?? [rule.action];
|
|
13884
|
+
for (const pattern of patterns) {
|
|
13885
|
+
if (context.taskDescription.toLowerCase().includes(pattern.toLowerCase())) {
|
|
13886
|
+
this.stats.blocked++;
|
|
13887
|
+
this.updatePassRate();
|
|
13888
|
+
return {
|
|
13889
|
+
allowed: false,
|
|
13890
|
+
action,
|
|
13891
|
+
modified: false,
|
|
13892
|
+
reason: `Blocked by conscience rule: ${rule.reason || rule.action}`,
|
|
13893
|
+
ruleTriggered: rule.action
|
|
13894
|
+
};
|
|
13895
|
+
}
|
|
13896
|
+
}
|
|
13897
|
+
}
|
|
13898
|
+
}
|
|
13899
|
+
const violations = [];
|
|
13900
|
+
if (this.safetyEnvelope.minProximity && context?.humanProximity !== void 0 && context.humanProximity < this.safetyEnvelope.minProximity) {
|
|
13901
|
+
violations.push(`Human proximity ${context.humanProximity}m < minimum ${this.safetyEnvelope.minProximity}m`);
|
|
13902
|
+
}
|
|
13903
|
+
if (this.safetyEnvelope.maxLinearSpeed && context?.currentSpeed !== void 0 && context.currentSpeed > this.safetyEnvelope.maxLinearSpeed) {
|
|
13904
|
+
violations.push(`Speed ${context.currentSpeed}m/s > maximum ${this.safetyEnvelope.maxLinearSpeed}m/s`);
|
|
13905
|
+
}
|
|
13906
|
+
if (this.safetyEnvelope.maxContactForce && context?.contactForce !== void 0 && context.contactForce > this.safetyEnvelope.maxContactForce) {
|
|
13907
|
+
violations.push(`Contact force ${context.contactForce}N > maximum ${this.safetyEnvelope.maxContactForce}N`);
|
|
13908
|
+
}
|
|
13909
|
+
if (violations.length > 0) {
|
|
13910
|
+
if (this.mediationMode === "block") {
|
|
13911
|
+
this.stats.blocked++;
|
|
13912
|
+
this.updatePassRate();
|
|
13913
|
+
return {
|
|
13914
|
+
allowed: false,
|
|
13915
|
+
action,
|
|
13916
|
+
modified: false,
|
|
13917
|
+
reason: `Safety violation: ${violations.join("; ")}`,
|
|
13918
|
+
ruleTriggered: "safety_envelope"
|
|
13919
|
+
};
|
|
13920
|
+
}
|
|
13921
|
+
if (this.mediationMode === "clamp") {
|
|
13922
|
+
const clampedAction = this.clampAction(action, context);
|
|
13923
|
+
this.stats.modified++;
|
|
13924
|
+
this.stats.allowed++;
|
|
13925
|
+
this.updatePassRate();
|
|
13926
|
+
return {
|
|
13927
|
+
allowed: true,
|
|
13928
|
+
action: clampedAction,
|
|
13929
|
+
modified: true,
|
|
13930
|
+
reason: `Clamped to safe range: ${violations.join("; ")}`,
|
|
13931
|
+
ruleTriggered: "safety_envelope"
|
|
13932
|
+
};
|
|
13933
|
+
}
|
|
13934
|
+
this.stats.allowed++;
|
|
13935
|
+
this.updatePassRate();
|
|
13936
|
+
return {
|
|
13937
|
+
allowed: true,
|
|
13938
|
+
action,
|
|
13939
|
+
modified: false,
|
|
13940
|
+
reason: `Warning: ${violations.join("; ")}`,
|
|
13941
|
+
ruleTriggered: "safety_envelope"
|
|
13942
|
+
};
|
|
13943
|
+
}
|
|
13944
|
+
this.stats.allowed++;
|
|
13945
|
+
this.updatePassRate();
|
|
13946
|
+
return { allowed: true, action, modified: false };
|
|
13947
|
+
}
|
|
13948
|
+
/**
|
|
13949
|
+
* Evaluate a batch of actions (for trajectory planning).
|
|
13950
|
+
*/
|
|
13951
|
+
evaluateBatch(actions, context) {
|
|
13952
|
+
return actions.map((action) => this.evaluate(action, context));
|
|
13953
|
+
}
|
|
13954
|
+
/**
|
|
13955
|
+
* Get gate statistics.
|
|
13956
|
+
*/
|
|
13957
|
+
getStats() {
|
|
13958
|
+
return { ...this.stats };
|
|
13959
|
+
}
|
|
13960
|
+
/**
|
|
13961
|
+
* Reset statistics.
|
|
13962
|
+
*/
|
|
13963
|
+
resetStats() {
|
|
13964
|
+
this.stats = { totalEvaluated: 0, allowed: 0, blocked: 0, modified: 0, passRate: 1 };
|
|
13965
|
+
}
|
|
13966
|
+
/**
|
|
13967
|
+
* Update safety envelope at runtime (e.g., when entering a new zone).
|
|
13968
|
+
*/
|
|
13969
|
+
updateSafetyEnvelope(envelope) {
|
|
13970
|
+
this.safetyEnvelope = { ...this.safetyEnvelope, ...envelope };
|
|
13971
|
+
}
|
|
13972
|
+
/**
|
|
13973
|
+
* Add a deny rule at runtime.
|
|
13974
|
+
*/
|
|
13975
|
+
addDenyRule(rule) {
|
|
13976
|
+
this.denyRules.push(rule);
|
|
13977
|
+
}
|
|
13978
|
+
// ── Private ─────────────────────────────────────────────────
|
|
13979
|
+
clampAction(action, context) {
|
|
13980
|
+
let scaleFactor = 1;
|
|
13981
|
+
if (this.safetyEnvelope.maxLinearSpeed && context?.currentSpeed && context.currentSpeed > this.safetyEnvelope.maxLinearSpeed) {
|
|
13982
|
+
scaleFactor = Math.min(scaleFactor, this.safetyEnvelope.maxLinearSpeed / context.currentSpeed);
|
|
13983
|
+
}
|
|
13984
|
+
if (this.safetyEnvelope.maxContactForce && context?.contactForce && context.contactForce > this.safetyEnvelope.maxContactForce) {
|
|
13985
|
+
scaleFactor = Math.min(scaleFactor, this.safetyEnvelope.maxContactForce / context.contactForce);
|
|
13986
|
+
}
|
|
13987
|
+
return action.map((v) => v * scaleFactor);
|
|
13988
|
+
}
|
|
13989
|
+
updatePassRate() {
|
|
13990
|
+
this.stats.passRate = this.stats.totalEvaluated > 0 ? this.stats.allowed / this.stats.totalEvaluated : 1;
|
|
13991
|
+
}
|
|
13992
|
+
};
|
|
13859
13993
|
export {
|
|
13860
13994
|
ARCHETYPES,
|
|
13861
13995
|
ATTACHMENT_STYLES,
|
|
@@ -13874,6 +14008,7 @@ export {
|
|
|
13874
14008
|
MarketplaceClient,
|
|
13875
14009
|
MemoryLevel,
|
|
13876
14010
|
ModelRouter,
|
|
14011
|
+
NeuralActionGate,
|
|
13877
14012
|
OllamaProvider,
|
|
13878
14013
|
OpenAIProvider,
|
|
13879
14014
|
PROVIDER_PARAMS,
|
package/package.json
CHANGED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "1.0",
|
|
3
|
+
"morphology": "humanoid",
|
|
4
|
+
"modalities": ["gesture", "locomotion", "gaze", "voice", "posture", "manipulation"],
|
|
5
|
+
"safety_envelope": {
|
|
6
|
+
"max_linear_speed_m_s": 1.5,
|
|
7
|
+
"max_angular_speed_rad_s": 2.0,
|
|
8
|
+
"min_proximity_m": 0.5,
|
|
9
|
+
"max_contact_force_n": 50,
|
|
10
|
+
"emergency_stop_decel_m_s2": 6.0,
|
|
11
|
+
"max_reach_m": 0.85,
|
|
12
|
+
"operating_temperature_c": [0, 40]
|
|
13
|
+
},
|
|
14
|
+
"hardware_profile": {
|
|
15
|
+
"oem": "Figure AI",
|
|
16
|
+
"model": "Figure 03",
|
|
17
|
+
"actuator_count": 35,
|
|
18
|
+
"sensors": ["stereo_camera", "depth_camera", "imu", "force_torque", "tactile", "microphone"],
|
|
19
|
+
"compute": "onboard",
|
|
20
|
+
"compute_detail": "dual embedded GPU"
|
|
21
|
+
},
|
|
22
|
+
"motion_engine": {
|
|
23
|
+
"backend": "helix",
|
|
24
|
+
"architecture": "VLA",
|
|
25
|
+
"system2_model": "7B VLM",
|
|
26
|
+
"system2_hz": 9,
|
|
27
|
+
"system1_model": "80M transformer",
|
|
28
|
+
"system1_hz": 200,
|
|
29
|
+
"dof": 35,
|
|
30
|
+
"end_to_end": true
|
|
31
|
+
}
|
|
32
|
+
}
|