@7ots/cli 0.1.19 → 0.1.37
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/.env.example +14 -0
- package/brand/logos/base.svg +1 -0
- package/brand/logos/clawpump.png +0 -0
- package/brand/logos/conductors.svg +1 -0
- package/brand/logos/notlogin.svg +12 -0
- package/brand/logos/pumpfun.png +0 -0
- package/brand/logos/solana.png +0 -0
- package/brand/logos/spawnerbot.svg +1 -0
- package/brand/logos/virtuals.png +0 -0
- package/cli/7ots.mjs +59 -1
- package/cli/lib/account.mjs +23 -3
- package/cli/lib/assistant.mjs +88 -13
- package/cli/lib/brain.mjs +76 -8
- package/cli/lib/config.mjs +14 -3
- package/cli/lib/desktop-sync.mjs +177 -0
- package/cli/lib/i18n.mjs +9 -0
- package/cli/lib/inferences.mjs +19 -2
- package/cli/lib/integrations.mjs +61 -6
- package/cli/lib/pet-server.mjs +316 -41
- package/cli/lib/prompts.mjs +1 -1
- package/cli/lib/senses/gestures.mjs +121 -0
- package/cli/lib/senses/index.mjs +490 -0
- package/cli/lib/senses/rules.mjs +159 -0
- package/cli/lib/senses/sources/activity.mjs +95 -0
- package/cli/lib/senses/sources/calendar.mjs +75 -0
- package/cli/lib/senses/sources/index.mjs +17 -0
- package/cli/lib/senses/sources/mail.mjs +48 -0
- package/cli/lib/senses/sources/system.mjs +39 -0
- package/cli/lib/senses/util.mjs +41 -0
- package/cli/lib/senses/vendor.mjs +78 -0
- package/cli/lib/stt-local.py +16 -8
- package/cli/lib/stt.mjs +53 -6
- package/cli/lib/tooluse.mjs +56 -0
- package/cli/lib/vm.mjs +1 -1
- package/cli/lib/wake-local.py +109 -0
- package/cli/lib/wake.mjs +102 -0
- package/cli/pet/electron/main.cjs +145 -16
- package/cli/pet/pet.html +127 -27
- package/cli/pet/senses.html +342 -0
- package/cli/pet/settings.html +787 -86
- package/dist/7ots.esm.js +374 -146
- package/dist/7ots.esm.js.map +4 -4
- package/dist/7ots.iife.js +374 -146
- package/dist/7ots.iife.js.map +4 -4
- package/llms.txt +27 -0
- package/package.json +5 -2
- package/server/channels/apuchat.mjs +2 -0
- package/server/errors.mjs +90 -0
- package/server/notify.mjs +78 -0
- package/server/server.mjs +68 -12
- package/server/settings.mjs +3 -0
- package/server/site.mjs +401 -0
- package/server/tts.mjs +29 -5
- package/src/avatar/AvatarStage.js +2 -2
- package/src/avatar/three.js +3 -2
- package/src/character/AvatarEditor.js +2 -1
- package/src/character/Character.js +1 -1
- package/src/character/TradingCard.js +2 -0
- package/src/character/beat.js +64 -2
- package/src/character/mods/orc.js +8 -1
- package/src/character/mods.js +104 -10
- package/src/character/motion.js +162 -0
- package/src/character/parts.js +40 -38
- package/src/character/styles.js +40 -38
- package/src/character3d/Character3D.js +26 -5
- package/src/character3d/body.js +14 -12
- package/src/character3d/export.js +693 -0
- package/src/character3d/fx.js +13 -0
- package/src/character3d/index.js +2 -0
- package/src/character3d/materials.js +106 -10
- package/src/character3d/room-themes.js +1184 -0
- package/src/character3d/room.js +487 -0
- package/src/character3d/stage.js +9 -3
- package/src/creator/StepCreator.js +316 -0
- package/src/i18n/index.js +3 -3
- package/src/i18n/messages/character.js +352 -4
- package/src/i18n/messages/creator.js +138 -0
- package/src/i18n/messages/identity.js +89 -1
- package/src/i18n/messages/platform.js +255 -1
- package/src/i18n/messages/server.js +443 -1
- package/src/i18n/messages/widget.js +233 -0
- package/src/identity/random.js +14 -2
- package/src/identity/schema.js +2 -1
- package/src/index.js +10 -2
- package/src/voice/tags.js +22 -0
- package/server/platform/apuchat.mjs +0 -266
- package/server/platform/auth.mjs +0 -337
- package/server/platform/byte.mjs +0 -291
- package/server/platform/connect.mjs +0 -391
- package/server/platform/crypto.mjs +0 -80
- package/server/platform/db.mjs +0 -293
- package/server/platform/device.mjs +0 -247
- package/server/platform/integrations.mjs +0 -169
- package/server/platform/look.mjs +0 -20
- package/server/platform/mods.mjs +0 -222
- package/server/platform/orquesta.mjs +0 -611
- package/server/platform/profile.mjs +0 -182
- package/server/platform/routes.mjs +0 -589
- package/server/platform/runtime.mjs +0 -286
- package/server/platform/sites.mjs +0 -146
- package/server/platform/stage3d.mjs +0 -82
- package/server/platform/store.mjs +0 -469
- package/server/platform/vm.mjs +0 -1057
- package/server/platform/wallet.mjs +0 -255
package/src/character3d/fx.js
CHANGED
|
@@ -300,6 +300,19 @@ export const FX3D = {
|
|
|
300
300
|
done(f.m);
|
|
301
301
|
},
|
|
302
302
|
},
|
|
303
|
+
aura: {
|
|
304
|
+
ms: 2600,
|
|
305
|
+
make: (c, f) => (f.m = inst('drop', mat('gloss', '#c4b5fd'), 8)),
|
|
306
|
+
draw: (c, f, p, age, a, rnd) => {
|
|
307
|
+
const e = Math.min(clamp(p / 0.15), fade(p)) * a;
|
|
308
|
+
for (let i = 0; i < 8; i++) {
|
|
309
|
+
const an = rnd() * TAU, d = 0.5 + rnd() * 0.12;
|
|
310
|
+
const q = (p * 1.6 + i / 8) % 1;
|
|
311
|
+
put(f.m, i, Math.cos(an) * c.W * d, c.H * (0.1 + 0.95 * q), Math.sin(an) * c.D * d, c.W * 0.045 * Math.sin(Math.PI * q) * e, Math.PI);
|
|
312
|
+
}
|
|
313
|
+
done(f.m);
|
|
314
|
+
},
|
|
315
|
+
},
|
|
303
316
|
dizzy: {
|
|
304
317
|
ms: 1600,
|
|
305
318
|
loop: true,
|
package/src/character3d/index.js
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
import * as THREE from 'three';
|
|
23
23
|
|
|
24
24
|
export const PATTERN_IDS = { none: 0, belly: 1, twotone: 2, spots: 3, stripes: 4, tiger: 5, mask: 6, hearts: 3, stars: 3, circuit: 4 };
|
|
25
|
-
export const TEX_IDS = { none: 0, scales: 1, speckles: 2, ridges: 3, gloss: 4, panels: 5 };
|
|
25
|
+
export const TEX_IDS = { none: 0, scales: 1, speckles: 2, ridges: 3, gloss: 4, panels: 5, knit: 6, polka: 7, glitter: 8, stone: 9, wood: 10, bubbles: 11, stitches: 12, honeycomb: 13, quilt: 14 };
|
|
26
26
|
export const CHEEK_IDS = { none: 0, blush: 1, lines: 2, freckles: 3, paint: 4, hearts: 5, stars: 6 };
|
|
27
27
|
|
|
28
28
|
const COMMON = /* glsl */ `
|
|
@@ -69,6 +69,7 @@ float furA(vec3 p, float h, out float sh) {
|
|
|
69
69
|
}
|
|
70
70
|
return a;
|
|
71
71
|
}
|
|
72
|
+
float skinTex2(vec3 P, vec3 N, float W, float H);
|
|
72
73
|
// textura de la piel: devuelve un factor de color; deja relieve (texH) y rugosidad (texR)
|
|
73
74
|
float skinTex(vec3 P, vec3 N) {
|
|
74
75
|
float W = uDims.x, H = uDims.y;
|
|
@@ -109,6 +110,97 @@ float skinTex(vec3 P, vec3 N) {
|
|
|
109
110
|
texH = -groove * 0.7 + rivet * 0.8; texR = -0.15 + groove * 0.3;
|
|
110
111
|
return mix(1.0, 0.7, groove) * mix(1.0, 1.15, rivet);
|
|
111
112
|
}
|
|
113
|
+
if (uTex >= 6) return skinTex2(P, N, W, H);
|
|
114
|
+
return 1.0;
|
|
115
|
+
}
|
|
116
|
+
// ruido de valor 3D (para piedra y madera)
|
|
117
|
+
float vnoise(vec3 p) {
|
|
118
|
+
vec3 i = floor(p), f = fract(p); f = f * f * (3.0 - 2.0 * f);
|
|
119
|
+
float a = h33(i).x, b = h33(i + vec3(1, 0, 0)).x, c = h33(i + vec3(0, 1, 0)).x, d = h33(i + vec3(1, 1, 0)).x;
|
|
120
|
+
float e = h33(i + vec3(0, 0, 1)).x, g = h33(i + vec3(1, 0, 1)).x, h = h33(i + vec3(0, 1, 1)).x, k = h33(i + vec3(1, 1, 1)).x;
|
|
121
|
+
return mix(mix(mix(a, b, f.x), mix(c, d, f.x), f.y), mix(mix(e, g, f.x), mix(h, k, f.x), f.y), f.z);
|
|
122
|
+
}
|
|
123
|
+
// catálogo 2: punto, lunares, purpurina, piedra, madera, burbujas, costuras, panal, acolchado
|
|
124
|
+
float skinTex2(vec3 P, vec3 N, float W, float H) {
|
|
125
|
+
vec2 cyl = vec2(atan(P.x, P.z) * W * 0.42, P.y); // mapeo cilíndrico (como las escamas)
|
|
126
|
+
if (uTex == 6) { // punto: columnas de «V»
|
|
127
|
+
vec2 q = cyl / (W * 0.12);
|
|
128
|
+
float fx = fract(q.x) - 0.5;
|
|
129
|
+
float v = 1.0 - abs(fract(q.y * 1.4 + abs(fx) * 1.1) - 0.5) * 2.0;
|
|
130
|
+
float st = smoothstep(0.0, 0.5, v) * smoothstep(0.0, 0.14, 0.5 - abs(fx));
|
|
131
|
+
texH = st * 0.9; texR = 0.2;
|
|
132
|
+
return mix(0.66, 1.06, st);
|
|
133
|
+
}
|
|
134
|
+
if (uTex == 7) { // lunares en tresbolillo
|
|
135
|
+
vec2 q = cyl / (W * 0.17);
|
|
136
|
+
q.x += 0.5 * mod(floor(q.y), 2.0);
|
|
137
|
+
float d = 1.0 - smoothstep(0.2, 0.235, length(fract(q) - 0.5));
|
|
138
|
+
texH = d * 0.25;
|
|
139
|
+
return mix(1.0, 1.55, d);
|
|
140
|
+
}
|
|
141
|
+
if (uTex == 8) { // purpurina: escamitas con su propia inclinación que destellan
|
|
142
|
+
vec3 q = P * (42.0 / W); vec3 r = h33(floor(q) + 7.0);
|
|
143
|
+
float fl = step(0.5, r.x);
|
|
144
|
+
float tw = pow(r.z, 5.0) * (0.55 + 0.45 * sin(uTime * 4.0 + r.y * 60.0));
|
|
145
|
+
texH = fl * (r.y - 0.5) * 0.9; texR = -0.4;
|
|
146
|
+
return mix(0.92, 1.0 + 1.6 * tw, fl);
|
|
147
|
+
}
|
|
148
|
+
if (uTex == 9) { // piedra: ruido + grietas (voronoi)
|
|
149
|
+
float n = vnoise(P * (5.0 / W)) * 0.55 + vnoise(P * (13.0 / W)) * 0.3 + vnoise(P * (36.0 / W)) * 0.15;
|
|
150
|
+
vec3 q = P * (4.5 / W); vec3 c = floor(q); float d1 = 9.0, d2 = 9.0;
|
|
151
|
+
for (int x = -1; x <= 1; x++) for (int y = -1; y <= 1; y++) for (int z = -1; z <= 1; z++) {
|
|
152
|
+
vec3 o = vec3(float(x), float(y), float(z));
|
|
153
|
+
float d = length(q - c - o - h33(c + o + 5.0));
|
|
154
|
+
if (d < d1) { d2 = d1; d1 = d; } else if (d < d2) d2 = d;
|
|
155
|
+
}
|
|
156
|
+
float crack = 1.0 - smoothstep(0.0, 0.07, d2 - d1);
|
|
157
|
+
texH = n * 0.9 - crack * 0.9; texR = 0.25;
|
|
158
|
+
return mix(0.74, 1.1, n) * mix(1.0, 0.5, crack);
|
|
159
|
+
}
|
|
160
|
+
if (uTex == 10) { // madera: anillos de un tronco a un costado, deformados por el ruido
|
|
161
|
+
float n = vnoise(P * vec3(3.0, 0.45, 3.0) / W);
|
|
162
|
+
float w = fract((length(vec2(P.x + W * 1.4, P.z * 0.7)) + n * W * 0.22) * (11.0 / W));
|
|
163
|
+
float ring = smoothstep(0.0, 0.18, w) * (1.0 - smoothstep(0.55, 1.0, w));
|
|
164
|
+
float grain = vnoise(P * vec3(60.0, 4.0, 60.0) / W);
|
|
165
|
+
texH = ring * 0.35 + grain * 0.15; texR = 0.08 - ring * 0.1;
|
|
166
|
+
return mix(0.68, 1.06, ring) * mix(0.93, 1.03, grain);
|
|
167
|
+
}
|
|
168
|
+
if (uTex == 11) { // burbujas: esferas con borde brillante
|
|
169
|
+
vec3 q = P * (5.5 / W); vec3 r = h33(floor(q) + 11.0);
|
|
170
|
+
float rad = 0.16 + 0.2 * r.x;
|
|
171
|
+
float d = length(fract(q) - (0.3 + 0.4 * r)) / rad;
|
|
172
|
+
float b = 1.0 - step(1.0, d);
|
|
173
|
+
texH = b * sqrt(max(0.0, 1.0 - d * d)) * 0.9; texR = -0.4;
|
|
174
|
+
return mix(1.0, mix(1.1, 1.8, smoothstep(0.6, 1.0, d)), b);
|
|
175
|
+
}
|
|
176
|
+
if (uTex == 12) { // costuras: una vertical al centro y una horizontal a la cintura, en puntadas
|
|
177
|
+
float lw = W * 0.011;
|
|
178
|
+
float gV = abs(P.x), gH = abs(P.y - H * 0.42);
|
|
179
|
+
float dY = step(0.5, fract(P.y / (W * 0.055))), dX = step(0.5, fract(cyl.x / (W * 0.055)));
|
|
180
|
+
float st = max((1.0 - smoothstep(lw, lw * 1.7, gV)) * dY, (1.0 - smoothstep(lw, lw * 1.7, gH)) * dX);
|
|
181
|
+
float fold = max(1.0 - smoothstep(0.0, W * 0.04, gV), 1.0 - smoothstep(0.0, W * 0.04, gH));
|
|
182
|
+
texH = -fold * 0.6 + st * 0.5; texR = 0.2;
|
|
183
|
+
return mix(1.0, 0.82, fold) * mix(1.0, 1.6, st);
|
|
184
|
+
}
|
|
185
|
+
if (uTex == 13) { // panal: celdas hexagonales abombadas
|
|
186
|
+
vec2 q = cyl / (W * 0.13);
|
|
187
|
+
vec2 rr = vec2(1.0, 1.732), hh = rr * 0.5;
|
|
188
|
+
vec2 a = mod(q, rr) - hh, b = mod(q - hh, rr) - hh;
|
|
189
|
+
vec2 g = dot(a, a) < dot(b, b) ? a : b;
|
|
190
|
+
float e = 0.5 - max(dot(abs(g), vec2(0.5, 0.866)), abs(g.x));
|
|
191
|
+
float wall = 1.0 - smoothstep(0.0, 0.07, e);
|
|
192
|
+
texH = -wall * 0.7 + smoothstep(0.0, 0.35, e) * 0.4; texR = -0.1 + wall * 0.2;
|
|
193
|
+
return mix(1.04, 0.66, wall);
|
|
194
|
+
}
|
|
195
|
+
if (uTex == 14) { // acolchado: rombos inflados con pespunte
|
|
196
|
+
vec2 q = cyl / (W * 0.2); q = vec2(q.x + q.y, q.x - q.y) * 0.7071;
|
|
197
|
+
vec2 f = fract(q) - 0.5;
|
|
198
|
+
float e = 0.5 - max(abs(f.x), abs(f.y));
|
|
199
|
+
float puff = sqrt(smoothstep(0.0, 0.5, e));
|
|
200
|
+
float seam = (1.0 - smoothstep(0.0, 0.03, e)) * step(0.5, fract((q.x + q.y) * 5.0));
|
|
201
|
+
texH = puff * 0.9; texR = 0.15;
|
|
202
|
+
return mix(0.66, 1.05, puff) * mix(1.0, 1.35, seam);
|
|
203
|
+
}
|
|
112
204
|
return 1.0;
|
|
113
205
|
}
|
|
114
206
|
float sdSeg(vec2 p, vec2 a, vec2 b) { vec2 pa = p - a, ba = b - a; return length(pa - ba * clamp(dot(pa, ba) / dot(ba, ba), 0.0, 1.0)); }
|
|
@@ -229,18 +321,21 @@ export function bodyMaterials(o) {
|
|
|
229
321
|
const f = o.plush ? 'plush' : o.finish;
|
|
230
322
|
const col = new THREE.Color(o.color);
|
|
231
323
|
if (o.plush) col.multiplyScalar(1.12); // compensa la sombra entre hebras
|
|
232
|
-
|
|
324
|
+
if (f === 'pearl' || f === 'glass') col.lerp(new THREE.Color('#ffffff'), f === 'pearl' ? 0.45 : 0.2);
|
|
325
|
+
const gel = (tex === 4 || tex === 11 || f === 'glass') && !o.plush;
|
|
326
|
+
const irid = { pearl: 1, holo: 1 }[f] || 0;
|
|
233
327
|
const m = new THREE.MeshPhysicalMaterial({
|
|
234
328
|
color: col,
|
|
235
|
-
roughness: gel ? 0.08 : { plush: 0.92, glossy: 0.28, soft3d: 0.55, clay: 0.85, flat: 0.75, toon: 0.6, neon: 0.4, sketch: 0.9 }[f] ?? 0.5,
|
|
236
|
-
metalness: 0,
|
|
237
|
-
clearcoat: gel ? 1 : { glossy: 1, soft3d: 0.35, toon: 0.6, neon: 0.8 }[f] ?? 0,
|
|
329
|
+
roughness: gel ? 0.08 : { plush: 0.92, glossy: 0.28, soft3d: 0.55, clay: 0.85, flat: 0.75, toon: 0.6, neon: 0.4, sketch: 0.9, metal: 0.3, pearl: 0.3, holo: 0.22, velvet: 0.95, pastel: 0.6 }[f] ?? 0.5,
|
|
330
|
+
metalness: { metal: 0.9, holo: 0.45 }[f] || 0,
|
|
331
|
+
clearcoat: gel ? 1 : { glossy: 1, soft3d: 0.35, toon: 0.6, neon: 0.8, metal: 0.4, pearl: 1, holo: 1 }[f] ?? 0,
|
|
332
|
+
iridescence: irid, iridescenceIOR: f === 'holo' ? 2 : 1.5, iridescenceThicknessRange: [120, 520],
|
|
238
333
|
clearcoatRoughness: f === 'soft3d' ? 0.35 : 0.08,
|
|
239
|
-
sheen: o.plush ? 1 : f === 'clay' ? 0.4 : 0,
|
|
334
|
+
sheen: o.plush || f === 'velvet' ? 1 : f === 'clay' ? 0.4 : 0,
|
|
240
335
|
sheenRoughness: 0.5,
|
|
241
336
|
sheenColor: new THREE.Color(o.color).lerp(new THREE.Color('#ffffff'), 0.45),
|
|
242
337
|
emissive: f === 'neon' ? new THREE.Color(o.color).multiplyScalar(0.55) : new THREE.Color(0),
|
|
243
|
-
envMapIntensity: o.plush ? 0.7 : gel ? 1.5 : 1,
|
|
338
|
+
envMapIntensity: o.plush ? 0.7 : gel ? 1.5 : f === 'metal' ? 1.6 : 1,
|
|
244
339
|
});
|
|
245
340
|
if (shell) {
|
|
246
341
|
m.alphaTest = 0.5;
|
|
@@ -251,9 +346,9 @@ export function bodyMaterials(o) {
|
|
|
251
346
|
...(shell ? { FUR_SHELL: '' } : {}),
|
|
252
347
|
...(toon && !shell ? { TOON: '' } : {}),
|
|
253
348
|
...(o.finish === 'sketch' && !shell ? { SKETCH: '' } : {}),
|
|
254
|
-
...(gel ? { GEL: '' } : {}),
|
|
349
|
+
...(gel ? { GEL: '', GLASS_RIM: f === 'glass' ? '0.55' : '0.0' } : {}),
|
|
255
350
|
};
|
|
256
|
-
m.customProgramCacheKey = () => `ots3d-${o.plush ? 'fur' : 'solid'}-${shell ? 'shell' : 'base'}-${toon ? o.finish : ''}-${gel ? 'gel' : ''}`;
|
|
351
|
+
m.customProgramCacheKey = () => `ots3d-${o.plush ? 'fur' : 'solid'}-${shell ? 'shell' : 'base'}-${toon ? o.finish : ''}-${gel ? (f === 'glass' ? 'glass' : 'gel') : ''}`;
|
|
257
352
|
m.onBeforeCompile = (sh) => {
|
|
258
353
|
Object.assign(sh.uniforms, uniforms);
|
|
259
354
|
sh.vertexShader = sh.vertexShader
|
|
@@ -310,7 +405,7 @@ export function bodyMaterials(o) {
|
|
|
310
405
|
/* glsl */ `#include <emissivemap_fragment>
|
|
311
406
|
#ifdef GEL
|
|
312
407
|
float fres = pow(1.0 - abs(dot(normal, normalize(vViewPosition))), 2.5);
|
|
313
|
-
totalEmissiveRadiance += diffuseColor.rgb * (0.22 + 0.6 * fres);
|
|
408
|
+
totalEmissiveRadiance += diffuseColor.rgb * (0.22 + 0.6 * fres) + vec3(GLASS_RIM) * fres;
|
|
314
409
|
#endif`,
|
|
315
410
|
)
|
|
316
411
|
.replace(
|
|
@@ -358,6 +453,7 @@ export function surfaceMaterial(u, o) {
|
|
|
358
453
|
uWobble: { value: o.wobble || 0 },
|
|
359
454
|
};
|
|
360
455
|
m.customProgramCacheKey = () => `ots3d-surf-${outline ? 'line' : o.kind || 'felt'}`;
|
|
456
|
+
m.userData.surface = { outline, off: own.uOff.value, box, round: own.uRound.value }; // para export.js (glb)
|
|
361
457
|
m.onBeforeCompile = (sh) => {
|
|
362
458
|
Object.assign(sh.uniforms, u, own);
|
|
363
459
|
const head = `uniform float uOff; uniform vec3 uBoxC; uniform vec3 uBoxH; uniform float uBoxR; uniform float uRound; uniform float uWobble;`;
|