@7ots/cli 0.1.17 → 0.1.36
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/README.md +11 -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 +61 -1
- package/cli/lib/account.mjs +23 -3
- package/cli/lib/assistant.mjs +92 -14
- package/cli/lib/brain.mjs +84 -11
- package/cli/lib/card-shot.mjs +1 -1
- 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 +98 -13
- package/cli/lib/mcp.mjs +1 -1
- package/cli/lib/open.mjs +3 -1
- package/cli/lib/pet-server.mjs +352 -41
- package/cli/lib/prompts.mjs +1 -1
- package/cli/lib/screen.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/tts-local.mjs +2 -2
- package/cli/lib/vm.mjs +2 -2
- package/cli/lib/wake-local.py +109 -0
- package/cli/lib/wake.mjs +102 -0
- package/cli/pet/electron/main.cjs +190 -8
- package/cli/pet/pet.html +153 -34
- package/cli/pet/senses.html +342 -0
- package/cli/pet/settings.html +815 -74
- package/dist/7ots.esm.js +373 -146
- package/dist/7ots.esm.js.map +4 -4
- package/dist/7ots.iife.js +373 -146
- package/dist/7ots.iife.js.map +4 -4
- package/llms.txt +27 -0
- package/package.json +5 -2
- package/server/channels/apuchat.mjs +18 -4
- package/server/errors.mjs +90 -0
- package/server/notify.mjs +78 -0
- package/server/server.mjs +84 -14
- 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 +38 -5
- 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 +252 -1
- 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 +14 -2
- 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 +270 -4
- 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 +9 -2
- package/src/voice/tags.js +22 -0
- package/server/platform/apuchat.mjs +0 -266
- package/server/platform/auth.mjs +0 -319
- package/server/platform/connect.mjs +0 -387
- package/server/platform/crypto.mjs +0 -80
- package/server/platform/db.mjs +0 -275
- package/server/platform/device.mjs +0 -222
- 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 -577
- package/server/platform/profile.mjs +0 -161
- package/server/platform/routes.mjs +0 -542
- package/server/platform/runtime.mjs +0 -242
- package/server/platform/sites.mjs +0 -146
- package/server/platform/store.mjs +0 -456
- package/server/platform/vm.mjs +0 -1057
|
@@ -24,6 +24,16 @@ const STYLE_FINISH = {
|
|
|
24
24
|
riso: 'toon', dotmatrix: 'toon', chalk: 'sketch', sticker: 'glossy', felt: 'clay', papercut: 'soft3d', lowpoly: 'toon', marble: 'soft3d', candy: 'glossy',
|
|
25
25
|
holo: 'glossy', sumie: 'sketch', tarot: 'toon', retro70: 'toon', mosaic: 'toon', neonsign: 'neon', graffiti: 'toon', thermal: 'soft3d',
|
|
26
26
|
};
|
|
27
|
+
/**
|
|
28
|
+
* Materiales del ot en 3D (look.material, LOOK_MATERIALS de identity/schema.js): plush = peluche, vinyl = el acabado
|
|
29
|
+
* y la textura de su spec; los demás fijan el acabado y la textura del cuerpo (los estilos artísticos mandan igual).
|
|
30
|
+
*/
|
|
31
|
+
export const MATERIAL3D = {
|
|
32
|
+
clay: { finish: 'clay', texture: 'none' }, metal: { finish: 'metal', texture: 'none' }, glass: { finish: 'glass', texture: 'none' },
|
|
33
|
+
pearl: { finish: 'pearl', texture: 'none' }, holo: { finish: 'holo', texture: 'none' }, wood: { finish: 'clay', texture: 'wood' },
|
|
34
|
+
stone: { finish: 'clay', texture: 'stone' }, knit: { finish: 'velvet', texture: 'knit' }, glitter: { finish: 'glossy', texture: 'glitter' },
|
|
35
|
+
quilt: { finish: 'velvet', texture: 'quilt' }, honeycomb: { finish: 'glossy', texture: 'honeycomb' }, bubbles: { finish: 'glass', texture: 'bubbles' },
|
|
36
|
+
};
|
|
27
37
|
/** Piezas del catálogo 2 sin modelo 3D propio → la existente más parecida (campo `as3d` en parts.js). */
|
|
28
38
|
function alias3D(s) {
|
|
29
39
|
s.eyes = { ...s.eyes, type: as3d('eyes', s.eyes.type) };
|
|
@@ -43,10 +53,12 @@ function styled3D(spec) {
|
|
|
43
53
|
return s;
|
|
44
54
|
}
|
|
45
55
|
import { shade, luminance, as3d } from '../character/parts.js';
|
|
56
|
+
|
|
57
|
+
const FINISH3D = new Set(['metal', 'glass', 'pearl', 'holo', 'velvet', 'pastel']);
|
|
46
58
|
import { textureOf } from '../character/skin.js';
|
|
47
59
|
import { GESTURES, GESTURE_ALIAS, VISEMES, EASE, clamp, lerp, approach, textToVisemes, babbleVisemes, HAND_POSES, MORPHS, EFFECTS, shapePoints, seeded } from '../character/motion.js';
|
|
48
60
|
import { U, bodyGeometry, surfaceProbe } from './body.js';
|
|
49
|
-
import { bodyMaterials, surfaceMaterial, mat, shadowTexture, CHEEK_IDS } from './materials.js';
|
|
61
|
+
import { bodyMaterials, surfaceMaterial, mat, shadowTexture, CHEEK_IDS, TEX_IDS } from './materials.js';
|
|
50
62
|
import { FX3D, glyph, disposeFx } from './fx.js';
|
|
51
63
|
import { buildModel, tickModel, modelGesture } from './model.js';
|
|
52
64
|
|
|
@@ -194,8 +206,12 @@ export class Character3D {
|
|
|
194
206
|
const kk = (this.kk = Math.sqrt(W * H) / 1.25); // escala de accesorios (1 ≈ ot medio)
|
|
195
207
|
const Y = (this.Y = (y) => (B.bottom - y) * U);
|
|
196
208
|
const X = (this.X = (x) => (x - L.cx) * U);
|
|
197
|
-
const
|
|
198
|
-
|
|
209
|
+
const mat3 = !st && MATERIAL3D[this.opts.material];
|
|
210
|
+
if (mat3) s.finish = mat3.finish;
|
|
211
|
+
const tex = (this.tex = mat3 ? mat3.texture : as3d('textures', textureOf(s)));
|
|
212
|
+
// a finish or texture picked in the creator (Acabado/Textura) that the shader draws wins over the default plush fur
|
|
213
|
+
const picked = !mat3 && (FINISH3D.has(s.finish) || (s.texture && s.texture !== 'auto' && tex in TEX_IDS));
|
|
214
|
+
const plush = (this.plush = !st && !mat3 && (['fur', 'fuzz', 'feathers'].includes(tex) || ((this.opts.material || 'plush') === 'plush' && !picked)));
|
|
199
215
|
const furLen = (this.furLen = plush ? (tex === 'fuzz' || tex === 'none' ? 0.05 : 0.065) * kk : 0);
|
|
200
216
|
const density = (this.density = furLen ? (this.quality === 'high' ? 1 / (furLen * 0.2) : 1 / (furLen * 0.32)) : 0);
|
|
201
217
|
this.maxShells = this.quality === 'high' ? 28 : 10;
|
|
@@ -207,6 +223,7 @@ export class Character3D {
|
|
|
207
223
|
lip: s.mouth.color || shade(body, dark ? 0.6 : -0.55),
|
|
208
224
|
});
|
|
209
225
|
this.furs = [];
|
|
226
|
+
this.pending = []; // glb de los mods que aún cargan (export.js los espera)
|
|
210
227
|
this.parts = [];
|
|
211
228
|
this.anims = [];
|
|
212
229
|
this.bodyMeshes = [];
|
|
@@ -1210,7 +1227,7 @@ export class Character3D {
|
|
|
1210
1227
|
holder.scale.setScalar(sc);
|
|
1211
1228
|
g.add(holder);
|
|
1212
1229
|
const tint = p.tint === 'body' ? this.spec.body.color : p.tint === 'color' ? a.color : '';
|
|
1213
|
-
loadGlb(p.glb).then((scene) => {
|
|
1230
|
+
const job = loadGlb(p.glb).then((scene) => {
|
|
1214
1231
|
const o = scene.clone(true);
|
|
1215
1232
|
o.traverse((m) => {
|
|
1216
1233
|
if (!m.isMesh) return;
|
|
@@ -1223,6 +1240,7 @@ export class Character3D {
|
|
|
1223
1240
|
});
|
|
1224
1241
|
holder.add(o);
|
|
1225
1242
|
}).catch(() => g.add(plane()));
|
|
1243
|
+
this.pending.push(job);
|
|
1226
1244
|
return g;
|
|
1227
1245
|
}
|
|
1228
1246
|
|
|
@@ -1242,10 +1260,12 @@ export class Character3D {
|
|
|
1242
1260
|
cv.getContext('2d').drawImage(img, 0, 0, cv.width, cv.height);
|
|
1243
1261
|
tex.needsUpdate = true;
|
|
1244
1262
|
};
|
|
1245
|
-
|
|
1263
|
+
const svg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="${vx} ${vy} ${vw} ${vh}" width="${cv.width}" height="${cv.height}">${inner}</svg>`;
|
|
1264
|
+
img.src = `data:image/svg+xml;charset=utf-8,${encodeURIComponent(svg)}`;
|
|
1246
1265
|
const m = new THREE.Mesh(new THREE.PlaneGeometry(vw * sc, vh * sc), new THREE.MeshBasicMaterial({ map: tex, transparent: true, depthWrite: false, side: THREE.DoubleSide }));
|
|
1247
1266
|
m.position.set((vx + vw / 2) * sc, -(vy + vh / 2) * sc, p.layer === 'back' ? -0.01 : 0.01);
|
|
1248
1267
|
m.userData.ownMaterial = true;
|
|
1268
|
+
m.userData.modPlane = { svg, w: cv.width, h: cv.height }; // export.js lo rasteriza con o.rasterSvg (si no, lo deja fuera)
|
|
1249
1269
|
return m;
|
|
1250
1270
|
}
|
|
1251
1271
|
|
|
@@ -1473,6 +1493,7 @@ export class Character3D {
|
|
|
1473
1493
|
this.fxg.rotation.y = this.yaw;
|
|
1474
1494
|
|
|
1475
1495
|
for (const f of this.furs) f.u.uTime.value = sec;
|
|
1496
|
+
this.bodyU.uTime.value = sec; // destellos de la purpurina
|
|
1476
1497
|
for (const a of this.anims) a(rm ? 0 : sec);
|
|
1477
1498
|
}
|
|
1478
1499
|
|
package/src/character3d/body.js
CHANGED
|
@@ -92,6 +92,17 @@ export function bodyGeometry(pts, box, quality = 'high') {
|
|
|
92
92
|
const Dc = depthK * mean;
|
|
93
93
|
|
|
94
94
|
const [ws, hs] = quality === 'high' ? [96, 64] : [40, 26];
|
|
95
|
+
/** Dirección unitaria de la esfera → punto de la superficie (out). También la usa export.js para hornear. */
|
|
96
|
+
const surface = (x, y, z, out = new THREE.Vector3()) => {
|
|
97
|
+
const s2 = x * x + y * y;
|
|
98
|
+
const ang = Math.atan2(-y, x); // a coordenadas 2D (y hacia abajo)
|
|
99
|
+
const R = sampleTable(T, ang);
|
|
100
|
+
const Dt = depthK * Math.min(R, mean * 1.05);
|
|
101
|
+
const D = Dc + (Dt - Dc) * s2;
|
|
102
|
+
let py = (bottom - cy) * U + y * R * U;
|
|
103
|
+
if (py < 0.03) py = 0.03 + (py - 0.03) * 0.35; // asiento: aplana un poco la base para que «se apoye» en el suelo
|
|
104
|
+
return out.set(x * R * U, py, z * D * U);
|
|
105
|
+
};
|
|
95
106
|
let g = new THREE.SphereGeometry(1, ws, hs);
|
|
96
107
|
g.deleteAttribute('uv');
|
|
97
108
|
g.deleteAttribute('normal');
|
|
@@ -100,23 +111,14 @@ export function bodyGeometry(pts, box, quality = 'high') {
|
|
|
100
111
|
const v = new THREE.Vector3();
|
|
101
112
|
for (let i = 0; i < pos.count; i++) {
|
|
102
113
|
v.fromBufferAttribute(pos, i).normalize();
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
const R = sampleTable(T, ang);
|
|
106
|
-
const Dt = depthK * Math.min(R, mean * 1.05);
|
|
107
|
-
const D = Dc + (Dt - Dc) * s2;
|
|
108
|
-
pos.setXYZ(i, v.x * R * U, (bottom - cy) * U + v.y * R * U, v.z * D * U);
|
|
109
|
-
}
|
|
110
|
-
// asiento: aplana un poco la base para que «se apoye» en el suelo
|
|
111
|
-
for (let i = 0; i < pos.count; i++) {
|
|
112
|
-
const y = pos.getY(i);
|
|
113
|
-
if (y < 0.03) pos.setY(i, 0.03 + (y - 0.03) * 0.35);
|
|
114
|
+
surface(v.x, v.y, v.z, v);
|
|
115
|
+
pos.setXYZ(i, v.x, v.y, v.z);
|
|
114
116
|
}
|
|
115
117
|
g.computeVertexNormals();
|
|
116
118
|
g.computeBoundingBox();
|
|
117
119
|
g.computeBoundingSphere();
|
|
118
120
|
g.userData.shared = true; // cacheada: no se libera con el personaje
|
|
119
|
-
const out = { geometry: g, table: T, cx, cy, bottom, mean, depth: Dc * U };
|
|
121
|
+
const out = { geometry: g, table: T, cx, cy, bottom, mean, depth: Dc * U, surface, segments: [ws, hs] };
|
|
120
122
|
cache.set(key, out);
|
|
121
123
|
if (cache.size > 160) cache.delete(cache.keys().next().value);
|
|
122
124
|
return out;
|