@wenathlan/saddle 1.8.16 → 1.8.18

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 (223) hide show
  1. package/README.md +38 -13
  2. package/dist/apps/registry.d.ts +1 -1
  3. package/dist/index.d.ts +1 -0
  4. package/dist/index.d.ts.map +1 -1
  5. package/dist/index.js +1 -0
  6. package/dist/index.js.map +1 -1
  7. package/dist/isolation/contracts.d.ts +118 -0
  8. package/dist/isolation/contracts.d.ts.map +1 -0
  9. package/dist/isolation/contracts.js +84 -0
  10. package/dist/isolation/contracts.js.map +1 -0
  11. package/dist/mcp/server.d.ts +2 -2
  12. package/dist/scrape/robots.js +1 -1
  13. package/docs/artifactavailability.md +18 -2
  14. package/docs/containerplatforms-1.8.17.md +29 -0
  15. package/docs/releasenotes-1.8.16.md +6 -2
  16. package/docs/releasenotes-1.8.17.md +43 -0
  17. package/docs/releasenotes-1.8.18.md +32 -0
  18. package/docs/research-1.8.18-isolation.md +43 -0
  19. package/docs/saddle.archive.1.8.17.tar.gz.gpg +0 -0
  20. package/docs/todo-1.8.16.md +92 -8
  21. package/docs/todo-1.8.18.md +152 -0
  22. package/docs/workflowoperations.md +32 -0
  23. package/extension/manifest.json +1 -1
  24. package/package.json +3 -2
  25. package/docs/logs/.gitkeep +0 -0
  26. package/docs/plans/00.index.md +0 -50
  27. package/docs/plans/01.architecture.md +0 -86
  28. package/docs/plans/02.research.computer.use.md +0 -58
  29. package/docs/plans/03.research.captcha.bypass.md +0 -68
  30. package/docs/plans/04.research.sandbox.ai.md +0 -52
  31. package/docs/plans/05.capture.platform.md +0 -57
  32. package/docs/plans/06.dependencies.md +0 -97
  33. package/docs/plans/07.captcha.test.page.md +0 -41
  34. package/docs/plans/08.production.infra.md +0 -70
  35. package/docs/plans/09.database.schema.md +0 -121
  36. package/docs/plans/10.cloudinary.storage.md +0 -57
  37. package/docs/plans/11.movement.logs.json.md +0 -72
  38. package/docs/plans/12.research.atlas.agent.browser.md +0 -79
  39. package/docs/plans/13.research.anti.detection.md +0 -898
  40. package/docs/plans/14.research.proxy.md +0 -1495
  41. package/docs/plans/15.research.retry.rate.limit.md +0 -1958
  42. package/docs/plans/16.research.crawling.md +0 -1417
  43. package/docs/plans/17.research.caching.md +0 -1610
  44. package/docs/plans/18.research.content.extraction.md +0 -1952
  45. package/docs/plans/19.research.errors.events.md +0 -1523
  46. package/docs/plans/20.research.zod.validation.md +0 -1350
  47. package/docs/plans/21.research.batch.concurrency.md +0 -1888
  48. package/docs/plans/22.research.universal.runtime.md +0 -944
  49. package/docs/plans/23.research.ai.integration.md +0 -1465
  50. package/docs/plans/24.research.memory.persistence.md +0 -1979
  51. package/docs/plans/25.research.server.api.md +0 -342
  52. package/docs/plans/26.research.compilation.md +0 -249
  53. package/docs/plans/27.research.html.parsing.md +0 -251
  54. package/docs/plans/28.action.plan.md +0 -50
  55. package/docs/plans/29.api.reference.md +0 -174
  56. package/docs/plans/30.architecture.plan.md +0 -94
  57. package/docs/plans/31.auditoria.dados.md +0 -163
  58. package/docs/plans/32.bots.automacao.computacional.md +0 -214
  59. package/docs/plans/33.bots.codigo.revisao.md +0 -220
  60. package/docs/plans/34.bots.seguranca.cicd.md +0 -366
  61. package/docs/plans/35.comparativo.concorrencia.md +0 -464
  62. package/docs/plans/36.computational.memory.md +0 -340
  63. package/docs/plans/37.deploystrategy.md +0 -394
  64. package/docs/plans/38.flow.md +0 -155
  65. package/docs/plans/39.multi.platform.bot.md +0 -252
  66. package/docs/plans/40.npm.publish.md +0 -250
  67. package/docs/plans/41.o.que.falta.md +0 -407
  68. package/docs/plans/42.pesquisa.concorrencia.md +0 -721
  69. package/docs/plans/43.plan.universal.architecture.md +0 -496
  70. package/docs/plans/44.reference.md +0 -100
  71. package/docs/plans/45.robotarchitecture.md +0 -237
  72. package/docs/plans/46.scdnintegration.md +0 -284
  73. package/docs/plans/47.multiforge.readme.md +0 -129
  74. package/docs/plans/48.theory.v4.repo.os.md +0 -152
  75. package/docs/plans/49.third.party.infra.md +0 -12
  76. package/docs/plans/50.file.as.compute.md +0 -39
  77. package/docs/plans/51.architecture.virtual.processor.md +0 -80
  78. package/docs/plans/52.manifesto.v8.md +0 -11
  79. package/docs/plans/58.cdn.list.md +0 -23
  80. package/docs/plans/59.sql.frameworks.md +0 -33
  81. package/docs/plans/60.sql.thirdparty.md +0 -26
  82. package/docs/plans/61.objective.multiforge.md +0 -63
  83. package/docs/plans/62.huggingface.upload.md +0 -26
  84. package/docs/plans/63.kaggle.upload.md +0 -24
  85. package/docs/plans/64.npm.storage.md +0 -30
  86. package/docs/plans/65.rclone.terabox.md +0 -32
  87. package/docs/plans/66.buckets.and.models.todo.md +0 -14
  88. package/docs/plans/67.database.todo.md +0 -13
  89. package/docs/plans/68.deploy.packages.todo.md +0 -12
  90. package/docs/plans/69.report.human.operator.md +0 -133
  91. package/docs/plans/70.report.brain2qwerty.ems.md +0 -135
  92. package/docs/plans/71.report.hd.infinito.vram.md +0 -155
  93. package/docs/plans/72.plan.hd.infinito.node.md +0 -146
  94. package/docs/plans/73.plan.scifi.repos.md +0 -125
  95. package/docs/plans/74.000.manifesto.v8.flat.2..md +0 -11
  96. package/docs/plans/README.md +0 -489
  97. package/docs/plans/aggregate_platforms.mjs +0 -146
  98. package/docs/plans/examplesession.json +0 -36
  99. package/docs/plans/missing-facts.md +0 -192
  100. package/docs/plans/models.md +0 -64
  101. package/docs/plans/organize.cjs +0 -270
  102. package/docs/plans/platforms.md +0 -2887
  103. package/docs/plans/sites.md +0 -31322
  104. package/docs/sources/farm.py +0 -117
  105. package/docs/sources/html/saddle1.html +0 -132
  106. package/docs/sources/html/saddle2.html +0 -157
  107. package/docs/sources/html/saddle3.html +0 -119
  108. package/docs/sources/html/saddle4.html +0 -144
  109. package/docs/sources/html/saddle5.html +0 -72
  110. package/docs/sources/html/saddle6.html +0 -171
  111. package/docs/sources/html/saddle7.html +0 -236
  112. package/docs/sources/saddle.ts +0 -74
  113. package/docs/sources/schema.prisma +0 -88
  114. package/docs/sources/script.sh +0 -64
  115. package/docs/sources/workflows.yml +0 -458
  116. package/docs/talks1/_body.txt +0 -14
  117. package/docs/talks1/_index.md +0 -15
  118. package/docs/talks1/_screenshot.png +0 -0
  119. package/docs/talks1/assistant-01.md +0 -5
  120. package/docs/talks1/assistant-02.md +0 -5
  121. package/docs/talks1/assistant-03.md +0 -531
  122. package/docs/talks1/assistant-04.md +0 -26
  123. package/docs/talks1/assistant-05.md +0 -774
  124. package/docs/talks1/assistant-06.md +0 -1718
  125. package/docs/talks1/scrape-share.cjs +0 -185
  126. package/docs/talks1/scrape-share.ts +0 -183
  127. package/docs/talks1/user-01.md +0 -3
  128. package/docs/talks1/user-02.md +0 -3
  129. package/docs/talks1/user-03.md +0 -88
  130. package/docs/talks1/user-04.md +0 -3
  131. package/docs/talks1/user-05.md +0 -3
  132. package/docs/talks1/user-06.md +0 -88
  133. package/docs/talks1/user-07.md +0 -88
  134. package/docs/talks2/_body.txt +0 -14
  135. package/docs/talks2/_index.md +0 -16
  136. package/docs/talks2/_screenshot.png +0 -0
  137. package/docs/talks2/assistant-01.md +0 -5
  138. package/docs/talks2/assistant-02.md +0 -5
  139. package/docs/talks2/assistant-03.md +0 -424
  140. package/docs/talks2/assistant-04.md +0 -598
  141. package/docs/talks2/assistant-05.md +0 -1280
  142. package/docs/talks2/assistant-06.md +0 -1227
  143. package/docs/talks2/assistant-07.md +0 -1252
  144. package/docs/talks2/user-01.md +0 -3
  145. package/docs/talks2/user-02.md +0 -3
  146. package/docs/talks2/user-03.md +0 -88
  147. package/docs/talks2/user-04.md +0 -88
  148. package/docs/talks2/user-05.md +0 -88
  149. package/docs/talks2/user-06.md +0 -88
  150. package/docs/talks2/user-07.md +0 -3
  151. package/docs/talks3/_body.txt +0 -467
  152. package/docs/talks3/_index.md +0 -10
  153. package/docs/talks3/_screenshot.png +0 -0
  154. package/docs/talks3/assistant-01.md +0 -417
  155. package/docs/talks3/assistant-02.md +0 -417
  156. package/docs/talks3/assistant-03.md +0 -29
  157. package/docs/talks3/assistant-04.md +0 -727
  158. package/docs/talks3/user-01.md +0 -88
  159. package/docs/talks3/user-02.md +0 -88
  160. package/docs/talks3/user-03.md +0 -3
  161. package/docs/talks3/user-04.md +0 -3
  162. package/docs/talks4/_body.txt +0 -14
  163. package/docs/talks4/_index.md +0 -12
  164. package/docs/talks4/_screenshot.png +0 -0
  165. package/docs/talks4/assistant-01.md +0 -5
  166. package/docs/talks4/assistant-02.md +0 -5
  167. package/docs/talks4/assistant-03.md +0 -35
  168. package/docs/talks4/assistant-04.md +0 -512
  169. package/docs/talks4/assistant-05.md +0 -599
  170. package/docs/talks4/user-01.md +0 -3
  171. package/docs/talks4/user-02.md +0 -3
  172. package/docs/talks4/user-03.md +0 -88
  173. package/docs/talks4/user-04.md +0 -88
  174. package/docs/talks4/user-05.md +0 -7
  175. package/docs/talks5/_body.txt +0 -14
  176. package/docs/talks5/_index.md +0 -13
  177. package/docs/talks5/_screenshot.png +0 -0
  178. package/docs/talks5/assistant-01.md +0 -5
  179. package/docs/talks5/assistant-02.md +0 -5
  180. package/docs/talks5/assistant-03.md +0 -690
  181. package/docs/talks5/assistant-04.md +0 -758
  182. package/docs/talks5/assistant-05.md +0 -974
  183. package/docs/talks5/user-01.md +0 -3
  184. package/docs/talks5/user-02.md +0 -3
  185. package/docs/talks5/user-03.md +0 -105
  186. package/docs/talks5/user-04.md +0 -105
  187. package/docs/talks5/user-05.md +0 -63
  188. package/docs/talks5/user-06.md +0 -105
  189. package/docs/talks6/_body.txt +0 -14
  190. package/docs/talks6/_index.md +0 -9
  191. package/docs/talks6/_screenshot.png +0 -0
  192. package/docs/talks6/assistant-01.md +0 -5
  193. package/docs/talks6/assistant-02.md +0 -5
  194. package/docs/talks6/assistant-03.md +0 -1499
  195. package/docs/talks6/user-01.md +0 -3
  196. package/docs/talks6/user-02.md +0 -3
  197. package/docs/talks6/user-03.md +0 -88
  198. package/docs/talks6/user-04.md +0 -88
  199. package/docs/talks7/_body.txt +0 -14
  200. package/docs/talks7/_index.md +0 -10
  201. package/docs/talks7/_screenshot.png +0 -0
  202. package/docs/talks7/assistant-01.md +0 -5
  203. package/docs/talks7/assistant-02.md +0 -5
  204. package/docs/talks7/assistant-03.md +0 -523
  205. package/docs/talks7/assistant-04.md +0 -617
  206. package/docs/talks7/user-01.md +0 -3
  207. package/docs/talks7/user-02.md +0 -3
  208. package/docs/talks7/user-03.md +0 -105
  209. package/docs/talks7/user-04.md +0 -67
  210. package/docs/talks8/conversa1.txt +0 -1322
  211. package/docs/talks8/conversa2.txt +0 -237
  212. package/docs/talks9/Beyond the Obvious_ 50 Plataformas Auto-Hospedadas de Forja de C/303/263digo para Al/303/251m de Gitea e GitLab.md" +0 -174
  213. package/docs/talks9/De NPM a Multi-Linguagem_ Uma Arquitetura T/303/251cnica para a Execu/303/247/303/243o Integrada de C/303/263digo no Ecossistema Node.js.md" +0 -59
  214. package/docs/talks9/De NPM a VMs Virtuais_ Uma An/303/241lise Arquitet/303/264nica para a Realiza/303/247/303/243o do Ciclo de Vida do Projeto SADDLE.md" +0 -91
  215. package/docs/talks9/Mapeamento da Engrenagem Computacional_ Uma Arquitetura para Execu/303/247/303/243o Isolada e Persist/303/252ncia em Ambientes Distribu/303/255dos.md" +0 -116
  216. package/docs/talks9/O Cen/303/241rio Pr/303/241tico do SADDLE_ Uma An/303/241lise de Viabilidade e Modelo de Ciclo de Vida Integrado.md" +0 -128
  217. package/docs/talks9/README (2).md +0 -489
  218. package/docs/talks9/README.md +0 -198
  219. package/docs/talks9/Viabilidade do Saddle_ Uma An/303/241lise T/303/251cnica da Transforma/303/247/303/243o de Armazenamento Remoto em Mem/303/263ria Computacional.md" +0 -80
  220. package/docs/talks9/conversa.txt +0 -544
  221. package/docs/talks9/other (2).md +0 -39
  222. package/docs/talks9/other.md +0 -57
  223. package/docs/talks9/outro.txt +0 -24
@@ -1,340 +0,0 @@
1
- # Saddle Computational Memory System
2
-
3
- > Transform storage memory into computational memory (RAM, GPU).
4
- > Unlimited memory through repository buckets and external storage.
5
-
6
- ## Overview
7
-
8
- The saddle robot implements a unique computational memory
9
- architecture that transforms storage memory (files, blobs,
10
- assets in repositories) into computational memory (RAM, GPU
11
- VRAM) for processing. This enables effectively unlimited
12
- memory for AI agent operations.
13
-
14
- ## Memory Architecture
15
-
16
- ### Layer Diagram
17
-
18
- ```
19
- ┌─────────────────────────────────────────────────────┐
20
- │ Computation Layer │
21
- │ (RAM / GPU) │
22
- │ │
23
- │ Processing │ Inference │ Cache │
24
- │ │ (ML Models) │ │
25
- ├─────────────────────────────────────────────────────┤
26
- │ Memory Engine (Bridge) │
27
- │ │
28
- │ Load │ Transform │ Process │ Persist │
29
- ├─────────────────────────────────────────────────────┤
30
- │ Storage Layer │
31
- │ │
32
- │ Repositories │ HF Buckets │ Kaggle │ S3 │
33
- └─────────────────────────────────────────────────────┘
34
- ```
35
-
36
- ### Memory Transformation Flow
37
-
38
- ```
39
- 1. Storage Object (file/blob in repo)
40
-
41
-
42
- 2. Memory Engine loads object
43
-
44
-
45
- 3. Object parsed into memory buffer
46
-
47
-
48
- 4. Memory buffer mapped to virtual RAM
49
-
50
-
51
- 5. Computation performed on virtual RAM
52
-
53
-
54
- 6. Results written back to storage
55
-
56
-
57
- 7. Storage object updated
58
- ```
59
-
60
- ## Storage Targets
61
-
62
- ### Repository Storage (Primary)
63
-
64
- GitHub/GitLab/Forgejo/Gitea repositories serve as the
65
- primary storage buckets. Files, assets, and releases are
66
- used as memory objects.
67
-
68
- ```typescript
69
- interface RepoStorageTarget {
70
- platform: 'github' | 'gitlab' | 'forgejo' | 'gitea'
71
- owner: string
72
- repo: string
73
- branch: string
74
- path: string
75
- token: string
76
- }
77
- ```
78
-
79
- ### Hugging Face Storage
80
-
81
- Hugging Face Spaces and Repositories as memory backends.
82
-
83
- ```typescript
84
- interface HFStorageTarget {
85
- type: 'huggingface'
86
- space: string
87
- token: string
88
- revision: string
89
- }
90
- ```
91
-
92
- ### Kaggle Storage
93
-
94
- Kaggle datasets and notebooks as memory storage targets.
95
-
96
- ```typescript
97
- interface KaggleStorageTarget {
98
- type: 'kaggle'
99
- dataset: string
100
- token: string
101
- ssl_verification: boolean
102
- }
103
- ```
104
-
105
- ### ModelScope Storage
106
-
107
- ModelScope repositories for ML model memory storage.
108
-
109
- ```typescript
110
- interface ModelScopeStorageTarget {
111
- type: 'modelscope'
112
- namespace: string
113
- repo: string
114
- token: string
115
- }
116
- ```
117
-
118
- ### Terabox and File Hostings
119
-
120
- Generic file hosting as storage backend for raw memory data.
121
-
122
- ```typescript
123
- interface FileHostingStorageTarget {
124
- type: 'filehosting'
125
- host: string
126
- path: string
127
- token: string
128
- method: 'upload' | 's3compatible' | 'webdav'
129
- }
130
- ```
131
-
132
- ## Memory Engine Implementation
133
-
134
- ### Core Class
135
-
136
- ```typescript
137
- class MemoryEngine {
138
- private storage: Map<string, MemoryObject>
139
- private backends: StorageBackend[]
140
-
141
- constructor(config: MemoryEngineConfig) {
142
- this.backends = config.backends.map(
143
- (backend) => StorageBackendFactory.create(backend)
144
- )
145
- }
146
-
147
- async load(key: string): Promise<MemoryObject | null> {
148
- try {
149
- for (const backend of this.backends) {
150
- const object = await backend.load(key)
151
- if (object !== null) {
152
- return this.transformToCompute(object)
153
- }
154
- }
155
- return null
156
- } catch (error) {
157
- throw new Error(
158
- `MemoryEngine.load failed for key "${key}": ${error.message}`
159
- )
160
- }
161
- }
162
-
163
- async persist(
164
- key: string,
165
- data: ComputeResult
166
- ): Promise<boolean> {
167
- try {
168
- const storageObject = this.transformToStorage(data)
169
- for (const backend of this.backends) {
170
- await backend.save(key, storageObject)
171
- }
172
- return true
173
- } catch (error) {
174
- throw new Error(
175
- `MemoryEngine.persist failed for key "${key}": ${error.message}`
176
- )
177
- }
178
- }
179
-
180
- private transformToCompute(
181
- object: StorageObject
182
- ): MemoryObject {
183
- const buffer = Buffer.from(object.data)
184
-
185
- return {
186
- id: object.key,
187
- buffer: buffer,
188
- size: buffer.byteLength,
189
- type: object.mimeType,
190
- createdAt: new Date(),
191
- }
192
- }
193
-
194
- private transformToStorage(
195
- result: ComputeResult
196
- ): StorageObject {
197
- return {
198
- key: result.id,
199
- data: result.payload,
200
- mimeType: result.mimeType ?? 'application/octet-stream',
201
- metadata: result.metadata,
202
- }
203
- }
204
-
205
- release(key: string): Promise<void> {
206
- this.storage.delete(key)
207
- return Promise.resolve()
208
- }
209
- }
210
- ```
211
-
212
- ### Memory Object Interface
213
-
214
- ```typescript
215
- interface MemoryObject {
216
- id: string
217
- buffer: Buffer
218
- size: number
219
- type: string
220
- createdAt: Date
221
- metadata?: Record<string, unknown>
222
- }
223
- ```
224
-
225
- ### Compute Result Interface
226
-
227
- ```typescript
228
- interface ComputeResult {
229
- id: string
230
- payload: string | Buffer | object
231
- mimeType?: string
232
- metadata?: Record<string, unknown>
233
- processingTimeMs: number
234
- memoryUsedBytes: number
235
- }
236
- ```
237
-
238
- ## Computational Memory Use Cases
239
-
240
- ### Use Case 1: Large File Processing
241
-
242
- Load a large file from repository storage into virtual RAM,
243
- process it, and write results back.
244
-
245
- ```
246
- repo://my-repo/large-file.bin
247
- → Memory Engine loads into buffer (virtual RAM)
248
- → Processing pipeline transforms buffer
249
- → Results written back to repo
250
- ```
251
-
252
- ### Use Case 2: ML Model Inference
253
-
254
- Store ML model weights in repository storage, load into
255
- GPU VRAM for inference, persist results.
256
-
257
- ```
258
- repo://models/my-model/weights.bin
259
- → Memory Engine loads into GPU buffer
260
- → Inference engine processes
261
- → Results stored as repo artifacts
262
- ```
263
-
264
- ### Use Case 3: Browser Session Memory
265
-
266
- Capture browser sessions as JSON, store in repo, replay
267
- on another machine with full session memory.
268
-
269
- ```
270
- repo://saddle/sessions/session-001.json
271
- → Memory Engine loads session log
272
- → Browser engine replays movements
273
- → Execution results stored back
274
- ```
275
-
276
- ## Performance Characteristics
277
-
278
- | Aspect | Metric | Notes |
279
- |--------|--------|-------|
280
- | Load latency | Depends on storage backend | Local storage fastest |
281
- | Process throughput | Depends on compute layer | RAM fastest, storage limited |
282
- | Persist latency | Depends on storage backend | Batch writes preferred |
283
- | Memory overhead | ~2x storage size | Buffer + metadata |
284
- | Max capacity | Effectively unlimited | Bounded by storage targets |
285
-
286
- ## Error Handling
287
-
288
- The memory engine implements try-catch around all storage
289
- operations with contextual error logging for later tracing.
290
-
291
- ```typescript
292
- async safeLoad<T>(
293
- key: string
294
- ): Promise<{ success: boolean; data?: T; error?: string }> {
295
- try {
296
- const result = await this.load(key)
297
- return { success: true, data: result as T }
298
- } catch (error) {
299
- return {
300
- success: false,
301
- error: error instanceof Error ? error.message : 'Unknown error',
302
- }
303
- }
304
- }
305
- ```
306
-
307
- ## Storage Backend Factory
308
-
309
- ```typescript
310
- class StorageBackendFactory {
311
- static create(config: StorageConfig): StorageBackend {
312
- switch (config.type) {
313
- case 'github':
314
- return new GitHubStorageBackend(config)
315
- case 'gitlab':
316
- return new GitLabStorageBackend(config)
317
- case 'forgejo':
318
- return new ForgejoStorageBackend(config)
319
- case 'gitea':
320
- return new GiteaStorageBackend(config)
321
- case 'huggingface':
322
- return new HFStorageBackend(config)
323
- case 'kaggle':
324
- return new KaggleStorageBackend(config)
325
- case 'modelscope':
326
- return new ModelScopeStorageBackend(config)
327
- case 'filehosting':
328
- return new FileHostingStorageBackend(config)
329
- default:
330
- throw new Error(
331
- `Unknown storage type "${config.type}"`
332
- )
333
- }
334
- }
335
- }
336
- ```
337
-
338
- ## License
339
-
340
- MIT
@@ -1,394 +0,0 @@
1
- # Saddle Deploy Strategy
2
-
3
- > Deploy strategies for the saddle robot across Netlify, Vercel,
4
- > GitHub Actions, GitLab CI, Forgejo, and self-hosted infrastructure.
5
-
6
- ## Overview
7
-
8
- Saddle robot supports multiple deployment strategies to make the bot
9
- available across platforms. Each strategy uses HTTPS communication
10
- between deployed sites for coordination and data transfer.
11
-
12
- ## Strategy 1: Netlify
13
-
14
- Netlify provides serverless functions and static hosting for the
15
- saddle robot web interface.
16
-
17
- ### Configuration
18
-
19
- ```toml
20
- # netlify.toml
21
- [build]
22
- publish = "dist"
23
- command = "npm run build"
24
-
25
- [[redirects]]
26
- from = "/api/*"
27
- to = "/.netlify/functions/:splat"
28
- status = 200
29
-
30
- [[headers]]
31
- for = "/*"
32
- [headers.values]
33
- X-Frame-Options = "DENY"
34
- X-Content-Type-Options = "nosniff"
35
- ```
36
-
37
- ### Environment Variables
38
-
39
- | Variable | Description | Required |
40
- |----------|-------------|----------|
41
- | `SBOT_TOKEN` | GitHub/GitLab bot token | Yes |
42
- | `SBOT_PLATFORM` | Target platform (github, gitlab, forgejo, gitea) | Yes |
43
- | `SBOT_MEMORY_BUCKET` | Storage bucket for memory persistence | Yes |
44
- | `SBOT_WEBHOOK_SECRET` | Webhook signature secret | Yes |
45
- | `SBOT_CDN_URL` | SCDN endpoint for static assets | No |
46
-
47
- ### Deploy Command
48
-
49
- ```bash
50
- # Deploy to Netlify
51
- netlify deploy --prod
52
- # Deploy to Netlify staging
53
- netlify deploy --context deploy-preview
54
- ```
55
-
56
- ## Strategy 2: Vercel
57
-
58
- Vercel provides edge functions and instant deployment for the
59
- saddle robot backend.
60
-
61
- ### Configuration
62
-
63
- ```json
64
- // vercel.json
65
- {
66
- "version": 2,
67
- "builds": [
68
- {
69
- "src": "web/index.js",
70
- "use": "@vercel/node"
71
- },
72
- {
73
- "src": "web/api/*.js",
74
- "use": "@vercel/node"
75
- }
76
- ],
77
- "routes": [
78
- {
79
- "src": "/api/(.*)",
80
- "dest": "/web/api/$1"
81
- }
82
- ]
83
- }
84
- ```
85
-
86
- ### Environment Variables
87
-
88
- Same as Netlify strategy. Add Vercel-specific:
89
-
90
- | Variable | Description |
91
- |----------|-------------|
92
- | `VERCEL_REGION` | Edge region for deployment |
93
- | `SBOT_MEMORY_ENGINE` | Memory engine type (ram, storage, bucket) |
94
-
95
- ## Strategy 3: GitHub Actions Pipeline
96
-
97
- Use GitHub Actions to deploy and run the saddle robot as a
98
- scheduled or triggered workflow.
99
-
100
- ### Workflow File
101
-
102
- ```yaml
103
- # .github/workflows/saddle-robot.yml
104
- name: Saddle Robot Automation
105
-
106
- on:
107
- schedule:
108
- - cron: '*/15 * * * *'
109
- workflow_dispatch:
110
- push:
111
- paths:
112
- - 'saddle-robot/**'
113
- - '.saddle/config.yml'
114
-
115
- permissions:
116
- contents: read
117
- pull-requests: write
118
- issues: write
119
- actions: write
120
-
121
- env:
122
- SBOT_PLATFORM: github
123
- SBOT_MEMORY_BUCKET: ${{ secrets.MEMORY_BUCKET }}
124
- SBOT_WEBHOOK_SECRET: ${{ secrets.WEBHOOK_SECRET }}
125
-
126
- jobs:
127
- deploy:
128
- runs-on: ubuntu-latest
129
- steps:
130
- - uses: actions/checkout@v4
131
-
132
- - name: Setup Node.js
133
- uses: actions/setup-node@v4
134
- with:
135
- node-version: '20'
136
- cache: 'npm'
137
-
138
- - name: Install dependencies
139
- run: npm ci --production
140
-
141
- - name: Run saddle robot
142
- run: node saddle-robot/index.js
143
- env:
144
- SBOT_API_TOKEN: ${{ secrets.SBOT_TOKEN }}
145
- SBOT_MEMORY_ENGINE: storage
146
-
147
- - name: Upload memory artifacts
148
- uses: actions/upload-artifact@v4
149
- with:
150
- name: memory-logs
151
- path: |
152
- .saddle/logs/*.json
153
- retention-days: 30
154
-
155
- deploy-to-netlify:
156
- needs: [deploy]
157
- runs-on: ubuntu-latest
158
- if: github.ref == 'refs/heads/main'
159
- steps:
160
- - uses: jsmrcaga/action-netlify-deploy@v2.5.1
161
- with:
162
- netlify_auth_token: ${{ secrets.NETLIFY_TOKEN }}
163
- netlify_site_id: ${{ secrets.NETLIFY_SITE_ID }}
164
- deploy_message: 'Saddle robot auto-deploy'
165
- ```
166
-
167
- ### GitHub App Configuration
168
-
169
- Create a GitHub App for the saddle robot with these permissions:
170
-
171
- | Permission | Access |
172
- |------------|--------|
173
- | Contents | Read/Write |
174
- | Pull Requests | Read/Write |
175
- | Issues | Read/Write |
176
- | Actions | Read/Write |
177
- | Metadata | Read |
178
- | Webhooks | Manage |
179
-
180
- ## Strategy 4: GitLab CI/CD
181
-
182
- Use GitLab CI/CD pipelines for the saddle robot on GitLab
183
- instances (self-hosted or GitLab.com).
184
-
185
- ### GitLab CI Configuration
186
-
187
- ```yaml
188
- # .gitlab-ci.yml
189
- stages:
190
- - deploy
191
- - execute
192
- - store
193
-
194
- deploy-saddle:
195
- stage: deploy
196
- script:
197
- - npm ci --production
198
- - npm run build
199
- artifacts:
200
- paths:
201
- - dist/
202
- expire_in: 1 hour
203
-
204
- execute-saddle-robot:
205
- stage: execute
206
- script:
207
- - node saddle-robot/index.js
208
- - cat .saddle/logs/*.json
209
- artifacts:
210
- paths:
211
- - .saddle/logs/
212
- expire_in: 7 days
213
- variables:
214
- SBOT_PLATFORM: gitlab
215
- SBOT_MEMORY_ENGINE: storage
216
-
217
- store-memory-results:
218
- stage: store
219
- script:
220
- - |
221
- # Upload results to storage backend
222
- curl -X POST "${SBOT_MEMORY_BUCKET_URL}/upload" \
223
- -H "Authorization: Bearer ${MEMORY_BUCKET_TOKEN}" \
224
- -F "file=@.saddle/logs/results.json"
225
- when: always
226
- ```
227
-
228
- ## Strategy 5: Forgejo Actions
229
-
230
- Forgejo supports GitHub-compatible workflows. Use the same
231
- configuration as GitHub Actions with Forgejo-specific adjustments.
232
-
233
- ### Forgejo Workflow
234
-
235
- ```yaml
236
- # .forgejo/workflows/saddle.yaml
237
- name: Saddle Robot
238
-
239
- on:
240
- schedule:
241
- - cron: '*/15 * * * *'
242
- push:
243
- branches: [main]
244
-
245
- jobs:
246
- run-saddle:
247
- runs-on: ubuntu-latest
248
- steps:
249
- - uses: forgejo/actions/checkout@v1
250
- - uses: forgejo/actions/setup-node@v1
251
- with:
252
- node-version: '20'
253
- - run: npm ci --production
254
- - run: node saddle-robot/index.js
255
- ```
256
-
257
- ## Strategy 6: Gitea Actions
258
-
259
- Gitea supports webhook-based workflows. Configure Gitea Actions
260
- for the saddle robot.
261
-
262
- ### Gitea Configuration
263
-
264
- ```yaml
265
- # .gitea/workflows/saddle.yml
266
- name: saddle-robot
267
-
268
- on:
269
- schedule:
270
- - cron: '*/15 * * * *'
271
- push:
272
- branches: ['main']
273
-
274
- jobs:
275
- execute:
276
- runs-on: ubuntu-latest
277
- steps:
278
- - uses: gitea/actions/setup-node@v1
279
- with:
280
- node-version: '20'
281
- - run: npm ci --production
282
- - run: node saddle-robot/index.js
283
- ```
284
-
285
- ## Strategy 7: Docker/VM Self-Hosted
286
-
287
- Full containerized deployment for maximum control and resource access.
288
-
289
- ### Docker Compose
290
-
291
- ```yaml
292
- # docker-compose.yml
293
- version: '3.8'
294
-
295
- services:
296
- saddle-robot:
297
- build:
298
- context: .
299
- dockerfile: Dockerfile.saddle
300
- container_name: saddle-robot
301
- ports:
302
- - "3000:3000"
303
- environment:
304
- - SBOT_PLATFORM=auto
305
- - SBOT_MEMORY_ENGINE=storage
306
- - SBOT_MEMORY_BUCKET_URL=${MEMORY_BUCKET_URL}
307
- - SBOT_API_TOKEN=${SBOT_TOKEN}
308
- - SBOT_WEBHOOK_SECRET=${WEBHOOK_SECRET}
309
- volumes:
310
- - ./saddle-data:/app/data
311
- - ./saddle-logs:/app/logs
312
- restart: unless-stopped
313
- depends_on:
314
- - saddle-db
315
-
316
- saddle-db:
317
- image: mysql:8.0
318
- container_name: saddle-db
319
- environment:
320
- MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
321
- MYSQL_DATABASE: saddle
322
- MYSQL_USER: saddle_user
323
- MYSQL_PASSWORD: ${DB_USER_PASSWORD}
324
- volumes:
325
- - saddle-db-data:/var/lib/mysql
326
- ports:
327
- - "3306:3306"
328
-
329
- volumes:
330
- saddle-db-data:
331
- ```
332
-
333
- ### Dockerfile
334
-
335
- ```dockerfile
336
- FROM node:20-slim
337
-
338
- RUN apt-get update && apt-get install -y \
339
- chromium \
340
- && rm -rf /var/lib/apt/lists/*
341
-
342
- WORKDIR /app
343
-
344
- COPY package*.json ./
345
- RUN npm ci --production
346
-
347
- COPY . .
348
-
349
- EXPOSE 3000
350
-
351
- HEALTHCHECK --interval=30s --timeout=10s --retries=3 \
352
- CMD curl -f http://localhost:3000/health || exit 1
353
-
354
- CMD ["node", "saddle-robot/index.js"]
355
- ```
356
-
357
- ## HTTPS Communication Between Sites
358
-
359
- All cross-site communication uses HTTPS with proper certificate
360
- validation. The saddle robot uses HTTPS for:
361
-
362
- 1. Webhook endpoints between deployed sites
363
- 2. API calls to GitHub/GitLab/Forgejo/Gitea
364
- 3. Storage bucket communication (HF/Kaggle/ModelScope/Terabox)
365
- 4. SCDN asset delivery
366
- 5. Internal service mesh communication
367
-
368
- ### Certificate Management
369
-
370
- ```typescript
371
- interface SSLOptions {
372
- cert: string
373
- key: string
374
- ca?: string
375
- rejectUnauthorized: boolean
376
- minVersion: 'TLSv1.2' | 'TLSv1.3'
377
- }
378
- ```
379
-
380
- ## Decision Matrix
381
-
382
- | Strategy | Use Case | Pros | Cons |
383
- |----------|----------|------|------|
384
- | Netlify | Static web + edge functions | Fast, free tier | Limited runtime |
385
- | Vercel | Serverless edge runtime | Global edge | Vendor lock-in |
386
- | GitHub Actions | CI/CD integrated bot | Native GitHub | Time limits |
387
- | GitLab CI | Self-hosted or cloud CI | Full control | Self-hosted needs infra |
388
- | Forgejo | Self-hosted lightweight | Minimal footprint | Smaller ecosystem |
389
- | Gitea | Self-hosted minimal | Very lightweight | Limited integrations |
390
- | Docker/VM | Full control deployment | All resources | Requires infra management |
391
-
392
- ## License
393
-
394
- MIT