opencode-skills-antigravity 1.0.39 → 1.0.41

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.
Files changed (91) hide show
  1. package/bundled-skills/.antigravity-install-manifest.json +10 -1
  2. package/bundled-skills/docs/integrations/jetski-cortex.md +3 -3
  3. package/bundled-skills/docs/integrations/jetski-gemini-loader/README.md +1 -1
  4. package/bundled-skills/docs/maintainers/repo-growth-seo.md +3 -3
  5. package/bundled-skills/docs/maintainers/security-findings-triage-2026-03-29-refresh.csv +34 -0
  6. package/bundled-skills/docs/maintainers/security-findings-triage-2026-03-29-refresh.md +2 -0
  7. package/bundled-skills/docs/maintainers/skills-update-guide.md +1 -1
  8. package/bundled-skills/docs/sources/sources.md +2 -2
  9. package/bundled-skills/docs/users/bundles.md +1 -1
  10. package/bundled-skills/docs/users/claude-code-skills.md +1 -1
  11. package/bundled-skills/docs/users/gemini-cli-skills.md +1 -1
  12. package/bundled-skills/docs/users/getting-started.md +1 -1
  13. package/bundled-skills/docs/users/kiro-integration.md +1 -1
  14. package/bundled-skills/docs/users/usage.md +4 -4
  15. package/bundled-skills/docs/users/visual-guide.md +4 -4
  16. package/bundled-skills/hugging-face-cli/SKILL.md +192 -195
  17. package/bundled-skills/hugging-face-community-evals/SKILL.md +213 -0
  18. package/bundled-skills/hugging-face-community-evals/examples/.env.example +3 -0
  19. package/bundled-skills/hugging-face-community-evals/examples/USAGE_EXAMPLES.md +101 -0
  20. package/bundled-skills/hugging-face-community-evals/scripts/inspect_eval_uv.py +104 -0
  21. package/bundled-skills/hugging-face-community-evals/scripts/inspect_vllm_uv.py +306 -0
  22. package/bundled-skills/hugging-face-community-evals/scripts/lighteval_vllm_uv.py +297 -0
  23. package/bundled-skills/hugging-face-dataset-viewer/SKILL.md +120 -120
  24. package/bundled-skills/hugging-face-gradio/SKILL.md +304 -0
  25. package/bundled-skills/hugging-face-gradio/examples.md +613 -0
  26. package/bundled-skills/hugging-face-jobs/SKILL.md +25 -18
  27. package/bundled-skills/hugging-face-jobs/index.html +216 -0
  28. package/bundled-skills/hugging-face-jobs/references/hardware_guide.md +336 -0
  29. package/bundled-skills/hugging-face-jobs/references/hub_saving.md +352 -0
  30. package/bundled-skills/hugging-face-jobs/references/token_usage.md +570 -0
  31. package/bundled-skills/hugging-face-jobs/references/troubleshooting.md +475 -0
  32. package/bundled-skills/hugging-face-jobs/scripts/cot-self-instruct.py +718 -0
  33. package/bundled-skills/hugging-face-jobs/scripts/finepdfs-stats.py +546 -0
  34. package/bundled-skills/hugging-face-jobs/scripts/generate-responses.py +587 -0
  35. package/bundled-skills/hugging-face-model-trainer/SKILL.md +11 -12
  36. package/bundled-skills/hugging-face-model-trainer/references/gguf_conversion.md +296 -0
  37. package/bundled-skills/hugging-face-model-trainer/references/hardware_guide.md +283 -0
  38. package/bundled-skills/hugging-face-model-trainer/references/hub_saving.md +364 -0
  39. package/bundled-skills/hugging-face-model-trainer/references/local_training_macos.md +231 -0
  40. package/bundled-skills/hugging-face-model-trainer/references/reliability_principles.md +371 -0
  41. package/bundled-skills/hugging-face-model-trainer/references/trackio_guide.md +189 -0
  42. package/bundled-skills/hugging-face-model-trainer/references/training_methods.md +150 -0
  43. package/bundled-skills/hugging-face-model-trainer/references/training_patterns.md +203 -0
  44. package/bundled-skills/hugging-face-model-trainer/references/troubleshooting.md +282 -0
  45. package/bundled-skills/hugging-face-model-trainer/references/unsloth.md +313 -0
  46. package/bundled-skills/hugging-face-model-trainer/scripts/convert_to_gguf.py +424 -0
  47. package/bundled-skills/hugging-face-model-trainer/scripts/dataset_inspector.py +417 -0
  48. package/bundled-skills/hugging-face-model-trainer/scripts/estimate_cost.py +150 -0
  49. package/bundled-skills/hugging-face-model-trainer/scripts/train_dpo_example.py +106 -0
  50. package/bundled-skills/hugging-face-model-trainer/scripts/train_grpo_example.py +89 -0
  51. package/bundled-skills/hugging-face-model-trainer/scripts/train_sft_example.py +122 -0
  52. package/bundled-skills/hugging-face-model-trainer/scripts/unsloth_sft_example.py +512 -0
  53. package/bundled-skills/hugging-face-paper-publisher/SKILL.md +11 -4
  54. package/bundled-skills/hugging-face-paper-publisher/examples/example_usage.md +326 -0
  55. package/bundled-skills/hugging-face-paper-publisher/references/quick_reference.md +216 -0
  56. package/bundled-skills/hugging-face-paper-publisher/scripts/paper_manager.py +606 -0
  57. package/bundled-skills/hugging-face-paper-publisher/templates/arxiv.md +299 -0
  58. package/bundled-skills/hugging-face-paper-publisher/templates/ml-report.md +358 -0
  59. package/bundled-skills/hugging-face-paper-publisher/templates/modern.md +319 -0
  60. package/bundled-skills/hugging-face-paper-publisher/templates/standard.md +201 -0
  61. package/bundled-skills/hugging-face-papers/SKILL.md +241 -0
  62. package/bundled-skills/hugging-face-trackio/.claude-plugin/plugin.json +19 -0
  63. package/bundled-skills/hugging-face-trackio/SKILL.md +117 -0
  64. package/bundled-skills/hugging-face-trackio/references/alerts.md +196 -0
  65. package/bundled-skills/hugging-face-trackio/references/logging_metrics.md +206 -0
  66. package/bundled-skills/hugging-face-trackio/references/retrieving_metrics.md +251 -0
  67. package/bundled-skills/hugging-face-vision-trainer/SKILL.md +595 -0
  68. package/bundled-skills/hugging-face-vision-trainer/references/finetune_sam2_trainer.md +254 -0
  69. package/bundled-skills/hugging-face-vision-trainer/references/hub_saving.md +618 -0
  70. package/bundled-skills/hugging-face-vision-trainer/references/image_classification_training_notebook.md +279 -0
  71. package/bundled-skills/hugging-face-vision-trainer/references/object_detection_training_notebook.md +700 -0
  72. package/bundled-skills/hugging-face-vision-trainer/references/reliability_principles.md +310 -0
  73. package/bundled-skills/hugging-face-vision-trainer/references/timm_trainer.md +91 -0
  74. package/bundled-skills/hugging-face-vision-trainer/scripts/dataset_inspector.py +814 -0
  75. package/bundled-skills/hugging-face-vision-trainer/scripts/estimate_cost.py +217 -0
  76. package/bundled-skills/hugging-face-vision-trainer/scripts/image_classification_training.py +383 -0
  77. package/bundled-skills/hugging-face-vision-trainer/scripts/object_detection_training.py +710 -0
  78. package/bundled-skills/hugging-face-vision-trainer/scripts/sam_segmentation_training.py +382 -0
  79. package/bundled-skills/jq/SKILL.md +273 -0
  80. package/bundled-skills/odoo-edi-connector/SKILL.md +32 -10
  81. package/bundled-skills/odoo-woocommerce-bridge/SKILL.md +9 -5
  82. package/bundled-skills/tmux/SKILL.md +370 -0
  83. package/bundled-skills/transformers-js/SKILL.md +639 -0
  84. package/bundled-skills/transformers-js/references/CACHE.md +339 -0
  85. package/bundled-skills/transformers-js/references/CONFIGURATION.md +390 -0
  86. package/bundled-skills/transformers-js/references/EXAMPLES.md +605 -0
  87. package/bundled-skills/transformers-js/references/MODEL_ARCHITECTURES.md +167 -0
  88. package/bundled-skills/transformers-js/references/PIPELINE_OPTIONS.md +545 -0
  89. package/bundled-skills/transformers-js/references/TEXT_GENERATION.md +315 -0
  90. package/bundled-skills/viboscope/SKILL.md +64 -0
  91. package/package.json +1 -1
@@ -0,0 +1,390 @@
1
+ # Environment Configuration Reference
2
+
3
+ Complete guide to configuring Transformers.js behavior using the `env` object.
4
+
5
+ ## Table of Contents
6
+
7
+ 1. [Overview](#overview)
8
+ 2. [Remote Model Configuration](#remote-model-configuration)
9
+ 3. [Local Model Configuration](#local-model-configuration)
10
+ 4. [Cache Configuration](#cache-configuration)
11
+ 5. [WASM Configuration](#wasm-configuration)
12
+ 6. [Common Configuration Patterns](#common-configuration-patterns)
13
+ 7. [Environment Best Practices](#environment-best-practices)
14
+
15
+ ## Overview
16
+
17
+ The `env` object provides comprehensive control over Transformers.js execution, caching, and model loading:
18
+
19
+ ```javascript
20
+ import { env } from '@huggingface/transformers';
21
+
22
+ // View current version
23
+ console.log(env.version); // e.g., '3.8.1'
24
+ ```
25
+
26
+ ### Available Properties
27
+
28
+ ```typescript
29
+ interface TransformersEnvironment {
30
+ // Version info
31
+ version: string;
32
+
33
+ // Backend configuration
34
+ backends: {
35
+ onnx: Partial<ONNXEnv>;
36
+ };
37
+
38
+ // Remote model settings
39
+ allowRemoteModels: boolean;
40
+ remoteHost: string;
41
+ remotePathTemplate: string;
42
+
43
+ // Local model settings
44
+ allowLocalModels: boolean;
45
+ localModelPath: string;
46
+ useFS: boolean;
47
+
48
+ // Cache settings
49
+ useBrowserCache: boolean;
50
+ useFSCache: boolean;
51
+ cacheDir: string | null;
52
+ useCustomCache: boolean;
53
+ customCache: CacheInterface | null;
54
+ useWasmCache: boolean;
55
+ cacheKey: string;
56
+ }
57
+ ```
58
+
59
+ ## Remote Model Configuration
60
+
61
+ Control how models are loaded from remote sources (default: Hugging Face Hub).
62
+
63
+ ### Disable Remote Loading
64
+
65
+ ```javascript
66
+ import { env } from '@huggingface/transformers';
67
+
68
+ // Force local-only mode (no network requests)
69
+ env.allowRemoteModels = false;
70
+ ```
71
+
72
+ **Use case:** Offline applications, security requirements, or air-gapped environments.
73
+
74
+ ### Custom Model Host
75
+
76
+ ```javascript
77
+ import { env } from '@huggingface/transformers';
78
+
79
+ // Use your own CDN or model server
80
+ env.remoteHost = 'https://cdn.example.com/models';
81
+
82
+ // Customize the URL pattern
83
+ // Default: '{model}/resolve/{revision}/{file}'
84
+ env.remotePathTemplate = 'custom/{model}/{file}';
85
+ ```
86
+
87
+ **Use case:** Self-hosting models, using a CDN for faster downloads, or corporate proxies.
88
+
89
+ ### Example: Private Model Server
90
+
91
+ ```javascript
92
+ import { env, pipeline } from '@huggingface/transformers';
93
+
94
+ // Configure custom model host
95
+ env.remoteHost = 'https://models.mycompany.com';
96
+ env.remotePathTemplate = '{model}/{file}';
97
+
98
+ // Models will be loaded from:
99
+ // https://models.mycompany.com/my-model/model.onnx
100
+ const pipe = await pipeline('sentiment-analysis', 'my-model');
101
+ ```
102
+
103
+ ## Local Model Configuration
104
+
105
+ Control loading models from the local file system.
106
+
107
+ ### Enable Local Models
108
+
109
+ ```javascript
110
+ import { env } from '@huggingface/transformers';
111
+
112
+ // Enable local file system loading
113
+ env.allowLocalModels = true;
114
+
115
+ // Set the base path for local models
116
+ env.localModelPath = '/path/to/models/';
117
+ ```
118
+
119
+ **Default values:**
120
+ - Browser: `allowLocalModels = false`, `localModelPath = '/models/'`
121
+ - Node.js: `allowLocalModels = true`, `localModelPath = '/models/'`
122
+
123
+ ### File System Control
124
+
125
+ ```javascript
126
+ import { env } from '@huggingface/transformers';
127
+
128
+ // Disable file system usage entirely (Node.js only)
129
+ env.useFS = false;
130
+ ```
131
+
132
+ ### Example: Local Model Directory Structure
133
+
134
+ ```
135
+ /app/models/
136
+ ├── onnx-community/
137
+ │ ├── Supertonic-TTS-ONNX/
138
+ │ │ ├── config.json
139
+ │ │ ├── tokenizer.json
140
+ │ │ ├── model.onnx
141
+ │ │ └── ...
142
+ │ └── yolo26l-pose-ONNX/
143
+ │ ├── config.json
144
+ │ ├── preprocessor_config.json
145
+ │ ├── model.onnx
146
+ │ └── ...
147
+ ```
148
+
149
+ ```javascript
150
+ env.allowLocalModels = true;
151
+ env.localModelPath = '/app/models/';
152
+ env.allowRemoteModels = false; // Offline mode
153
+
154
+ const classifier = await pipeline('sentiment-analysis', 'Xenova/distilbert-base-uncased-finetuned-sst-2-english');
155
+ ```
156
+
157
+ ## Cache Configuration
158
+
159
+ Transformers.js supports multiple caching strategies to improve performance and reduce network usage.
160
+
161
+ ### Quick Configuration
162
+
163
+ ```javascript
164
+ import { env } from '@huggingface/transformers';
165
+
166
+ // Browser cache (Cache API)
167
+ env.useBrowserCache = true; // default: true
168
+ env.cacheKey = 'my-app-transformers-cache'; // default: 'transformers-cache'
169
+
170
+ // Node.js filesystem cache
171
+ env.useFSCache = true; // default: true
172
+ env.cacheDir = './custom-cache-dir'; // default: './.cache'
173
+
174
+ // Custom cache implementation
175
+ env.useCustomCache = true;
176
+ env.customCache = new CustomCache(); // Implement Cache API interface
177
+
178
+ // WASM binary caching
179
+ env.useWasmCache = true; // default: true
180
+ ```
181
+
182
+ ### Disable Caching
183
+
184
+ ```javascript
185
+ import { env } from '@huggingface/transformers';
186
+
187
+ // Disable all caching (re-download on every load)
188
+ env.useFSCache = false;
189
+ env.useBrowserCache = false;
190
+ env.useWasmCache = false;
191
+ env.cacheDir = null;
192
+ ```
193
+
194
+ For comprehensive caching documentation including:
195
+ - Browser Cache API details and storage limits
196
+ - Node.js filesystem cache structure and management
197
+ - Custom cache implementations (Redis, database, S3)
198
+ - Cache clearing and monitoring strategies
199
+ - Best practices and troubleshooting
200
+
201
+ See **[Caching Reference](./CACHE.md)**
202
+
203
+ ## WASM Configuration
204
+
205
+ Configure ONNX Runtime Web Assembly backend settings.
206
+
207
+ ### Basic WASM Settings
208
+
209
+ ```javascript
210
+ import { env } from '@huggingface/transformers';
211
+
212
+ // Set custom WASM paths
213
+ env.backends.onnx.wasm.wasmPaths = 'https://cdn.jsdelivr.net/npm/onnxruntime-web/dist/';
214
+
215
+ // Configure number of threads (Node.js only)
216
+ env.backends.onnx.wasm.numThreads = 4;
217
+
218
+ // Enable/disable SIMD (single instruction, multiple data)
219
+ env.backends.onnx.wasm.simd = true;
220
+ ```
221
+
222
+ ### Proxy Configuration
223
+
224
+ ```javascript
225
+ import { env } from '@huggingface/transformers';
226
+
227
+ // Configure proxy for WASM downloads
228
+ env.backends.onnx.wasm.proxy = true;
229
+ ```
230
+
231
+ ### Self-Hosted WASM Files
232
+
233
+ ```javascript
234
+ import { env } from '@huggingface/transformers';
235
+
236
+ // Host WASM files on your own server
237
+ env.backends.onnx.wasm.wasmPaths = '/static/wasm/';
238
+ ```
239
+
240
+ **Required files:**
241
+ - `ort-wasm.wasm` - Main WASM binary
242
+ - `ort-wasm-simd.wasm` - SIMD-enabled WASM binary
243
+ - `ort-wasm-threaded.wasm` - Multi-threaded WASM binary
244
+ - `ort-wasm-simd-threaded.wasm` - SIMD + multi-threaded WASM binary
245
+
246
+ ## Common Configuration Patterns
247
+
248
+ ### Development Setup
249
+
250
+ ```javascript
251
+ import { env } from '@huggingface/transformers';
252
+
253
+ // Fast iteration with caching
254
+ env.allowRemoteModels = true;
255
+ env.useBrowserCache = true; // Browser
256
+ env.useFSCache = true; // Node.js
257
+ env.cacheDir = './.cache';
258
+ ```
259
+
260
+ ### Production (Local Models)
261
+
262
+ ```javascript
263
+ import { env } from '@huggingface/transformers';
264
+
265
+ // Secure, offline-capable setup
266
+ env.allowRemoteModels = false;
267
+ env.allowLocalModels = true;
268
+ env.localModelPath = '/app/models/';
269
+ env.useFSCache = false; // Models already local
270
+ ```
271
+
272
+ ### Offline-First Application
273
+
274
+ ```javascript
275
+ import { env } from '@huggingface/transformers';
276
+
277
+ // Try local first, fall back to remote
278
+ env.allowLocalModels = true;
279
+ env.localModelPath = './models/';
280
+ env.allowRemoteModels = true;
281
+ env.useFSCache = true;
282
+ env.cacheDir = './cache';
283
+ ```
284
+
285
+ ### Custom CDN
286
+
287
+ ```javascript
288
+ import { env } from '@huggingface/transformers';
289
+
290
+ // Use your own model hosting
291
+ env.remoteHost = 'https://cdn.example.com/ml-models';
292
+ env.remotePathTemplate = '{model}/{file}';
293
+ env.useBrowserCache = true;
294
+ ```
295
+
296
+ ### Memory-Constrained Environment
297
+
298
+ ```javascript
299
+ import { env } from '@huggingface/transformers';
300
+
301
+ // Minimize disk/memory usage
302
+ env.useFSCache = false;
303
+ env.useBrowserCache = false;
304
+ env.useWasmCache = false;
305
+ env.cacheDir = null;
306
+ ```
307
+
308
+ ### Testing/CI Environment
309
+
310
+ ```javascript
311
+ import { env } from '@huggingface/transformers';
312
+
313
+ // Predictable, isolated testing
314
+ env.allowRemoteModels = false;
315
+ env.allowLocalModels = true;
316
+ env.localModelPath = './test-fixtures/models/';
317
+ env.useFSCache = false;
318
+ ```
319
+
320
+
321
+
322
+ ## Environment Best Practices
323
+
324
+ ### 1. Configure Early
325
+
326
+ Set `env` properties before loading any models:
327
+
328
+ ```javascript
329
+ import { env, pipeline } from '@huggingface/transformers';
330
+
331
+ // ✓ Good: Configure before loading
332
+ env.allowRemoteModels = false;
333
+ env.localModelPath = '/app/models/';
334
+ const pipe = await pipeline('sentiment-analysis');
335
+
336
+ // ✗ Bad: Configuring after loading may not take effect
337
+ const pipe = await pipeline('sentiment-analysis');
338
+ env.allowRemoteModels = false; // Too late!
339
+ ```
340
+
341
+ ### 2. Use Environment Variables
342
+
343
+ ```javascript
344
+ import { env } from '@huggingface/transformers';
345
+
346
+ // Configure based on environment
347
+ env.allowRemoteModels = process.env.NODE_ENV === 'development';
348
+ env.cacheDir = process.env.MODEL_CACHE_DIR || './.cache';
349
+ env.localModelPath = process.env.LOCAL_MODELS_PATH || '/app/models/';
350
+ ```
351
+
352
+ ### 3. Handle Errors Gracefully
353
+
354
+ ```javascript
355
+ import { pipeline, env } from '@huggingface/transformers';
356
+
357
+ try {
358
+ env.allowRemoteModels = false;
359
+ const pipe = await pipeline('sentiment-analysis', 'my-model');
360
+ } catch (error) {
361
+ if (error.message.includes('not found')) {
362
+ console.error('Model not found locally. Enable remote models or download the model.');
363
+ }
364
+ throw error;
365
+ }
366
+ ```
367
+
368
+ ### 4. Log Configuration
369
+
370
+ ```javascript
371
+ import { env } from '@huggingface/transformers';
372
+
373
+ console.log('Transformers.js Configuration:', {
374
+ version: env.version,
375
+ allowRemoteModels: env.allowRemoteModels,
376
+ allowLocalModels: env.allowLocalModels,
377
+ localModelPath: env.localModelPath,
378
+ cacheDir: env.cacheDir,
379
+ useFSCache: env.useFSCache,
380
+ useBrowserCache: env.useBrowserCache
381
+ });
382
+ ```
383
+
384
+ ## Related Documentation
385
+
386
+ - **[Caching Reference](./CACHE.md)** - Comprehensive caching guide (browser, Node.js, custom implementations)
387
+ - [Pipeline Options](./PIPELINE_OPTIONS.md) - Configure pipeline loading with `progress_callback`, `device`, `dtype`, etc.
388
+ - [Model Architectures](./MODEL_ARCHITECTURES.md) - Supported models and architectures
389
+ - [Examples](./EXAMPLES.md) - Code examples for different runtimes
390
+ - [Main Skill Guide](../SKILL.md) - Getting started and common usage