@my-life-buddies/cli 0.10.0 → 0.13.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 +26 -12
- package/dist/bin/buddy.js +68 -12
- package/dist/bin/buddy.js.map +3 -3
- package/dist/bin/core.js +1077 -454
- package/dist/bin/core.js.map +4 -4
- package/dist/bin/preview.js +164 -2
- package/dist/bin/preview.js.map +4 -4
- package/dist/web/app.css +38 -0
- package/dist/web/app.js +103 -12
- package/dist/web/index.html +1 -1
- package/dist/web/widgets.js +4 -3
- package/package.json +3 -3
- package/resources/dada-object-avatar/SKILL.md +37 -0
- package/resources/dada-object-avatar/agents/openai.yaml +4 -0
- package/resources/dada-object-avatar/assets/examples/cat.png +0 -0
- package/resources/dada-object-avatar/assets/examples/cooking.png +0 -0
- package/resources/dada-object-avatar/assets/examples/divination.png +0 -0
- package/resources/dada-object-avatar/assets/examples/doctor.png +0 -0
- package/resources/dada-object-avatar/assets/examples/relationship.png +0 -0
- package/resources/dada-object-avatar/assets/examples/work.png +0 -0
- package/resources/dada-object-avatar/assets/preview.png +0 -0
- package/resources/dada-object-avatar/references/evaluation-rubric.md +22 -0
- package/resources/dada-object-avatar/references/examples.json +8 -0
- package/resources/dada-object-avatar/references/prompt-template.md +27 -0
- package/resources/dada-object-avatar/references/style-system.md +54 -0
- package/resources/dada-object-avatar/references/subject-design.md +23 -0
- package/resources/dada-object-avatar/references/training-guide.md +14 -0
- package/resources/dada-object-avatar/references/training-log.jsonl +0 -0
- package/resources/dada-object-avatar/references/training-record.schema.json +20 -0
- package/resources/dada-object-avatar/scripts/choose_gaze.py +36 -0
- package/resources/dada-object-avatar/scripts/record_example.py +22 -0
- package/resources/dada-object-avatar/scripts/validate_png.py +52 -0
- package/resources/dada-object-avatar.manifest.json +85 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Validate the alpha and bottom-flow invariants of an 8-bit RGBA PNG using stdlib only."""
|
|
3
|
+
import argparse, json, struct, sys, zlib
|
|
4
|
+
from pathlib import Path
|
|
5
|
+
|
|
6
|
+
def paeth(a, b, c):
|
|
7
|
+
p=a+b-c; pa=abs(p-a); pb=abs(p-b); pc=abs(p-c)
|
|
8
|
+
return a if pa <= pb and pa <= pc else b if pb <= pc else c
|
|
9
|
+
|
|
10
|
+
def decode(path):
|
|
11
|
+
blob=Path(path).read_bytes()
|
|
12
|
+
if blob[:8] != b'\x89PNG\r\n\x1a\n': raise ValueError('not a PNG')
|
|
13
|
+
pos=8; parts=[]; meta=None
|
|
14
|
+
while pos < len(blob):
|
|
15
|
+
length=struct.unpack('>I', blob[pos:pos+4])[0]; kind=blob[pos+4:pos+8]; data=blob[pos+8:pos+8+length]; pos += 12+length
|
|
16
|
+
if kind == b'IHDR': meta=struct.unpack('>IIBBBBB', data)
|
|
17
|
+
elif kind == b'IDAT': parts.append(data)
|
|
18
|
+
elif kind == b'IEND': break
|
|
19
|
+
if not meta: raise ValueError('missing IHDR')
|
|
20
|
+
w,h,depth,color,comp,flt,interlace=meta
|
|
21
|
+
if (depth,color,comp,flt,interlace)!=(8,6,0,0,0): raise ValueError('requires non-interlaced 8-bit RGBA PNG')
|
|
22
|
+
packed=zlib.decompress(b''.join(parts)); stride=w*4
|
|
23
|
+
if len(packed) != h*(stride+1): raise ValueError('unexpected scanline length')
|
|
24
|
+
rows=[]; offset=0; prior=bytearray(stride)
|
|
25
|
+
for _ in range(h):
|
|
26
|
+
f=packed[offset]; offset+=1; scan=bytearray(packed[offset:offset+stride]); offset+=stride
|
|
27
|
+
recon=bytearray(stride)
|
|
28
|
+
for i,x in enumerate(scan):
|
|
29
|
+
a=recon[i-4] if i>=4 else 0; b=prior[i]; c=prior[i-4] if i>=4 else 0
|
|
30
|
+
pred=(0,a,b,(a+b)//2,paeth(a,b,c))[f] if f <= 4 else (_ for _ in ()).throw(ValueError(f'bad filter {f}'))
|
|
31
|
+
recon[i]=(x+pred)&255
|
|
32
|
+
rows.append(recon); prior=recon
|
|
33
|
+
return w,h,rows
|
|
34
|
+
|
|
35
|
+
def main():
|
|
36
|
+
ap=argparse.ArgumentParser(); ap.add_argument('png'); ap.add_argument('--min-transparent',type=float,default=0.10)
|
|
37
|
+
args=ap.parse_args()
|
|
38
|
+
try:
|
|
39
|
+
w,h,rows=decode(args.png)
|
|
40
|
+
alphas=[row[x] for row in rows for x in range(3,w*4,4)]
|
|
41
|
+
corners=[rows[0][3],rows[0][(w-1)*4+3],rows[-1][3],rows[-1][(w-1)*4+3]]
|
|
42
|
+
lo=int(w*.375); hi=int(w*.625)
|
|
43
|
+
bottom_solid=any(rows[-1][x*4+3]==255 for x in range(lo,hi))
|
|
44
|
+
transparent=sum(a==0 for a in alphas)/len(alphas)
|
|
45
|
+
checks={"rgba":True,"transparent_fraction":transparent,"corners_transparent":all(a==0 for a in corners),"bottom_center_band_solid":bottom_solid}
|
|
46
|
+
ok=transparent>=args.min_transparent and checks['corners_transparent'] and bottom_solid
|
|
47
|
+
print(json.dumps({"file":str(Path(args.png).resolve()),"size":[w,h],"ok":ok,"checks":checks},indent=2))
|
|
48
|
+
raise SystemExit(0 if ok else 1)
|
|
49
|
+
except Exception as e:
|
|
50
|
+
print(json.dumps({"file":args.png,"ok":False,"error":str(e)},indent=2)); raise SystemExit(1)
|
|
51
|
+
|
|
52
|
+
if __name__=='__main__': main()
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
{
|
|
2
|
+
"source": "Developer-provided dada-object-avatar skill, imported 2026-09-15 without modifications",
|
|
3
|
+
"files": [
|
|
4
|
+
{
|
|
5
|
+
"path": "SKILL.md",
|
|
6
|
+
"sha256": "2389678c8a067e6f989d0f0d1e57a4ac64c29c21fd49360ade7b99e678c9f1d7"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"path": "agents/openai.yaml",
|
|
10
|
+
"sha256": "5732e15644f2f2255ff8ea066ab6f5ee79160b3735bd57683c40aa2a7074a633"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"path": "assets/examples/cat.png",
|
|
14
|
+
"sha256": "b1e7e22b1b5560965bc9f21f3f1ceca2ceacafc3ebac2dd46a98a8ecd821a7e9"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"path": "assets/examples/cooking.png",
|
|
18
|
+
"sha256": "2323e8d020cafce1062e4c40583cb500576d5c7fd8a49eb8b51acea4cff7e79a"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"path": "assets/examples/divination.png",
|
|
22
|
+
"sha256": "d597713a8e6cbd90ebaba43367be138f59ed5895c36121f1b9f4caaf25a1a814"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"path": "assets/examples/doctor.png",
|
|
26
|
+
"sha256": "bfcb24b30246b9f8a9787bb0429272402139d08e8d9fb7a366bf1453187ec180"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"path": "assets/examples/relationship.png",
|
|
30
|
+
"sha256": "eb0892f0d973d6f1993c0e30ff7a44bfb55a7c6c8839d075ca2b5f18e6e4343a"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"path": "assets/examples/work.png",
|
|
34
|
+
"sha256": "33d63b56bca1b098a4b2edb510e318a391c39e334b035cded78ac6aede91e080"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"path": "assets/preview.png",
|
|
38
|
+
"sha256": "56d660a0d848affc6094cb12f09a006e993a9fd2d52bfe0a5e8bb87f9004b3cd"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"path": "references/evaluation-rubric.md",
|
|
42
|
+
"sha256": "9342dde9b5cf5fd1958554de3cf8c6e29d11b0606a045c5296ac54830e736573"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"path": "references/examples.json",
|
|
46
|
+
"sha256": "488a7b3bcb6950cdcae0c9d49b559e94ca50f56da08f10e155e64dde50aaffcb"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"path": "references/prompt-template.md",
|
|
50
|
+
"sha256": "ddc7bb3362fcabac02c49c836ba618b485a158d7ebabf9beda7d37625d63a475"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"path": "references/style-system.md",
|
|
54
|
+
"sha256": "7f44dc0cbd5c7d9bf9d616126c25c42c36a3cc43fc805d2e3979089bab3a3176"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"path": "references/subject-design.md",
|
|
58
|
+
"sha256": "bab6c40bc393cad4c02999c978b31bcb355f18e57c6b9606edba795b4033d429"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"path": "references/training-guide.md",
|
|
62
|
+
"sha256": "80bb0b7b518dab348109fb26eb4f6ce3dcfd936c6fd1f39dabe97093ae958973"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"path": "references/training-log.jsonl",
|
|
66
|
+
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"path": "references/training-record.schema.json",
|
|
70
|
+
"sha256": "9ef4acc166561cee991000d232da135d22d99e6b781adec0604d9d8bea6e6bdb"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"path": "scripts/choose_gaze.py",
|
|
74
|
+
"sha256": "9f3001eb1ff6fc0c34062a8ed9701c6a1a8761331876fb22daee60e69b36918c"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"path": "scripts/record_example.py",
|
|
78
|
+
"sha256": "d737316af288d4df69cb38bf7ea7e7853e9f62b035e7b217663974a0bfd68732"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"path": "scripts/validate_png.py",
|
|
82
|
+
"sha256": "379ed9600b0d4ebc75df06b70ec5b6bc67d54fa13d880da751ccd8b7c8e16e9e"
|
|
83
|
+
}
|
|
84
|
+
]
|
|
85
|
+
}
|