@wenathlan/saddle 1.8.17 → 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 (219) hide show
  1. package/README.md +38 -13
  2. package/dist/index.d.ts +1 -0
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +1 -0
  5. package/dist/index.js.map +1 -1
  6. package/dist/isolation/contracts.d.ts +118 -0
  7. package/dist/isolation/contracts.d.ts.map +1 -0
  8. package/dist/isolation/contracts.js +84 -0
  9. package/dist/isolation/contracts.js.map +1 -0
  10. package/dist/mcp/server.d.ts +2 -2
  11. package/dist/scrape/robots.js +1 -1
  12. package/docs/artifactavailability.md +6 -0
  13. package/docs/releasenotes-1.8.17.md +6 -0
  14. package/docs/releasenotes-1.8.18.md +32 -0
  15. package/docs/research-1.8.18-isolation.md +43 -0
  16. package/docs/saddle.archive.1.8.17.tar.gz.gpg +0 -0
  17. package/docs/todo-1.8.16.md +56 -1
  18. package/docs/todo-1.8.18.md +152 -0
  19. package/extension/manifest.json +1 -1
  20. package/package.json +3 -2
  21. package/docs/logs/.gitkeep +0 -0
  22. package/docs/plans/00.index.md +0 -50
  23. package/docs/plans/01.architecture.md +0 -86
  24. package/docs/plans/02.research.computer.use.md +0 -58
  25. package/docs/plans/03.research.captcha.bypass.md +0 -68
  26. package/docs/plans/04.research.sandbox.ai.md +0 -52
  27. package/docs/plans/05.capture.platform.md +0 -57
  28. package/docs/plans/06.dependencies.md +0 -97
  29. package/docs/plans/07.captcha.test.page.md +0 -41
  30. package/docs/plans/08.production.infra.md +0 -70
  31. package/docs/plans/09.database.schema.md +0 -121
  32. package/docs/plans/10.cloudinary.storage.md +0 -57
  33. package/docs/plans/11.movement.logs.json.md +0 -72
  34. package/docs/plans/12.research.atlas.agent.browser.md +0 -79
  35. package/docs/plans/13.research.anti.detection.md +0 -898
  36. package/docs/plans/14.research.proxy.md +0 -1495
  37. package/docs/plans/15.research.retry.rate.limit.md +0 -1958
  38. package/docs/plans/16.research.crawling.md +0 -1417
  39. package/docs/plans/17.research.caching.md +0 -1610
  40. package/docs/plans/18.research.content.extraction.md +0 -1952
  41. package/docs/plans/19.research.errors.events.md +0 -1523
  42. package/docs/plans/20.research.zod.validation.md +0 -1350
  43. package/docs/plans/21.research.batch.concurrency.md +0 -1888
  44. package/docs/plans/22.research.universal.runtime.md +0 -944
  45. package/docs/plans/23.research.ai.integration.md +0 -1465
  46. package/docs/plans/24.research.memory.persistence.md +0 -1979
  47. package/docs/plans/25.research.server.api.md +0 -342
  48. package/docs/plans/26.research.compilation.md +0 -249
  49. package/docs/plans/27.research.html.parsing.md +0 -251
  50. package/docs/plans/28.action.plan.md +0 -50
  51. package/docs/plans/29.api.reference.md +0 -174
  52. package/docs/plans/30.architecture.plan.md +0 -94
  53. package/docs/plans/31.auditoria.dados.md +0 -163
  54. package/docs/plans/32.bots.automacao.computacional.md +0 -214
  55. package/docs/plans/33.bots.codigo.revisao.md +0 -220
  56. package/docs/plans/34.bots.seguranca.cicd.md +0 -366
  57. package/docs/plans/35.comparativo.concorrencia.md +0 -464
  58. package/docs/plans/36.computational.memory.md +0 -340
  59. package/docs/plans/37.deploystrategy.md +0 -394
  60. package/docs/plans/38.flow.md +0 -155
  61. package/docs/plans/39.multi.platform.bot.md +0 -252
  62. package/docs/plans/40.npm.publish.md +0 -250
  63. package/docs/plans/41.o.que.falta.md +0 -407
  64. package/docs/plans/42.pesquisa.concorrencia.md +0 -721
  65. package/docs/plans/43.plan.universal.architecture.md +0 -496
  66. package/docs/plans/44.reference.md +0 -100
  67. package/docs/plans/45.robotarchitecture.md +0 -237
  68. package/docs/plans/46.scdnintegration.md +0 -284
  69. package/docs/plans/47.multiforge.readme.md +0 -129
  70. package/docs/plans/48.theory.v4.repo.os.md +0 -152
  71. package/docs/plans/49.third.party.infra.md +0 -12
  72. package/docs/plans/50.file.as.compute.md +0 -39
  73. package/docs/plans/51.architecture.virtual.processor.md +0 -80
  74. package/docs/plans/52.manifesto.v8.md +0 -11
  75. package/docs/plans/58.cdn.list.md +0 -23
  76. package/docs/plans/59.sql.frameworks.md +0 -33
  77. package/docs/plans/60.sql.thirdparty.md +0 -26
  78. package/docs/plans/61.objective.multiforge.md +0 -63
  79. package/docs/plans/62.huggingface.upload.md +0 -26
  80. package/docs/plans/63.kaggle.upload.md +0 -24
  81. package/docs/plans/64.npm.storage.md +0 -30
  82. package/docs/plans/65.rclone.terabox.md +0 -32
  83. package/docs/plans/66.buckets.and.models.todo.md +0 -14
  84. package/docs/plans/67.database.todo.md +0 -13
  85. package/docs/plans/68.deploy.packages.todo.md +0 -12
  86. package/docs/plans/69.report.human.operator.md +0 -133
  87. package/docs/plans/70.report.brain2qwerty.ems.md +0 -135
  88. package/docs/plans/71.report.hd.infinito.vram.md +0 -155
  89. package/docs/plans/72.plan.hd.infinito.node.md +0 -146
  90. package/docs/plans/73.plan.scifi.repos.md +0 -125
  91. package/docs/plans/74.000.manifesto.v8.flat.2..md +0 -11
  92. package/docs/plans/README.md +0 -489
  93. package/docs/plans/aggregate_platforms.mjs +0 -146
  94. package/docs/plans/examplesession.json +0 -36
  95. package/docs/plans/missing-facts.md +0 -192
  96. package/docs/plans/models.md +0 -64
  97. package/docs/plans/organize.cjs +0 -270
  98. package/docs/plans/platforms.md +0 -2887
  99. package/docs/plans/sites.md +0 -31322
  100. package/docs/sources/farm.py +0 -117
  101. package/docs/sources/html/saddle1.html +0 -132
  102. package/docs/sources/html/saddle2.html +0 -157
  103. package/docs/sources/html/saddle3.html +0 -119
  104. package/docs/sources/html/saddle4.html +0 -144
  105. package/docs/sources/html/saddle5.html +0 -72
  106. package/docs/sources/html/saddle6.html +0 -171
  107. package/docs/sources/html/saddle7.html +0 -236
  108. package/docs/sources/saddle.ts +0 -74
  109. package/docs/sources/schema.prisma +0 -88
  110. package/docs/sources/script.sh +0 -64
  111. package/docs/sources/workflows.yml +0 -458
  112. package/docs/talks1/_body.txt +0 -14
  113. package/docs/talks1/_index.md +0 -15
  114. package/docs/talks1/_screenshot.png +0 -0
  115. package/docs/talks1/assistant-01.md +0 -5
  116. package/docs/talks1/assistant-02.md +0 -5
  117. package/docs/talks1/assistant-03.md +0 -531
  118. package/docs/talks1/assistant-04.md +0 -26
  119. package/docs/talks1/assistant-05.md +0 -774
  120. package/docs/talks1/assistant-06.md +0 -1718
  121. package/docs/talks1/scrape-share.cjs +0 -185
  122. package/docs/talks1/scrape-share.ts +0 -183
  123. package/docs/talks1/user-01.md +0 -3
  124. package/docs/talks1/user-02.md +0 -3
  125. package/docs/talks1/user-03.md +0 -88
  126. package/docs/talks1/user-04.md +0 -3
  127. package/docs/talks1/user-05.md +0 -3
  128. package/docs/talks1/user-06.md +0 -88
  129. package/docs/talks1/user-07.md +0 -88
  130. package/docs/talks2/_body.txt +0 -14
  131. package/docs/talks2/_index.md +0 -16
  132. package/docs/talks2/_screenshot.png +0 -0
  133. package/docs/talks2/assistant-01.md +0 -5
  134. package/docs/talks2/assistant-02.md +0 -5
  135. package/docs/talks2/assistant-03.md +0 -424
  136. package/docs/talks2/assistant-04.md +0 -598
  137. package/docs/talks2/assistant-05.md +0 -1280
  138. package/docs/talks2/assistant-06.md +0 -1227
  139. package/docs/talks2/assistant-07.md +0 -1252
  140. package/docs/talks2/user-01.md +0 -3
  141. package/docs/talks2/user-02.md +0 -3
  142. package/docs/talks2/user-03.md +0 -88
  143. package/docs/talks2/user-04.md +0 -88
  144. package/docs/talks2/user-05.md +0 -88
  145. package/docs/talks2/user-06.md +0 -88
  146. package/docs/talks2/user-07.md +0 -3
  147. package/docs/talks3/_body.txt +0 -467
  148. package/docs/talks3/_index.md +0 -10
  149. package/docs/talks3/_screenshot.png +0 -0
  150. package/docs/talks3/assistant-01.md +0 -417
  151. package/docs/talks3/assistant-02.md +0 -417
  152. package/docs/talks3/assistant-03.md +0 -29
  153. package/docs/talks3/assistant-04.md +0 -727
  154. package/docs/talks3/user-01.md +0 -88
  155. package/docs/talks3/user-02.md +0 -88
  156. package/docs/talks3/user-03.md +0 -3
  157. package/docs/talks3/user-04.md +0 -3
  158. package/docs/talks4/_body.txt +0 -14
  159. package/docs/talks4/_index.md +0 -12
  160. package/docs/talks4/_screenshot.png +0 -0
  161. package/docs/talks4/assistant-01.md +0 -5
  162. package/docs/talks4/assistant-02.md +0 -5
  163. package/docs/talks4/assistant-03.md +0 -35
  164. package/docs/talks4/assistant-04.md +0 -512
  165. package/docs/talks4/assistant-05.md +0 -599
  166. package/docs/talks4/user-01.md +0 -3
  167. package/docs/talks4/user-02.md +0 -3
  168. package/docs/talks4/user-03.md +0 -88
  169. package/docs/talks4/user-04.md +0 -88
  170. package/docs/talks4/user-05.md +0 -7
  171. package/docs/talks5/_body.txt +0 -14
  172. package/docs/talks5/_index.md +0 -13
  173. package/docs/talks5/_screenshot.png +0 -0
  174. package/docs/talks5/assistant-01.md +0 -5
  175. package/docs/talks5/assistant-02.md +0 -5
  176. package/docs/talks5/assistant-03.md +0 -690
  177. package/docs/talks5/assistant-04.md +0 -758
  178. package/docs/talks5/assistant-05.md +0 -974
  179. package/docs/talks5/user-01.md +0 -3
  180. package/docs/talks5/user-02.md +0 -3
  181. package/docs/talks5/user-03.md +0 -105
  182. package/docs/talks5/user-04.md +0 -105
  183. package/docs/talks5/user-05.md +0 -63
  184. package/docs/talks5/user-06.md +0 -105
  185. package/docs/talks6/_body.txt +0 -14
  186. package/docs/talks6/_index.md +0 -9
  187. package/docs/talks6/_screenshot.png +0 -0
  188. package/docs/talks6/assistant-01.md +0 -5
  189. package/docs/talks6/assistant-02.md +0 -5
  190. package/docs/talks6/assistant-03.md +0 -1499
  191. package/docs/talks6/user-01.md +0 -3
  192. package/docs/talks6/user-02.md +0 -3
  193. package/docs/talks6/user-03.md +0 -88
  194. package/docs/talks6/user-04.md +0 -88
  195. package/docs/talks7/_body.txt +0 -14
  196. package/docs/talks7/_index.md +0 -10
  197. package/docs/talks7/_screenshot.png +0 -0
  198. package/docs/talks7/assistant-01.md +0 -5
  199. package/docs/talks7/assistant-02.md +0 -5
  200. package/docs/talks7/assistant-03.md +0 -523
  201. package/docs/talks7/assistant-04.md +0 -617
  202. package/docs/talks7/user-01.md +0 -3
  203. package/docs/talks7/user-02.md +0 -3
  204. package/docs/talks7/user-03.md +0 -105
  205. package/docs/talks7/user-04.md +0 -67
  206. package/docs/talks8/conversa1.txt +0 -1322
  207. package/docs/talks8/conversa2.txt +0 -237
  208. 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
  209. 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
  210. 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
  211. 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
  212. 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
  213. package/docs/talks9/README (2).md +0 -489
  214. package/docs/talks9/README.md +0 -198
  215. 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
  216. package/docs/talks9/conversa.txt +0 -544
  217. package/docs/talks9/other (2).md +0 -39
  218. package/docs/talks9/other.md +0 -57
  219. package/docs/talks9/outro.txt +0 -24
@@ -1,155 +0,0 @@
1
- # Scraping Pipeline Flow
2
-
3
- ## High-Level Pipeline
4
-
5
- ```
6
- User Input (URL or HTML)
7
-
8
-
9
- ┌──────────────────────┐
10
- │ scrapeUrl() │
11
- │ ┌────────────────┐ │
12
- │ │ AgentBrowser │ │
13
- │ │ ┌──────────┐ │ │
14
- │ │ │ Launch │ │ │
15
- │ │ │ Browser │ │ │
16
- │ │ └────┬─────┘ │ │
17
- │ │ ▼ │ │
18
- │ │ ┌──────────┐ │ │
19
- │ │ │ Navigate │ │ │
20
- │ │ │ to URL │ │ │
21
- │ │ └────┬─────┘ │ │
22
- │ │ ▼ │ │
23
- │ │ ┌──────────┐ │ │
24
- │ │ │ Scroll / │ │ │
25
- │ │ │ Interact │ │ │
26
- │ │ └────┬─────┘ │ │
27
- │ │ ▼ │ │
28
- │ │ ┌──────────┐ │ │
29
- │ │ │ Extract │ │ │
30
- │ │ │ HTML │ │ │
31
- │ │ └──────────┘ │ │
32
- │ └────────────────┘ │
33
- │ │ │
34
- │ ▼ │
35
- │ ┌────────────────┐ │
36
- │ │ extractContent │ │
37
- │ │ (Cheerio parse) │ │
38
- │ └────────────────┘ │
39
- └──────────┬───────────┘
40
- │ ScrapeResult
41
-
42
- ┌──────────────────────┐
43
- │ serializeResult() │
44
- │ Format: markdown / │
45
- │ json / xml / redis │
46
- │ / text │
47
- └──────────┬───────────┘
48
- │ SerializedOutput
49
-
50
- ┌──────────────────────┐
51
- │ formatForAgent() │
52
- │ (LLM-friendly) │
53
- │ or render with │
54
- │ PygameRenderer │
55
- └──────────────────────┘
56
- ```
57
-
58
- ## Execution Paths
59
-
60
- ### URL Scraping
61
-
62
- ```
63
- scrapeUrl(url, options)
64
- ├── AgentBrowser.launch('chromium')
65
- ├── AgentBrowser.navigate(url)
66
- ├── [optional] AgentBrowser.scrollToBottom()
67
- ├── AgentBrowser.html() → raw HTML
68
- ├── AgentBrowser.screenshot() → Buffer
69
- ├── extractContent(html) → ExtractedContent
70
- ├── AgentBrowser.close()
71
- └── returns ScrapeResult { url, title, html, text, links, images, tables, metadata, screenshot }
72
- ```
73
-
74
- ### HTML Scraping (offline)
75
-
76
- ```
77
- scrapeHtml(html, options)
78
- ├── extractContent(html) → ExtractedContent
79
- └── returns ScrapeResult { url: 'inline', html, ...extracted }
80
- ```
81
-
82
- ### Browser Reuse
83
-
84
- ```
85
- scrapeWithBrowser(browser, url, options)
86
- ├── browser.navigate(url)
87
- ├── browser.html()
88
- ├── extractContent(html)
89
- └── returns ScrapeResult
90
- ```
91
-
92
- ## Data Flow
93
-
94
- ```
95
- Raw HTML
96
-
97
-
98
- Cheerio.parse(html)
99
-
100
- ├── Title: $('title').text() / $('h1').first().text()
101
- ├── Author: $('[rel=author]') / meta tags
102
- ├── Text: $('p, li, blockquote').text() (joined)
103
- ├── Links: $('a[href]') → { href, text }
104
- ├── Images: $('img[src]') → { src, alt }
105
- ├── Tables: $('table') → { headers, rows }
106
- └── Metadata: meta tags → { description, keywords, og:* }
107
-
108
-
109
- ExtractedContent
110
-
111
-
112
- serializeResult(result, { format })
113
-
114
- ├── markdown: TurndownService.turndown(html)
115
- ├── json: JSON.stringify(content)
116
- ├── xml: xml2js.Builder.buildObject(content)
117
- ├── redis: JSON.SET key path value
118
- └── text: strip tags + join
119
- ```
120
-
121
- ## Serialization Flow
122
-
123
- ```
124
- serializeResult(result, options)
125
-
126
- ├── resolveFormat(options.format) → format name
127
- ├── resolveExtension(formatName) → file extension
128
-
129
- ├── format === 'markdown'
130
- │ └── TurndownService.turndown(html)
131
-
132
- ├── format === 'json'
133
- │ └── JSON.stringify(content, null, pretty ? 2 : 0)
134
-
135
- ├── format === 'xml'
136
- │ └── xml2js.Builder.buildObject({ root: content })
137
-
138
- ├── format === 'redis'
139
- │ └── "JSON.SET key $ '...escaped json...'\n"
140
-
141
- └── format === 'text'
142
- └── strip all HTML tags, join text nodes
143
- ```
144
-
145
- ## Agent Output Flow
146
-
147
- ```
148
- formatForAgent(result)
149
-
150
- ├── Build summary (first 200 chars of text)
151
- ├── Extract key points (sentences with key phrases)
152
- ├── Collect relevant URLs
153
- ├── Chunk content for token limits
154
- └── Returns { summary, keyPoints, content, relevantUrls, chunks, tokenCount }
155
- ```
@@ -1,252 +0,0 @@
1
- # Saddle Multi-Platform Bot
2
-
3
- > Bot that operates across GitHub, GitLab, Forgejo, Gitea, and Discord.
4
- > Unified interface for all platform integrations.
5
-
6
- ## Overview
7
-
8
- The saddle robot operates as a bot across multiple code
9
- hosting platforms and messaging services through a unified
10
- adapter interface. Each platform has a dedicated adapter
11
- implementing the same interface contract.
12
-
13
- ## Platform Adapters
14
-
15
- ### GitHub Adapter
16
-
17
- ```typescript
18
- interface GitHubAdapter {
19
- type: 'github'
20
- authenticate(token: string): Promise<boolean>
21
- listRepos(query?: string): Promise<Repo[]>
22
- getRepo(owner: string, repo: string): Promise<Repo>
23
- createIssue(repo: string, title: string, body: string): Promise<Issue>
24
- createPR(repo: string, title: string, body: string, branch: string): Promise<PR>
25
- addComment(repo: string, issueNumber: number, body: string): Promise<Comment>
26
- createWebhook(repo: string, url: string, events: string[]): Promise<Webhook>
27
- executeWorkflow(repo: string, workflow: string): Promise<WorkflowRun>
28
- uploadReleaseAsset(repo: string, tag: string, name: string, path: string): Promise<Asset>
29
- }
30
- ```
31
-
32
- Authentication uses a personal access token or GitHub App token.
33
-
34
- Token scopes required:
35
- - `repo` (full control)
36
- - `workflow` (manage workflows)
37
- - `read:org` (read organization data)
38
-
39
- ### GitLab Adapter
40
-
41
- ```typescript
42
- interface GitLabAdapter {
43
- type: 'gitlab'
44
- authenticate(token: string): Promise<boolean>
45
- listProjects(query?: string): Promise<Project[]>
46
- getProject(id: number | string): Promise<Project>
47
- createIssue(projectId: number, title: string, description: string): Promise<Issue>
48
- createMergeRequest(projectId: number, title: string, description: string, sourceBranch: string, targetBranch: string): Promise<MR>
49
- addComment(projectId: number, noteableType: string, noteableId: number, body: string): Promise<Note>
50
- createWebhook(projectId: number, url: string, events: string[]): Promise<Webhook>
51
- triggerPipeline(projectId: number, ref: string, variables: Record<string, string>): Promise<Pipeline>
52
- uploadFile(projectId: number, filePath: string, content: Buffer): Promise<Attachment>
53
- }
54
- ```
55
-
56
- Authentication uses a personal access token with `api` scope.
57
-
58
- ### Forgejo Adapter
59
-
60
- Forgejo is fully compatible with the GitHub API, making the
61
- GitHub adapter usable with minimal configuration changes.
62
-
63
- ```typescript
64
- interface ForgejoAdapter {
65
- extends: GitHubAdapter
66
- customBaseUrl: string
67
- }
68
- ```
69
-
70
- Configuration:
71
- - Use GitHub adapter with custom `baseUrl` pointing to Forgejo instance
72
- - Token type: access token with `write:repository`, `write:issue`, `write:webhook` scopes
73
-
74
- ### Gitea Adapter
75
-
76
- Gitea also provides GitHub-compatible API endpoints.
77
-
78
- ```typescript
79
- interface GiteaAdapter {
80
- extends: GitHubAdapter
81
- customBaseUrl: string
82
- }
83
- ```
84
-
85
- Configuration:
86
- - Use GitHub adapter with custom `baseUrl` pointing to Gitea instance
87
- - Token type: API token with full repository scope
88
-
89
- ### Discord Adapter
90
-
91
- ```typescript
92
- interface DiscordAdapter {
93
- type: 'discord'
94
- authenticate(token: string): Promise<boolean>
95
- sendMessage(channelId: string, content: string): Promise<Message>
96
- createWebhook(channelId: string, name: string): Promise<Webhook>
97
- executeWebhook(webhookId: string, webhookToken: string, payload: WebhookPayload): Promise<Message>
98
- addReaction(channelId: string, messageId: string, emoji: string): Promise<void>
99
- createThread(channelId: string, name: string, messageId: string): Promise<Thread>
100
- }
101
- ```
102
-
103
- ## Unified Bot Interface
104
-
105
- ```typescript
106
- interface SaddleBot {
107
- platform: PlatformAdapter
108
- config: BotConfig
109
-
110
- start(): Promise<void>
111
- stop(): Promise<void>
112
- executeCommand(command: BotCommand): Promise<BotResult>
113
- handleWebhook(event: WebhookEvent): Promise<void>
114
- scheduleTask(task: ScheduledTask): Promise<ScheduledTaskHandle>
115
- getStatus(): Promise<BotStatus>
116
- }
117
- ```
118
-
119
- ### Bot Config
120
-
121
- ```typescript
122
- interface BotConfig {
123
- platforms: PlatformConfig[]
124
- memoryEngine: MemoryEngineConfig
125
- deploy: DeployConfig
126
- logging: LogConfig
127
- }
128
-
129
- interface PlatformConfig {
130
- type: 'github' | 'gitlab' | 'forgejo' | 'gitea' | 'discord'
131
- name: string
132
- token: string
133
- baseUrl?: string
134
- webhookSecret?: string
135
- repositories: string[]
136
- channels: string[]
137
- }
138
- ```
139
-
140
- ## Bot Commands
141
-
142
- | Command | Description | Platforms |
143
- |---------|-------------|-----------|
144
- | `capture` | Start browser capture session | All |
145
- | `scrape` | Scrape URLs and extract content | All |
146
- | `review` | Review PRs/issues automatically | GitHub, GitLab, Forgejo, Gitea |
147
- | `deploy` | Deploy to target platform | GitHub, GitLab, Forgejo |
148
- | `memory` | Store/retrieve memory objects | All |
149
- | `status` | Report bot status | All |
150
- | `test` | Run test suite | GitHub, GitLab, Forgejo |
151
- | `release` | Create release with assets | GitHub, GitLab, Forgejo |
152
- | `webhook` | Manage webhooks | GitHub, GitLab, Forgejo, Gitea |
153
- | `schedule` | Schedule recurring tasks | All |
154
- | `npm publish` | Publish NPM package | GitHub |
155
- | `artifact` | Upload artifacts to storage | All |
156
-
157
- ## Multi-Platform Workflow
158
-
159
- A typical workflow uses the saddle robot across platforms:
160
-
161
- ```
162
- 1. Discord webhook receives user command
163
- 2. Saddle robot parses command
164
- 3. Bot selects target platform adapter
165
- 4. Executes command on target platform
166
- 5. Stores result in memory backend
167
- 6. Reports status back to Discord
168
- 7. Optionally triggers CI/CD pipeline
169
- ```
170
-
171
- ## Webhook Integration
172
-
173
- ### GitHub Webhooks
174
-
175
- ```json
176
- {
177
- "webhooks": [
178
- {
179
- "url": "https://saddle.example.com/webhook/github",
180
- "content_type": "json",
181
- "secret": "${WEBHOOK_SECRET}",
182
- "events": [
183
- "push",
184
- "pull_request",
185
- "issues",
186
- "issue_comment",
187
- "release",
188
- "deployment"
189
- ]
190
- }
191
- ]
192
- }
193
- ```
194
-
195
- ### GitLab Webhooks
196
-
197
- ```json
198
- {
199
- "webhooks": [
200
- {
201
- "url": "https://saddle.example.com/webhook/gitlab",
202
- "secret_token": "${WEBHOOK_SECRET}",
203
- "trigger_events": true,
204
- "push_events": true,
205
- "merge_request_events": true,
206
- "issue_events": true,
207
- "tag_push_events": true
208
- }
209
- ]
210
- }
211
- ```
212
-
213
- ## Deployment per Platform
214
-
215
- | Platform | Deploy Method | Best For |
216
- |----------|--------------|----------|
217
- | GitHub | GitHub Actions + NPM package | Team collaboration |
218
- | GitLab | GitLab CI + Docker | Self-hosted or cloud |
219
- | Forgejo | Forgejo Actions + Docker | Lightweight self-hosted |
220
- | Gitea | Gitea Actions + Docker | Minimal self-hosted |
221
- | Discord | Discord bot token + HTTPS | Messaging integration |
222
-
223
- ## Error Handling
224
-
225
- Each adapter implements error handling with contextual error
226
- messages for later tracing. Adapter failures are caught and
227
- reported without crashing the bot.
228
-
229
- ```typescript
230
- class SafeAdapter {
231
- private adapter: PlatformAdapter
232
-
233
- async execute(
234
- method: string,
235
- ...args: unknown[]
236
- ): Promise<{ success: boolean; result?: unknown; error?: string }> {
237
- try {
238
- const result = await (this.adapter as Record<string, unknown>)[method](...args)
239
- return { success: true, result }
240
- } catch (error) {
241
- return {
242
- success: false,
243
- error: error instanceof Error ? error.message : String(error),
244
- }
245
- }
246
- }
247
- }
248
- ```
249
-
250
- ## License
251
-
252
- MIT
@@ -1,250 +0,0 @@
1
- # NPM Package Publishing for Saddle Robot
2
-
3
- > Package `@wenathlan/saddle` published to NPM registry.
4
- > Acts as both library and CLI binary.
5
-
6
- ## Overview
7
-
8
- Saddle robot is published as an NPM package for easy
9
- distribution as a library and a CLI tool. The package
10
- includes browser automation, bot functionality, captcha
11
- bypass, and memory engine capabilities.
12
-
13
- ## Package Configuration
14
-
15
- ### package.json
16
-
17
- ```json
18
- {
19
- "name": "@wenathlan/saddle",
20
- "version": "1.0.0",
21
- "description": "Super bot: agent browser, captcha bypass, multi-platform GitHub/GitLab/Forgejo/Gitea automation with computational memory",
22
- "main": "lib/index.js",
23
- "bin": {
24
- "saddle": "bin/saddle.js"
25
- },
26
- "type": "module",
27
- "exports": {
28
- ".": {
29
- "import": "./lib/index.js",
30
- "require": "./lib/index.cjs"
31
- },
32
- "./browser": {
33
- "import": "./lib/browser.js"
34
- },
35
- "./bot": {
36
- "import": "./lib/bot.js"
37
- },
38
- "./ captcha": {
39
- "import": "./lib/captcha.js"
40
- },
41
- "./memory-engine": {
42
- "import": "./lib/memory-engine.js"
43
- },
44
- "./deploy": {
45
- "import": "./lib/deploy.js"
46
- }
47
- },
48
- "scripts": {
49
- "build": "tsc",
50
- "test": "vitest run",
51
- "lint": "biome check .",
52
- "typecheck": "tsc --noEmit",
53
- "prepublishOnly": "npm run build && npm test",
54
- "prepare": "husky"
55
- },
56
- "repository": {
57
- "type": "git",
58
- "url": "https://github.com/username/saddle.git"
59
- },
60
- "keywords": [
61
- "agent",
62
- "browser",
63
- "automation",
64
- "bot",
65
- "captcha-bypass",
66
- "github-bot",
67
- "gitlab-bot",
68
- "scraper",
69
- "computer-use",
70
- "ai-agent"
71
- ],
72
- "author": "iakadion",
73
- "license": "MIT",
74
- "bugs": {
75
- "url": "https://github.com/username/saddle/issues"
76
- },
77
- "homepage": "https://github.com/username/saddle#readme"
78
- }
79
- ```
80
-
81
- ## Publishing Steps
82
-
83
- ### 1. Build and Test
84
-
85
- ```bash
86
- npm run build
87
- npm test
88
- npm run lint
89
- npm run typecheck
90
- ```
91
-
92
- All checks must pass before publishing.
93
-
94
- ### 2. Login to NPM
95
-
96
- ```bash
97
- npm login
98
- # Enter NPM credentials (token recommended)
99
- ```
100
-
101
- ### 3. Publish
102
-
103
- ```bash
104
- # Publish as public package
105
- npm publish --access public
106
-
107
- # Publish as scoped package
108
- npm publish --access public
109
- ```
110
-
111
- ### 4. Version Bumping
112
-
113
- ```bash
114
- # Patch version (1.0.0 → 1.0.1)
115
- npm version patch
116
-
117
- # Minor version (1.0.0 → 1.1.0)
118
- npm version minor
119
-
120
- # Major version (1.0.0 → 2.0.0)
121
- npm version major
122
-
123
- # Push tags after version bump
124
- git push --follow-tags
125
- ```
126
-
127
- ## Installation
128
-
129
- ### As Library
130
-
131
- ```bash
132
- npm install @wenathlan/saddle
133
- ```
134
-
135
- ```javascript
136
- import { SaddleRobot } from '@wenathlan/saddle'
137
-
138
- const robot = new SaddleRobot({
139
- platform: 'github',
140
- token: process.env.SBOT_TOKEN,
141
- })
142
-
143
- await robot.start()
144
- ```
145
-
146
- ### As CLI
147
-
148
- ```bash
149
- npm install -g @wenathlan/saddle
150
-
151
- saddle --help
152
- saddle capture --url https://example.com
153
- saddle bot --platform github --token $SBOT_TOKEN
154
- saddle memory --load repo://owner/repo/path/file.json
155
- ```
156
-
157
- ## Binary Entry Point
158
-
159
- ```javascript
160
- #!/usr/bin/env node
161
-
162
- import { SaddleRobot } from '../lib/index.js'
163
- import { parseArgs } from 'node:util'
164
-
165
- const options = parseArgs({
166
- options: {
167
- command: { type: 'string' },
168
- platform: { type: 'string' },
169
- token: { type: 'string' },
170
- verbose: { type: 'boolean' },
171
- },
172
- })
173
-
174
- const { values } = options
175
- const robot = new SaddleRobot({
176
- platform: values.platform ?? 'auto',
177
- token: values.token ?? '',
178
- verbose: values.verbose ?? false,
179
- })
180
-
181
- async function main() {
182
- try {
183
- const command = values.command ?? 'help'
184
- await robot.start()
185
- const result = await robot.executeCommand(command)
186
- if (values.verbose) {
187
- console.log(JSON.stringify(result, null, 2))
188
- }
189
- } catch (error) {
190
- console.error(
191
- `saddle: ${error instanceof Error ? error.message : String(error)}`
192
- )
193
- process.exit(1)
194
- }
195
- }
196
-
197
- main()
198
- ```
199
-
200
- ## Scoped Package Structure
201
-
202
- ```
203
- @wenathlan/saddle/
204
- ├── lib/
205
- │ ├── index.js main entry point
206
- │ ├── index.cjs CommonJS entry point
207
- │ ├── browser.js browser automation engine
208
- │ ├── bot.js multi-platform bot engine
209
- │ ├── captcha.js captcha bypass module
210
- │ ├── memory-engine.js storage-to-compute memory
211
- │ ├── deploy.js deploy strategy implementations
212
- │ └── adapters/
213
- │ ├── github.js GitHub platform adapter
214
- │ ├── gitlab.js GitLab platform adapter
215
- │ ├── forgejo.js Forgejo platform adapter
216
- │ ├── gitea.js Gitea platform adapter
217
- │ └── discord.js Discord messaging adapter
218
- ├── bin/
219
- │ └── saddle.js CLI entry point
220
- ├── types/
221
- │ └── index.d.ts TypeScript declarations
222
- ├── docs/
223
- │ └── index.md package documentation
224
- ├── package.json
225
- └── README.md
226
- ```
227
-
228
- ## Versioning Strategy
229
-
230
- Follow semantic versioning (semver):
231
-
232
- | Change Type | Version Bump |
233
- |-------------|-------------|
234
- | Bug fix | Patch (1.x.X) |
235
- | New backward-compatible feature | Minor (1.X.0) |
236
- | Breaking change | Major (X.0.0) |
237
-
238
- ## Pre-publish Checklist
239
-
240
- 1. All tests pass (`npm test`)
241
- 2. Linting passes (`npm run lint`)
242
- 3. TypeScript checks pass (`npm run typecheck`)
243
- 4. Build succeeds (`npm run build`)
244
- 5. README is updated
245
- 6. Changelog is updated
246
- 7. No breaking changes without major version bump
247
-
248
- ## License
249
-
250
- MIT