cortico-world-agent-speed 0.2.6 → 0.2.7
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/CHANGELOG.md +1 -0
- package/package.json +1 -1
- package/web/activity-motion.js +30 -31
- package/web/pet-app.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
- Replaced the blocked dressing frame with Agent Speed's own inline panel, styled after Coopanion's dressing screen. It uses the extension's settings and figure library without a patched host.
|
|
5
5
|
- Replaced the separate renderer with the pinned Coopanion Desktop Pet World and official Coo figure. The extension has independent settings, runtime, storage, tool names and window lifecycle.
|
|
6
6
|
- DeepSeek Chan's tail-wag frequency follows aggregate output with the updated figure pack. Acceleration, peaks, and sustained high output can trigger distinct native gestures. No speed display or continuous body stretching.
|
|
7
|
+
- Fixed missing feedback when the pet first sees high output or is briefly busy. Reduced motion and partial source data keep the tail response and use only gentle nods.
|
|
7
8
|
- DeepSeek Chan artwork is not bundled in this npm package; compatible figure ZIPs can be installed separately from Agent Speed's dressing panel.
|
|
8
9
|
|
|
9
10
|
# Upstream Desktop Pet change history
|
package/package.json
CHANGED
package/web/activity-motion.js
CHANGED
|
@@ -56,7 +56,7 @@ export function createActivityMotion() {
|
|
|
56
56
|
receive(value, now) {
|
|
57
57
|
if (value && sample && value.updatedAtMs <= sample.updatedAtMs) return;
|
|
58
58
|
const fresh = isFresh(value, now) ? value : null;
|
|
59
|
-
const measuredRate =
|
|
59
|
+
const measuredRate = outputRate(fresh);
|
|
60
60
|
if (!isFresh(sample, now) || !measuredRate) {
|
|
61
61
|
clearCueHistory();
|
|
62
62
|
spinsSinceDance = 0;
|
|
@@ -67,13 +67,13 @@ export function createActivityMotion() {
|
|
|
67
67
|
sample = fresh;
|
|
68
68
|
newSample = true;
|
|
69
69
|
},
|
|
70
|
-
step(now, dt, eligible, canCue, words, reported = null) {
|
|
70
|
+
step(now, dt, eligible, canCue, words, reported = null, gentleOnly = false) {
|
|
71
71
|
const fresh = isFresh(sample, now) ? sample : null;
|
|
72
72
|
const rate = outputRate(fresh);
|
|
73
73
|
activity.engaged = eligible && (rate > 0 || !!(fresh?.generating || fresh?.tools));
|
|
74
74
|
activity.cue = null;
|
|
75
75
|
|
|
76
|
-
// Tail response
|
|
76
|
+
// Tail response needs only a fresh observed rate, not a complete aggregate or an idle pose.
|
|
77
77
|
const target = targetTempo(eligible ? rate : 0);
|
|
78
78
|
if (target !== tempoTo) {
|
|
79
79
|
tempoFrom = activity.tailTempo;
|
|
@@ -91,33 +91,30 @@ export function createActivityMotion() {
|
|
|
91
91
|
// Evaluate each sample once. Busy, ineligible, and cooldown frames never queue gestures.
|
|
92
92
|
const received = newSample;
|
|
93
93
|
newSample = false;
|
|
94
|
-
if (!
|
|
94
|
+
if (!rate) {
|
|
95
95
|
clearCueHistory();
|
|
96
96
|
spinsSinceDance = 0;
|
|
97
97
|
return activity;
|
|
98
98
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
return activity;
|
|
102
|
-
}
|
|
103
|
-
if (!received) return activity;
|
|
104
|
-
|
|
99
|
+
// Track high output independently of pose readiness. Entering an already-fast
|
|
100
|
+
// stream is itself a cue; keep it due until an idle frame can actually play it.
|
|
105
101
|
const prior = isFresh(previous, now) ? outputRate(previous) : 0;
|
|
106
|
-
|
|
107
|
-
if (
|
|
108
|
-
const
|
|
109
|
-
if (rate
|
|
110
|
-
const
|
|
111
|
-
|
|
102
|
+
if (received && rate >= HIGH_ENTER) nextSustainedAt ??= prior ? now + SUSTAINED_INTERVAL_MS : now;
|
|
103
|
+
if (received) previous = fresh;
|
|
104
|
+
const changed = received && now - fresh.updatedAtMs <= CUE_MAX_AGE_MS;
|
|
105
|
+
if (changed && (!prior || rate < PEAK_REARM)) peakArmed = true;
|
|
106
|
+
const peak = changed && prior > 0 && rate > prior && rate >= PEAK_ENTER && peakArmed;
|
|
107
|
+
if (changed && rate >= PEAK_ENTER) peakArmed = false;
|
|
108
|
+
const marked = changed && prior > 0 && rate >= MARKED_ENTER && rate - prior >= MARKED_RISE;
|
|
109
|
+
const small = changed && prior > 0 && prior < SMALL_PREVIOUS_LIMIT && rate >= SMALL_ENTER && rate < MARKED_ENTER;
|
|
112
110
|
|
|
113
|
-
|
|
114
|
-
if (
|
|
115
|
-
const sustained = nextSustainedAt !== null && fresh.updatedAtMs >= nextSustainedAt;
|
|
116
|
-
if (sustained) nextSustainedAt = now + SUSTAINED_INTERVAL_MS;
|
|
117
|
-
if (now < nextCueAt) return activity;
|
|
111
|
+
const sustained = nextSustainedAt !== null && rate >= HIGH_EXIT && now >= nextSustainedAt;
|
|
112
|
+
if (!eligible || !canCue || now < nextCueAt || (!changed && !sustained)) return activity;
|
|
118
113
|
|
|
119
114
|
let word;
|
|
120
|
-
if (
|
|
115
|
+
if (gentleOnly || fresh.complete !== true) {
|
|
116
|
+
if (sustained || peak || marked || small) word = findMotion(words, reported, 'nod');
|
|
117
|
+
} else if (sustained) {
|
|
121
118
|
if (spinsSinceDance >= 2) word = findMotion(words, reported, 'dance');
|
|
122
119
|
if (word) spinsSinceDance = 0;
|
|
123
120
|
else {
|
|
@@ -126,15 +123,17 @@ export function createActivityMotion() {
|
|
|
126
123
|
else word = findMotion(words, reported, 'dance');
|
|
127
124
|
}
|
|
128
125
|
}
|
|
129
|
-
if (!
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
126
|
+
if (!gentleOnly && fresh.complete === true) {
|
|
127
|
+
if (!word && marked) word = findMotion(words, reported, 'wave');
|
|
128
|
+
if (!word && peak) {
|
|
129
|
+
const other = nextPeak === 'hop' ? 'flap' : 'hop';
|
|
130
|
+
word = findMotion(words, reported, nextPeak);
|
|
131
|
+
if (word) nextPeak = other;
|
|
132
|
+
else word = findMotion(words, reported, other);
|
|
133
|
+
}
|
|
134
|
+
if (!word && marked) word = findMotion(words, reported, 'bow');
|
|
135
135
|
}
|
|
136
|
-
if (!word &&
|
|
137
|
-
if (!word && small) {
|
|
136
|
+
if (!word && small && !gentleOnly && fresh.complete === true) {
|
|
138
137
|
const other = nextSmall === 'point' ? 'nod' : 'point';
|
|
139
138
|
word = findMotion(words, reported, nextSmall);
|
|
140
139
|
if (word) nextSmall = other;
|
|
@@ -144,7 +143,7 @@ export function createActivityMotion() {
|
|
|
144
143
|
activity.cue = word.id;
|
|
145
144
|
nextCueAt = now + CUE_COOLDOWN_MS;
|
|
146
145
|
if (nextSustainedAt !== null) nextSustainedAt = now + SUSTAINED_INTERVAL_MS;
|
|
147
|
-
}
|
|
146
|
+
} else if (sustained) nextSustainedAt = now + SUSTAINED_INTERVAL_MS;
|
|
148
147
|
return activity;
|
|
149
148
|
},
|
|
150
149
|
};
|
package/web/pet-app.js
CHANGED
|
@@ -2956,11 +2956,11 @@ function frame(steps, now, last) {
|
|
|
2956
2956
|
let tailTempo = 1;
|
|
2957
2957
|
if (host) {
|
|
2958
2958
|
const figure = at();
|
|
2959
|
-
const eligible = drawn && !!body && !
|
|
2959
|
+
const eligible = drawn && !!body && !pressing && !figure?.pressing &&
|
|
2960
2960
|
!bodyState.dialogOpen && !bodyState.still && !bodyState.thinking && !bodyState.listening && !sliding() &&
|
|
2961
2961
|
!acts.length && T >= actUntil;
|
|
2962
2962
|
const canCue = eligible && figure?.mode === 'idle' && !figure.busy && !figure.moving;
|
|
2963
|
-
const activity = agentSpeedMotion.step(Date.now(), dt, eligible, canCue, words, body?.words ?? null);
|
|
2963
|
+
const activity = agentSpeedMotion.step(Date.now(), dt, eligible, canCue, words, body?.words ?? null, lowMotion());
|
|
2964
2964
|
if (activity.cue) body.do(activity.cue);
|
|
2965
2965
|
engaged = activity.engaged;
|
|
2966
2966
|
tailTempo = activity.tailTempo;
|