oneie 3.6.39 → 3.6.40
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/.claude/commands/deploy.md +187 -17
- package/.claude/commands/media-upload.md +186 -0
- package/.claude/hooks/.last-news-context +1 -1
- package/.claude/hooks/__pycache__/todo.cpython-312.pyc +0 -0
- package/one/README.md +1 -2
- package/one/knowledge/one-protocol-ai-agents.md +892 -0
- package/one/knowledge/one-protocol-executive-report.md +617 -0
- package/one/knowledge/one-protocol-standard.md +869 -0
- package/one/knowledge/one-protocol-whitepaper.md +756 -0
- package/one/knowledge/ontology-education-game.md +1654 -0
- package/one/knowledge/ontology-v2.md +4449 -0
- package/one/knowledge/ontology.md +1 -1
- package/one/things/contracts/Move.toml +12 -0
- package/one/things/contracts/README.md +288 -0
- package/one/things/contracts/one.move +762 -0
- package/one/things/contracts/sdk.ts +578 -0
- package/one/things/crypto/FEATURES.md +78 -0
- package/one/things/crypto/ONECORE.md +62 -0
- package/one/things/crypto/ONECOREFAQ.md +22 -0
- package/one/things/crypto/ONECOREHOW.md +46 -0
- package/one/things/crypto/ONEENTERPRISE.md +64 -0
- package/one/things/crypto/ONEENTERPRISEFAQ.md +64 -0
- package/one/things/crypto/ONEENTERPRISEHOW.md +53 -0
- package/one/things/crypto/ONEPRO.md +60 -0
- package/one/things/crypto/ONEPROFAQ.md +22 -0
- package/one/things/crypto/ONEPROHOW.md +53 -0
- package/one/things/crypto/READMEAGENCY.md +64 -0
- package/one/things/crypto/VSL.md +45 -0
- package/one/things/crypto/WebsiteCopy.md +176 -0
- package/one/things/design-system.md +832 -0
- package/one/things/pay.one.ie.md +53 -0
- package/one/things/plans/one-protocol-and-payone-usage.md +82 -0
- package/one/things/plans/plan-connect-to-api.md +146 -0
- package/one/things/plans-u.md +905 -0
- package/one/things/products/Blockchain Products.md +6278 -0
- package/one/things/scripts-clean-mac.sh +409 -0
- package/one/things/todo-release.md +654 -0
- package/one/things/todo.md +9 -642
- package/one/things/video-script-backup.md +318 -0
- package/one/things/video-script-demo.md +382 -0
- package/one/things/video-script-ontology.md +0 -1
- package/one/things/video-script.md +361 -0
- package/package.json +6 -5
- package/.claude/hooks/__pycache__/done.cpython-313.pyc +0 -0
- package/.claude/hooks/__pycache__/todo.cpython-311.pyc +0 -0
- package/llms.txt +0 -257
|
@@ -0,0 +1,409 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
##############################################################################
|
|
4
|
+
# Mac System Cleanup Script - Safe & Regular Use
|
|
5
|
+
#
|
|
6
|
+
# Purpose: Safely clean up disk space on macOS
|
|
7
|
+
# Usage: ./scripts-clean-mac.sh [--dry-run] [--help]
|
|
8
|
+
#
|
|
9
|
+
# Features:
|
|
10
|
+
# - DRY RUN mode (show what would be deleted, don't delete)
|
|
11
|
+
# - Interactive confirmation for major operations
|
|
12
|
+
# - Detailed reporting with before/after sizes
|
|
13
|
+
# - Preserves system integrity
|
|
14
|
+
# - Safe to run weekly or monthly
|
|
15
|
+
#
|
|
16
|
+
##############################################################################
|
|
17
|
+
|
|
18
|
+
set -e # Exit on error
|
|
19
|
+
|
|
20
|
+
# Colors for output
|
|
21
|
+
RED='\033[0;31m'
|
|
22
|
+
GREEN='\033[0;32m'
|
|
23
|
+
YELLOW='\033[1;33m'
|
|
24
|
+
BLUE='\033[0;34m'
|
|
25
|
+
NC='\033[0m' # No Color
|
|
26
|
+
|
|
27
|
+
# Configuration
|
|
28
|
+
DRY_RUN=false
|
|
29
|
+
SHOW_HELP=false
|
|
30
|
+
PRESERVE_SAFE=true
|
|
31
|
+
TOTAL_FREED=0
|
|
32
|
+
|
|
33
|
+
##############################################################################
|
|
34
|
+
# Utility Functions
|
|
35
|
+
##############################################################################
|
|
36
|
+
|
|
37
|
+
print_help() {
|
|
38
|
+
cat << EOF
|
|
39
|
+
${BLUE}Mac System Cleanup Script${NC}
|
|
40
|
+
|
|
41
|
+
${YELLOW}Usage:${NC}
|
|
42
|
+
./scripts-clean-mac.sh [options]
|
|
43
|
+
|
|
44
|
+
${YELLOW}Options:${NC}
|
|
45
|
+
--dry-run Show what would be deleted without making changes
|
|
46
|
+
--help Show this help message
|
|
47
|
+
|
|
48
|
+
${YELLOW}What gets cleaned:${NC}
|
|
49
|
+
✓ Old cache files (>30 days)
|
|
50
|
+
✓ Temporary files (/tmp, /var/tmp)
|
|
51
|
+
✓ Language files (non-English)
|
|
52
|
+
✓ Duplicate downloads
|
|
53
|
+
✓ Old Xcode derived data
|
|
54
|
+
✓ npm cache
|
|
55
|
+
✓ Trash bin
|
|
56
|
+
|
|
57
|
+
${YELLOW}What is preserved:${NC}
|
|
58
|
+
✗ Active applications
|
|
59
|
+
✗ System files
|
|
60
|
+
✗ Recent downloads (modified within 7 days)
|
|
61
|
+
✗ Active projects
|
|
62
|
+
|
|
63
|
+
${YELLOW}Schedule:${NC}
|
|
64
|
+
Add to crontab for weekly cleanup:
|
|
65
|
+
0 2 * * 0 ~/.zshrc && source ~/.zshrc && ~/path/to/scripts-clean-mac.sh
|
|
66
|
+
|
|
67
|
+
${YELLOW}Examples:${NC}
|
|
68
|
+
# Test run (show what would happen)
|
|
69
|
+
./scripts-clean-mac.sh --dry-run
|
|
70
|
+
|
|
71
|
+
# Actual cleanup
|
|
72
|
+
./scripts-clean-mac.sh
|
|
73
|
+
|
|
74
|
+
EOF
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
log_section() {
|
|
78
|
+
echo ""
|
|
79
|
+
echo -e "${BLUE}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
|
|
80
|
+
echo -e "${BLUE}→${NC} $1"
|
|
81
|
+
echo -e "${BLUE}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
log_success() {
|
|
85
|
+
echo -e "${GREEN}✓${NC} $1"
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
log_warning() {
|
|
89
|
+
echo -e "${YELLOW}⚠${NC} $1"
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
log_error() {
|
|
93
|
+
echo -e "${RED}✗${NC} $1"
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
log_info() {
|
|
97
|
+
echo -e "${BLUE}→${NC} $1"
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
get_size() {
|
|
101
|
+
if [ -d "$1" ] || [ -f "$1" ]; then
|
|
102
|
+
du -sh "$1" 2>/dev/null | awk '{print $1}'
|
|
103
|
+
else
|
|
104
|
+
echo "0B"
|
|
105
|
+
fi
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
format_bytes() {
|
|
109
|
+
local bytes=$1
|
|
110
|
+
if [ "$bytes" -lt 1024 ]; then
|
|
111
|
+
echo "${bytes}B"
|
|
112
|
+
elif [ "$bytes" -lt 1048576 ]; then
|
|
113
|
+
echo "$((bytes / 1024))KB"
|
|
114
|
+
elif [ "$bytes" -lt 1073741824 ]; then
|
|
115
|
+
echo "$((bytes / 1048576))MB"
|
|
116
|
+
else
|
|
117
|
+
echo "$((bytes / 1073741824))GB"
|
|
118
|
+
fi
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
safe_delete() {
|
|
122
|
+
local path="$1"
|
|
123
|
+
local description="$2"
|
|
124
|
+
|
|
125
|
+
if [ ! -e "$path" ]; then
|
|
126
|
+
return 0
|
|
127
|
+
fi
|
|
128
|
+
|
|
129
|
+
local size=$(du -sh "$path" 2>/dev/null | awk '{print $1}')
|
|
130
|
+
|
|
131
|
+
if [ "$DRY_RUN" = true ]; then
|
|
132
|
+
log_info "DRY RUN: Would remove $size from $description: $path"
|
|
133
|
+
else
|
|
134
|
+
log_info "Removing $size from $description..."
|
|
135
|
+
rm -rf "$path"
|
|
136
|
+
log_success "Removed"
|
|
137
|
+
TOTAL_FREED=$((TOTAL_FREED + $(du -sb "$path" 2>/dev/null | awk '{print $1}' || echo 0)))
|
|
138
|
+
fi
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
confirm() {
|
|
142
|
+
local prompt="$1"
|
|
143
|
+
|
|
144
|
+
if [ "$DRY_RUN" = true ]; then
|
|
145
|
+
return 0
|
|
146
|
+
fi
|
|
147
|
+
|
|
148
|
+
read -p "$(echo -e ${YELLOW})$prompt (y/n): $(echo -e ${NC})" -n 1 -r
|
|
149
|
+
echo
|
|
150
|
+
[[ $REPLY =~ ^[Yy]$ ]]
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
##############################################################################
|
|
154
|
+
# Cleanup Functions
|
|
155
|
+
##############################################################################
|
|
156
|
+
|
|
157
|
+
cleanup_package_managers() {
|
|
158
|
+
log_section "Package Manager Caches"
|
|
159
|
+
|
|
160
|
+
# npm cache
|
|
161
|
+
if command -v npm &> /dev/null; then
|
|
162
|
+
local npm_cache=~/.npm
|
|
163
|
+
if [ -d "$npm_cache" ]; then
|
|
164
|
+
local size=$(get_size "$npm_cache")
|
|
165
|
+
log_info "npm cache: $size"
|
|
166
|
+
if [ "$DRY_RUN" = true ]; then
|
|
167
|
+
log_info "DRY RUN: Would remove npm cache ($size)"
|
|
168
|
+
else
|
|
169
|
+
npm cache clean --force 2>/dev/null && log_success "npm cache cleaned"
|
|
170
|
+
fi
|
|
171
|
+
fi
|
|
172
|
+
fi
|
|
173
|
+
|
|
174
|
+
# Homebrew cache
|
|
175
|
+
if command -v brew &> /dev/null; then
|
|
176
|
+
local brew_cache=$(brew --cache)
|
|
177
|
+
if [ -d "$brew_cache" ]; then
|
|
178
|
+
local size=$(get_size "$brew_cache")
|
|
179
|
+
log_info "Homebrew cache: $size"
|
|
180
|
+
if confirm "Clear Homebrew cache ($size)?"; then
|
|
181
|
+
if [ "$DRY_RUN" = false ]; then
|
|
182
|
+
brew cleanup -s && log_success "Homebrew cache cleaned"
|
|
183
|
+
fi
|
|
184
|
+
fi
|
|
185
|
+
fi
|
|
186
|
+
fi
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
cleanup_system_caches() {
|
|
190
|
+
log_section "System Cache Files"
|
|
191
|
+
|
|
192
|
+
# Old cache files (>30 days)
|
|
193
|
+
local cache_dirs=(
|
|
194
|
+
~/Library/Caches
|
|
195
|
+
~/Library/Application\ Support
|
|
196
|
+
/Library/Caches
|
|
197
|
+
)
|
|
198
|
+
|
|
199
|
+
for cache_dir in "${cache_dirs[@]}"; do
|
|
200
|
+
if [ -d "$cache_dir" ]; then
|
|
201
|
+
local size=$(get_size "$cache_dir")
|
|
202
|
+
log_info "Checking $cache_dir ($size total)..."
|
|
203
|
+
|
|
204
|
+
if [ "$DRY_RUN" = true ]; then
|
|
205
|
+
log_info "DRY RUN: Would check for old files in $cache_dir"
|
|
206
|
+
else
|
|
207
|
+
# Find files not modified in last 30 days and delete them
|
|
208
|
+
find "$cache_dir" -type f -mtime +30 -delete 2>/dev/null || true
|
|
209
|
+
log_success "Cleaned old cache files"
|
|
210
|
+
fi
|
|
211
|
+
fi
|
|
212
|
+
done
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
cleanup_temporary_files() {
|
|
216
|
+
log_section "Temporary Files"
|
|
217
|
+
|
|
218
|
+
local temp_dirs=(
|
|
219
|
+
/tmp
|
|
220
|
+
/var/tmp
|
|
221
|
+
/var/log
|
|
222
|
+
)
|
|
223
|
+
|
|
224
|
+
for temp_dir in "${temp_dirs[@]}"; do
|
|
225
|
+
if [ -d "$temp_dir" ]; then
|
|
226
|
+
local size=$(get_size "$temp_dir")
|
|
227
|
+
if [ "$size" != "0B" ]; then
|
|
228
|
+
log_info "$temp_dir: $size"
|
|
229
|
+
if [ "$DRY_RUN" = true ]; then
|
|
230
|
+
log_info "DRY RUN: Would clean $temp_dir"
|
|
231
|
+
else
|
|
232
|
+
find "$temp_dir" -type f -mtime +7 -delete 2>/dev/null || true
|
|
233
|
+
log_success "Cleaned old temp files"
|
|
234
|
+
fi
|
|
235
|
+
fi
|
|
236
|
+
fi
|
|
237
|
+
done
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
cleanup_xcode() {
|
|
241
|
+
log_section "Xcode & Development"
|
|
242
|
+
|
|
243
|
+
# Xcode derived data
|
|
244
|
+
local xcode_data=~/Library/Developer/Xcode/DerivedData
|
|
245
|
+
if [ -d "$xcode_data" ]; then
|
|
246
|
+
local size=$(get_size "$xcode_data")
|
|
247
|
+
if [ "$size" != "0B" ]; then
|
|
248
|
+
log_info "Xcode DerivedData: $size"
|
|
249
|
+
if confirm "Clear Xcode DerivedData ($size)?"; then
|
|
250
|
+
safe_delete "$xcode_data" "Xcode DerivedData"
|
|
251
|
+
fi
|
|
252
|
+
fi
|
|
253
|
+
fi
|
|
254
|
+
|
|
255
|
+
# Old iOS device support
|
|
256
|
+
local device_support=~/Library/Developer/Xcode/iOS\ DeviceSupport
|
|
257
|
+
if [ -d "$device_support" ]; then
|
|
258
|
+
local size=$(get_size "$device_support")
|
|
259
|
+
log_info "iOS DeviceSupport: $size"
|
|
260
|
+
if confirm "Clear old iOS DeviceSupport ($size)?"; then
|
|
261
|
+
safe_delete "$device_support" "iOS DeviceSupport"
|
|
262
|
+
fi
|
|
263
|
+
fi
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
cleanup_downloads() {
|
|
267
|
+
log_section "Downloads Folder"
|
|
268
|
+
|
|
269
|
+
if [ -d ~/Downloads ]; then
|
|
270
|
+
local total=$(get_size ~/Downloads)
|
|
271
|
+
log_info "Total Downloads size: $total"
|
|
272
|
+
|
|
273
|
+
# Find large files not accessed in 60 days
|
|
274
|
+
local old_files=$(find ~/Downloads -type f -atime +60 2>/dev/null | wc -l)
|
|
275
|
+
if [ "$old_files" -gt 0 ]; then
|
|
276
|
+
log_warning "Found $old_files files not accessed in 60+ days"
|
|
277
|
+
|
|
278
|
+
if [ "$DRY_RUN" = true ]; then
|
|
279
|
+
log_info "DRY RUN: Would show old files for review"
|
|
280
|
+
find ~/Downloads -type f -atime +60 -exec ls -lh {} \; | head -10
|
|
281
|
+
else
|
|
282
|
+
if confirm "Review and optionally delete? (files will be listed)"; then
|
|
283
|
+
find ~/Downloads -type f -atime +60 -exec ls -lh {} \; | head -20
|
|
284
|
+
log_warning "Manually delete files you don't need (use Finder or rm)"
|
|
285
|
+
fi
|
|
286
|
+
fi
|
|
287
|
+
fi
|
|
288
|
+
fi
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
cleanup_trash() {
|
|
292
|
+
log_section "Trash/Recycle Bin"
|
|
293
|
+
|
|
294
|
+
local trash=~/.Trash
|
|
295
|
+
if [ -d "$trash" ]; then
|
|
296
|
+
local size=$(get_size "$trash")
|
|
297
|
+
if [ "$size" != "0B" ]; then
|
|
298
|
+
log_info "Trash size: $size"
|
|
299
|
+
if [ "$DRY_RUN" = true ]; then
|
|
300
|
+
log_info "DRY RUN: Would empty trash ($size)"
|
|
301
|
+
else
|
|
302
|
+
if confirm "Empty trash ($size)?"; then
|
|
303
|
+
rm -rf ~/.Trash/* && log_success "Trash emptied"
|
|
304
|
+
fi
|
|
305
|
+
fi
|
|
306
|
+
fi
|
|
307
|
+
fi
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
cleanup_language_files() {
|
|
311
|
+
log_section "Language Files (non-English)"
|
|
312
|
+
|
|
313
|
+
local app_dirs=(
|
|
314
|
+
/Applications
|
|
315
|
+
~/Applications
|
|
316
|
+
)
|
|
317
|
+
|
|
318
|
+
for app_dir in "${app_dirs[@]}"; do
|
|
319
|
+
if [ -d "$app_dir" ]; then
|
|
320
|
+
log_info "Checking $app_dir for language files..."
|
|
321
|
+
|
|
322
|
+
if [ "$DRY_RUN" = true ]; then
|
|
323
|
+
log_info "DRY RUN: Would remove non-English language files"
|
|
324
|
+
else
|
|
325
|
+
# Remove non-English .lproj directories
|
|
326
|
+
find "$app_dir" -type d -name "*.lproj" ! -name "en.lproj" -exec rm -rf {} + 2>/dev/null || true
|
|
327
|
+
log_success "Cleaned language files"
|
|
328
|
+
fi
|
|
329
|
+
fi
|
|
330
|
+
done
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
##############################################################################
|
|
334
|
+
# Main Execution
|
|
335
|
+
##############################################################################
|
|
336
|
+
|
|
337
|
+
main() {
|
|
338
|
+
# Parse arguments
|
|
339
|
+
while [[ $# -gt 0 ]]; do
|
|
340
|
+
case $1 in
|
|
341
|
+
--dry-run)
|
|
342
|
+
DRY_RUN=true
|
|
343
|
+
shift
|
|
344
|
+
;;
|
|
345
|
+
--help)
|
|
346
|
+
SHOW_HELP=true
|
|
347
|
+
shift
|
|
348
|
+
;;
|
|
349
|
+
*)
|
|
350
|
+
echo "Unknown option: $1"
|
|
351
|
+
SHOW_HELP=true
|
|
352
|
+
shift
|
|
353
|
+
;;
|
|
354
|
+
esac
|
|
355
|
+
done
|
|
356
|
+
|
|
357
|
+
if [ "$SHOW_HELP" = true ]; then
|
|
358
|
+
print_help
|
|
359
|
+
exit 0
|
|
360
|
+
fi
|
|
361
|
+
|
|
362
|
+
# Check if running as expected user
|
|
363
|
+
if [ "$(whoami)" != "toc" ]; then
|
|
364
|
+
log_warning "This script is optimized for user 'toc'. You are '$(whoami)'."
|
|
365
|
+
read -p "Continue anyway? (y/n): " -n 1 -r
|
|
366
|
+
echo
|
|
367
|
+
[[ ! $REPLY =~ ^[Yy]$ ]] && exit 1
|
|
368
|
+
fi
|
|
369
|
+
|
|
370
|
+
# Header
|
|
371
|
+
echo ""
|
|
372
|
+
if [ "$DRY_RUN" = true ]; then
|
|
373
|
+
echo -e "${YELLOW}═══════════════════════════════════════════════════${NC}"
|
|
374
|
+
echo -e "${YELLOW} DRY RUN MODE - No changes will be made${NC}"
|
|
375
|
+
echo -e "${YELLOW}═══════════════════════════════════════════════════${NC}"
|
|
376
|
+
else
|
|
377
|
+
echo -e "${GREEN}═══════════════════════════════════════════════════${NC}"
|
|
378
|
+
echo -e "${GREEN} Mac System Cleanup${NC}"
|
|
379
|
+
echo -e "${GREEN}═══════════════════════════════════════════════════${NC}"
|
|
380
|
+
fi
|
|
381
|
+
|
|
382
|
+
# Run cleanup operations
|
|
383
|
+
cleanup_trash
|
|
384
|
+
cleanup_temporary_files
|
|
385
|
+
cleanup_system_caches
|
|
386
|
+
cleanup_package_managers
|
|
387
|
+
cleanup_xcode
|
|
388
|
+
cleanup_language_files
|
|
389
|
+
cleanup_downloads
|
|
390
|
+
|
|
391
|
+
# Summary
|
|
392
|
+
log_section "Summary"
|
|
393
|
+
|
|
394
|
+
if [ "$DRY_RUN" = true ]; then
|
|
395
|
+
log_info "Dry run completed. No changes were made."
|
|
396
|
+
log_warning "Run without --dry-run to actually clean up."
|
|
397
|
+
else
|
|
398
|
+
log_success "Cleanup completed!"
|
|
399
|
+
|
|
400
|
+
# Get current disk usage
|
|
401
|
+
local disk_usage=$(df -h / | awk 'NR==2 {print $5 " used"}')
|
|
402
|
+
log_info "Current disk usage: $disk_usage"
|
|
403
|
+
fi
|
|
404
|
+
|
|
405
|
+
echo ""
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
# Run main function
|
|
409
|
+
main "$@"
|