@b3os/cli 0.2.0 → 0.2.2

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 (217) hide show
  1. package/README.md +87 -7
  2. package/assets/b3os-run.py +137 -0
  3. package/assets/skill/b3os/SKILL.md +111 -0
  4. package/dist/commands/_agents.d.ts +14 -0
  5. package/dist/commands/_agents.js +33 -0
  6. package/dist/commands/_agents.js.map +1 -0
  7. package/dist/commands/_common.js +6 -2
  8. package/dist/commands/_common.js.map +1 -1
  9. package/dist/commands/_context.d.ts +49 -0
  10. package/dist/commands/_context.js +260 -0
  11. package/dist/commands/_context.js.map +1 -0
  12. package/dist/commands/_next.d.ts +39 -0
  13. package/dist/commands/_next.js +77 -0
  14. package/dist/commands/_next.js.map +1 -0
  15. package/dist/commands/agent.d.ts +42 -0
  16. package/dist/commands/agent.js +218 -0
  17. package/dist/commands/agent.js.map +1 -0
  18. package/dist/commands/app.d.ts +2 -0
  19. package/dist/commands/app.js +559 -54
  20. package/dist/commands/app.js.map +1 -1
  21. package/dist/commands/auth.d.ts +88 -2
  22. package/dist/commands/auth.js +354 -44
  23. package/dist/commands/auth.js.map +1 -1
  24. package/dist/commands/docs.d.ts +54 -0
  25. package/dist/commands/docs.js +202 -0
  26. package/dist/commands/docs.js.map +1 -0
  27. package/dist/commands/doctor.d.ts +23 -0
  28. package/dist/commands/doctor.js +313 -0
  29. package/dist/commands/doctor.js.map +1 -0
  30. package/dist/commands/init.d.ts +38 -1
  31. package/dist/commands/init.js +259 -60
  32. package/dist/commands/init.js.map +1 -1
  33. package/dist/commands/listen.d.ts +30 -0
  34. package/dist/commands/listen.js +194 -0
  35. package/dist/commands/listen.js.map +1 -0
  36. package/dist/commands/manifest.d.ts +13 -1
  37. package/dist/commands/manifest.js +81 -18
  38. package/dist/commands/manifest.js.map +1 -1
  39. package/dist/commands/mcp.d.ts +25 -2
  40. package/dist/commands/mcp.js +120 -11
  41. package/dist/commands/mcp.js.map +1 -1
  42. package/dist/commands/sandbox.d.ts +35 -6
  43. package/dist/commands/sandbox.js +208 -9
  44. package/dist/commands/sandbox.js.map +1 -1
  45. package/dist/commands/setup.d.ts +39 -0
  46. package/dist/commands/setup.js +203 -0
  47. package/dist/commands/setup.js.map +1 -0
  48. package/dist/commands/tool.d.ts +154 -0
  49. package/dist/commands/tool.js +785 -0
  50. package/dist/commands/tool.js.map +1 -0
  51. package/dist/config.d.ts +30 -6
  52. package/dist/config.js +39 -8
  53. package/dist/config.js.map +1 -1
  54. package/dist/ctx.d.ts +5 -45
  55. package/dist/ctx.js +25 -160
  56. package/dist/ctx.js.map +1 -1
  57. package/dist/docs/index.json +1 -0
  58. package/dist/docs/pages/actions/call.md +300 -0
  59. package/dist/docs/pages/actions/catalog/airtable.md +737 -0
  60. package/dist/docs/pages/actions/catalog/arxiv.md +166 -0
  61. package/dist/docs/pages/actions/catalog/chainalysis-sanctions.md +125 -0
  62. package/dist/docs/pages/actions/catalog/coingecko.md +1558 -0
  63. package/dist/docs/pages/actions/catalog/deps-dev.md +465 -0
  64. package/dist/docs/pages/actions/catalog/dexscreener.md +568 -0
  65. package/dist/docs/pages/actions/catalog/discord.md +784 -0
  66. package/dist/docs/pages/actions/catalog/finnhub.md +776 -0
  67. package/dist/docs/pages/actions/catalog/frankfurter.md +438 -0
  68. package/dist/docs/pages/actions/catalog/github.md +1853 -0
  69. package/dist/docs/pages/actions/catalog/gmail.md +575 -0
  70. package/dist/docs/pages/actions/catalog/google-calendar.md +654 -0
  71. package/dist/docs/pages/actions/catalog/google-drive.md +502 -0
  72. package/dist/docs/pages/actions/catalog/google-sheets.md +700 -0
  73. package/dist/docs/pages/actions/catalog/hacker-news.md +542 -0
  74. package/dist/docs/pages/actions/catalog/http.md +824 -0
  75. package/dist/docs/pages/actions/catalog/hyperliquid.md +942 -0
  76. package/dist/docs/pages/actions/catalog/jira.md +920 -0
  77. package/dist/docs/pages/actions/catalog/kalshi.md +917 -0
  78. package/dist/docs/pages/actions/catalog/linear.md +1030 -0
  79. package/dist/docs/pages/actions/catalog/markets.md +21 -0
  80. package/dist/docs/pages/actions/catalog/morpho.md +247 -0
  81. package/dist/docs/pages/actions/catalog/notion.md +1077 -0
  82. package/dist/docs/pages/actions/catalog/nws.md +485 -0
  83. package/dist/docs/pages/actions/catalog/open-meteo.md +559 -0
  84. package/dist/docs/pages/actions/catalog/polymarket.md +1523 -0
  85. package/dist/docs/pages/actions/catalog/pushbullet.md +220 -0
  86. package/dist/docs/pages/actions/catalog/resend.md +307 -0
  87. package/dist/docs/pages/actions/catalog/s3.md +513 -0
  88. package/dist/docs/pages/actions/catalog/sec-edgar.md +487 -0
  89. package/dist/docs/pages/actions/catalog/slack.md +2629 -0
  90. package/dist/docs/pages/actions/catalog/stripe.md +1405 -0
  91. package/dist/docs/pages/actions/catalog/wikipedia.md +379 -0
  92. package/dist/docs/pages/actions/catalog.md +46 -0
  93. package/dist/docs/pages/actions/limits.md +50 -0
  94. package/dist/docs/pages/actions/model-tools.md +225 -0
  95. package/dist/docs/pages/actions/packs.md +148 -0
  96. package/dist/docs/pages/actions/settings.md +69 -0
  97. package/dist/docs/pages/actions/tools.md +244 -0
  98. package/dist/docs/pages/actions/triggers.md +149 -0
  99. package/dist/docs/pages/actions.md +88 -0
  100. package/dist/docs/pages/compat/anthropic.md +168 -0
  101. package/dist/docs/pages/compat/e2b.md +194 -0
  102. package/dist/docs/pages/compat/firecrawl.md +138 -0
  103. package/dist/docs/pages/compat/openai.md +168 -0
  104. package/dist/docs/pages/concepts/auth.md +151 -0
  105. package/dist/docs/pages/concepts/beta.md +55 -0
  106. package/dist/docs/pages/concepts/glossary.md +71 -0
  107. package/dist/docs/pages/concepts/ids.md +98 -0
  108. package/dist/docs/pages/concepts/jobs.md +229 -0
  109. package/dist/docs/pages/concepts/latency.md +138 -0
  110. package/dist/docs/pages/concepts/limits.md +191 -0
  111. package/dist/docs/pages/concepts/stack.md +59 -0
  112. package/dist/docs/pages/concepts/timing.md +86 -0
  113. package/dist/docs/pages/concepts/usage.md +110 -0
  114. package/dist/docs/pages/design/b3os-yaml.md +370 -0
  115. package/dist/docs/pages/design/deploy-from-github.md +122 -0
  116. package/dist/docs/pages/design/observability.md +134 -0
  117. package/dist/docs/pages/errors.md +1824 -0
  118. package/dist/docs/pages/infer/chat.md +570 -0
  119. package/dist/docs/pages/infer/limits.md +55 -0
  120. package/dist/docs/pages/infer/messages.md +185 -0
  121. package/dist/docs/pages/infer/responses.md +173 -0
  122. package/dist/docs/pages/infer/settings.md +154 -0
  123. package/dist/docs/pages/infer/speech.md +323 -0
  124. package/dist/docs/pages/infer.md +154 -0
  125. package/dist/docs/pages/introduction.md +162 -0
  126. package/dist/docs/pages/platform/addresses.md +174 -0
  127. package/dist/docs/pages/platform/call-log.md +99 -0
  128. package/dist/docs/pages/platform/custom-domains.md +104 -0
  129. package/dist/docs/pages/platform/keys.md +79 -0
  130. package/dist/docs/pages/platform/limits.md +57 -0
  131. package/dist/docs/pages/platform/members.md +101 -0
  132. package/dist/docs/pages/platform/requests.md +116 -0
  133. package/dist/docs/pages/platform/settings.md +129 -0
  134. package/dist/docs/pages/platform/webhooks.md +68 -0
  135. package/dist/docs/pages/platform.md +67 -0
  136. package/dist/docs/pages/quickstart/mcp.md +94 -0
  137. package/dist/docs/pages/quickstart/sandbox-agent.md +205 -0
  138. package/dist/docs/pages/quickstart/scrape.md +134 -0
  139. package/dist/docs/pages/quickstart.md +45 -0
  140. package/dist/docs/pages/render/inspections.md +162 -0
  141. package/dist/docs/pages/render/limits.md +72 -0
  142. package/dist/docs/pages/render/screenshots.md +179 -0
  143. package/dist/docs/pages/render/settings.md +431 -0
  144. package/dist/docs/pages/render/styles.md +342 -0
  145. package/dist/docs/pages/render/videos.md +272 -0
  146. package/dist/docs/pages/render.md +118 -0
  147. package/dist/docs/pages/routines/callables.md +174 -0
  148. package/dist/docs/pages/routines/definitions.md +361 -0
  149. package/dist/docs/pages/routines/limits.md +117 -0
  150. package/dist/docs/pages/routines/runs.md +328 -0
  151. package/dist/docs/pages/routines/settings.md +104 -0
  152. package/dist/docs/pages/routines/triggers.md +339 -0
  153. package/dist/docs/pages/routines.md +216 -0
  154. package/dist/docs/pages/sandboxes/agents.md +217 -0
  155. package/dist/docs/pages/sandboxes/commands.md +272 -0
  156. package/dist/docs/pages/sandboxes/images.md +166 -0
  157. package/dist/docs/pages/sandboxes/limits.md +143 -0
  158. package/dist/docs/pages/sandboxes/ports.md +260 -0
  159. package/dist/docs/pages/sandboxes/settings.md +358 -0
  160. package/dist/docs/pages/sandboxes/snapshots.md +423 -0
  161. package/dist/docs/pages/sandboxes/swarms.md +146 -0
  162. package/dist/docs/pages/sandboxes/volumes.md +131 -0
  163. package/dist/docs/pages/sandboxes.md +231 -0
  164. package/dist/docs/pages/sdks/cli.md +121 -0
  165. package/dist/docs/pages/sdks/mcp.md +169 -0
  166. package/dist/docs/pages/sdks/python.md +146 -0
  167. package/dist/docs/pages/sdks/typescript.md +202 -0
  168. package/dist/docs/pages/sdks.md +282 -0
  169. package/dist/docs/pages/settings.md +33 -0
  170. package/dist/docs/pages/vault/limits.md +46 -0
  171. package/dist/docs/pages/vault.md +133 -0
  172. package/dist/docs/pages/vision/agent-browser.md +115 -0
  173. package/dist/docs/pages/vision/crawl.md +333 -0
  174. package/dist/docs/pages/vision/extract.md +152 -0
  175. package/dist/docs/pages/vision/fetcher.md +15 -0
  176. package/dist/docs/pages/vision/limits.md +79 -0
  177. package/dist/docs/pages/vision/profiles.md +111 -0
  178. package/dist/docs/pages/vision/proxy.md +131 -0
  179. package/dist/docs/pages/vision/scrape.md +356 -0
  180. package/dist/docs/pages/vision/sessions.md +311 -0
  181. package/dist/docs/pages/vision/settings.md +656 -0
  182. package/dist/docs/pages/vision.md +175 -0
  183. package/dist/errors.d.ts +129 -0
  184. package/dist/errors.js +326 -0
  185. package/dist/errors.js.map +1 -0
  186. package/dist/main.d.ts +1 -1
  187. package/dist/main.js +26 -13
  188. package/dist/main.js.map +1 -1
  189. package/dist/manifest/apply.d.ts +4 -0
  190. package/dist/manifest/apply.js +2 -0
  191. package/dist/manifest/apply.js.map +1 -1
  192. package/dist/manifest/domains.d.ts +50 -0
  193. package/dist/manifest/domains.js +159 -0
  194. package/dist/manifest/domains.js.map +1 -0
  195. package/dist/manifest/link.d.ts +20 -0
  196. package/dist/manifest/link.js +24 -0
  197. package/dist/manifest/link.js.map +1 -0
  198. package/dist/manifest/record.d.ts +1 -1
  199. package/dist/tool/archive.d.ts +33 -0
  200. package/dist/tool/archive.js +174 -0
  201. package/dist/tool/archive.js.map +1 -0
  202. package/dist/tool/calls.d.ts +46 -0
  203. package/dist/tool/calls.js +274 -0
  204. package/dist/tool/calls.js.map +1 -0
  205. package/dist/tool/checks.d.ts +21 -0
  206. package/dist/tool/checks.js +145 -0
  207. package/dist/tool/checks.js.map +1 -0
  208. package/dist/tool/elf.d.ts +19 -0
  209. package/dist/tool/elf.js +107 -0
  210. package/dist/tool/elf.js.map +1 -0
  211. package/dist/tool/predict.d.ts +8 -0
  212. package/dist/tool/predict.js +38 -0
  213. package/dist/tool/predict.js.map +1 -0
  214. package/dist/tool/ustar.d.ts +5 -0
  215. package/dist/tool/ustar.js +220 -0
  216. package/dist/tool/ustar.js.map +1 -0
  217. package/package.json +6 -5
@@ -0,0 +1,542 @@
1
+ # Hacker News
2
+
3
+ > The io.b3os/hacker-news pack: 5 actions and 1 trigger with call snippets, fixture outputs, connection setup and error codes, generated from version 1.0.0.
4
+
5
+ Source: https://docs.beta.b3os.org/actions/catalog/hacker-news.md
6
+
7
+ <a id="hacker-news"></a>
8
+
9
+ `io.b3os/hacker-news` 1.0.0 · `news`, `developer-tools`, `social` · MIT
10
+
11
+ Read Hacker News: the current front page, full-text search over stories and comments (newest first or by relevance), single items with their comment ids, and user profiles. Uses the public Algolia HN Search API and the official Firebase API. Keyless and read-only; no connection needed.
12
+
13
+ Every call's result carries `upstream_status` and `timing`: `validate_ms`, `inject_ms`, `render_ms`, `upstream_ms`, `map_ms` and `total_ms`. `upstream` is the service's time; the others are B3OS's own ([call actions](https://docs.beta.b3os.org/actions/call)). The snippets below show no timing values, because a fixture records none.
14
+
15
+ ## Connection
16
+
17
+ No credential: a keyless public API. Calls name no connection.
18
+
19
+ Hosts it reaches: `hn.algolia.com`, `hacker-news.firebaseio.com`.
20
+
21
+ ## Actions
22
+
23
+ | Action | Effect | MCP tool | Title |
24
+ |---|---|---|---|
25
+ | [`get-front-page`](https://docs.beta.b3os.org/actions/catalog/hacker-news#hacker-news-get-front-page) | read | `hacker-news__get-front-page` | Get the front page |
26
+ | [`search`](https://docs.beta.b3os.org/actions/catalog/hacker-news#hacker-news-search) | read | `hacker-news__search` | Search by relevance |
27
+ | [`search-recent`](https://docs.beta.b3os.org/actions/catalog/hacker-news#hacker-news-search-recent) | read | `hacker-news__search-recent` | Search newest first |
28
+ | [`get-item`](https://docs.beta.b3os.org/actions/catalog/hacker-news#hacker-news-get-item) | read | `hacker-news__get-item` | Get an item |
29
+ | [`get-user`](https://docs.beta.b3os.org/actions/catalog/hacker-news#hacker-news-get-user) | read | `hacker-news__get-user` | Get a user |
30
+
31
+ <h3 id="hacker-news-get-front-page"><code>get-front-page</code></h3>
32
+
33
+ **Get the front page.** The stories on the Hacker News front page right now, in Algolia's front-page order, with points, comment counts, links and discussion URLs. Use search-recent for what is new and search for a topic.
34
+
35
+ Ref `io.b3os/hacker-news/get-front-page@1.0.0` · effect `read` · no connection · MCP tool `hacker-news__get-front-page`
36
+
37
+ **curl**
38
+
39
+ ```bash
40
+ curl -s https://beta-api.b3os.org/v1/actions/call \
41
+ -H "Authorization: Bearer $B3OS_API_KEY" \
42
+ -H "Content-Type: application/json" \
43
+ -d '{
44
+ "ref": "io.b3os/hacker-news/get-front-page@1",
45
+ "input": {"hits_per_page": 3}
46
+ }'
47
+ ```
48
+ **TypeScript**
49
+
50
+ ```ts
51
+ import { B3OS } from "@b3os/sdk";
52
+
53
+ const b3os = new B3OS();
54
+ const result = await b3os.actions.call({
55
+ ref: "io.b3os/hacker-news/get-front-page@1",
56
+ input: { hits_per_page: 3 },
57
+ });
58
+ console.log(result.output);
59
+ ```
60
+ **Python**
61
+
62
+ ```python
63
+ from b3os import B3OS
64
+
65
+ b3os = B3OS()
66
+ result = b3os.actions.call({
67
+ "ref": "io.b3os/hacker-news/get-front-page@1",
68
+ "input": {"hits_per_page": 3},
69
+ })
70
+ print(result["output"])
71
+ ```
72
+ **MCP**
73
+
74
+ ```json
75
+ {
76
+ "method": "tools/call",
77
+ "params": {
78
+ "name": "hacker-news__get-front-page",
79
+ "arguments": {"hits_per_page": 3}
80
+ }
81
+ }
82
+ ```
83
+
84
+ Expose the pack as tools with `--packs hacker-news` on the local server or `?packs=hacker-news` on the remote URL, and the agent calls `hacker-news__get-front-page` with the action's input. The tool needs no connection. Without exposing the pack, `actions_call` takes the same input with `ref`.
85
+
86
+ Output, labeled `fixture`: Get the front page (response recorded 2026-10-26). From the bundle's `fixtures/get-front-page.json`, not a live call.
87
+
88
+ ```json
89
+ {
90
+ "stories": [
91
+ {
92
+ "id": "50225695",
93
+ "title": "We should be more ambitious with the software we build",
94
+ "url": "https://danluu.com/ambitious/",
95
+ "hn_url": "https://news.ycombinator.com/item?id=50225695",
96
+ "author": "ltratt",
97
+ "points": 782,
98
+ "comments": 702,
99
+ "created_at": "2026-10-24T21:47:31Z",
100
+ "created_at_i": 1792878451,
101
+ "text": null
102
+ },
103
+ {
104
+ "id": "50233779",
105
+ "title": "A 10-year-old CNN outperforms frontier LLMs for skin cancer diagnosis",
106
+ "url": "https://lynchlab.net/llm-skin-cancer",
107
+ "hn_url": "https://news.ycombinator.com/item?id=50233779",
108
+ "author": "sungam",
109
+ "points": 515,
110
+ "comments": 229,
111
+ "created_at": "2026-10-25T17:15:38Z",
112
+ "created_at_i": 1792948538,
113
+ "text": null
114
+ },
115
+ {
116
+ "id": "50234474",
117
+ "title": "Dolly Parton's Imagination Library",
118
+ "url": "https://imaginationlibrary.com/",
119
+ "hn_url": "https://news.ycombinator.com/item?id=50234474",
120
+ "author": "jumploops",
121
+ "points": 499,
122
+ "comments": 88,
123
+ "created_at": "2026-10-25T18:23:54Z",
124
+ "created_at_i": 1792952634,
125
+ "text": "With today&#x27;s news, I thought I&#x27;d share this great program:<p>“When I was growing up in the hills of East Tennessee, I knew my dreams would come true. I know there are children in your community with their own dreams. They dream of becoming a doctor or an inventor or a minister. Who knows, maybe there is a little girl whose dream is to be a writer and singer.<p>The seeds of these dreams are often found in books and the seeds you help plant in your community can grow across the world.”"
126
+ }
127
+ ],
128
+ "total": 30,
129
+ ```
130
+
131
+ The first 40 of 43 lines; the fixture file has the rest.
132
+
133
+ When the service answers with an error, the call fails with [`upstream_error`](https://docs.beta.b3os.org/errors#upstream_error) and `pack_error.code` is one of:
134
+
135
+ | `pack_error.code` | Service status | Retryable | Message |
136
+ |---|---|---|---|
137
+ | `rate_limited` | 429 | yes | Algolia's HN Search rate limit reached (10,000 requests an hour per IP). |
138
+ | `invalid_request` | 400, 422 | no | built from the service's response |
139
+
140
+ <h3 id="hacker-news-search"><code>search</code></h3>
141
+
142
+ **Search by relevance.** Full-text search over Hacker News ranked by relevance, then points and comment count. Filter by item type, minimum points and creation time; page through with page. Returns stories (or comments, when type is comment) with links and discussion URLs.
143
+
144
+ Ref `io.b3os/hacker-news/search@1.0.0` · effect `read` · no connection · MCP tool `hacker-news__search`
145
+
146
+ **curl**
147
+
148
+ ```bash
149
+ curl -s https://beta-api.b3os.org/v1/actions/call \
150
+ -H "Authorization: Bearer $B3OS_API_KEY" \
151
+ -H "Content-Type: application/json" \
152
+ -d '{
153
+ "ref": "io.b3os/hacker-news/search@1",
154
+ "input": {
155
+ "query": "firecracker microvm",
156
+ "hits_per_page": 3,
157
+ "min_points": 50
158
+ }
159
+ }'
160
+ ```
161
+ **TypeScript**
162
+
163
+ ```ts
164
+ import { B3OS } from "@b3os/sdk";
165
+
166
+ const b3os = new B3OS();
167
+ const result = await b3os.actions.call({
168
+ ref: "io.b3os/hacker-news/search@1",
169
+ input: { query: "firecracker microvm", hits_per_page: 3, min_points: 50 },
170
+ });
171
+ console.log(result.output);
172
+ ```
173
+ **Python**
174
+
175
+ ```python
176
+ from b3os import B3OS
177
+
178
+ b3os = B3OS()
179
+ result = b3os.actions.call({
180
+ "ref": "io.b3os/hacker-news/search@1",
181
+ "input": {
182
+ "query": "firecracker microvm",
183
+ "hits_per_page": 3,
184
+ "min_points": 50,
185
+ },
186
+ })
187
+ print(result["output"])
188
+ ```
189
+ **MCP**
190
+
191
+ ```json
192
+ {
193
+ "method": "tools/call",
194
+ "params": {
195
+ "name": "hacker-news__search",
196
+ "arguments": {
197
+ "query": "firecracker microvm",
198
+ "hits_per_page": 3,
199
+ "min_points": 50
200
+ }
201
+ }
202
+ }
203
+ ```
204
+
205
+ Expose the pack as tools with `--packs hacker-news` on the local server or `?packs=hacker-news` on the remote URL, and the agent calls `hacker-news__search` with the action's input. The tool needs no connection. Without exposing the pack, `actions_call` takes the same input with `ref`.
206
+
207
+ Output, labeled `fixture`: Search by relevance (response recorded 2026-10-26). From the bundle's `fixtures/search.json`, not a live call.
208
+
209
+ ```json
210
+ {
211
+ "stories": [
212
+ {
213
+ "id": "49912444",
214
+ "title": "5x faster Edge Functions: V8 isolates to Firecracker MicroVMs",
215
+ "url": "https://www.netlify.com/blog/edge-functions-firecracker-microvms/",
216
+ "hn_url": "https://news.ycombinator.com/item?id=49912444",
217
+ "author": "jbott",
218
+ "points": 230,
219
+ "comments": 109,
220
+ "created_at": "2026-09-30T18:17:45Z",
221
+ "created_at_i": 1790792265,
222
+ "text": null
223
+ },
224
+ {
225
+ "id": "32767784",
226
+ "title": "Attacking Firecracker: AWS' MicroVM Monitor Written in Rust",
227
+ "url": "https://www.graplsecurity.com/post/attacking-firecracker",
228
+ "hn_url": "https://news.ycombinator.com/item?id=32767784",
229
+ "author": "pentestercrab",
230
+ "points": 212,
231
+ "comments": 29,
232
+ "created_at": "2022-09-08T16:20:36Z",
233
+ "created_at_i": 1662654036,
234
+ "text": null
235
+ },
236
+ {
237
+ "id": "28893884",
238
+ "title": "Firecracker MicroVMs",
239
+ "url": "https://firecracker-microvm.github.io/",
240
+ "hn_url": "https://news.ycombinator.com/item?id=28893884",
241
+ "author": "colinprince",
242
+ "points": 176,
243
+ "comments": 60,
244
+ "created_at": "2021-10-17T04:11:41Z",
245
+ "created_at_i": 1634443901,
246
+ "text": null
247
+ }
248
+ ],
249
+ "total": 14,
250
+ ```
251
+
252
+ The first 40 of 43 lines; the fixture file has the rest.
253
+
254
+ When the service answers with an error, the call fails with [`upstream_error`](https://docs.beta.b3os.org/errors#upstream_error) and `pack_error.code` is one of:
255
+
256
+ | `pack_error.code` | Service status | Retryable | Message |
257
+ |---|---|---|---|
258
+ | `rate_limited` | 429 | yes | Algolia's HN Search rate limit reached (10,000 requests an hour per IP). |
259
+ | `invalid_request` | 400, 422 | no | built from the service's response |
260
+
261
+ <h3 id="hacker-news-search-recent"><code>search-recent</code></h3>
262
+
263
+ **Search newest first.** The same search as search, sorted by creation time with the newest first. Use it to watch a topic or to list what was just posted (empty query with type story is the /newest page).
264
+
265
+ Ref `io.b3os/hacker-news/search-recent@1.0.0` · effect `read` · no connection · MCP tool `hacker-news__search-recent`
266
+
267
+ **curl**
268
+
269
+ ```bash
270
+ curl -s https://beta-api.b3os.org/v1/actions/call \
271
+ -H "Authorization: Bearer $B3OS_API_KEY" \
272
+ -H "Content-Type: application/json" \
273
+ -d '{
274
+ "ref": "io.b3os/hacker-news/search-recent@1",
275
+ "input": {"query": "rust", "hits_per_page": 3}
276
+ }'
277
+ ```
278
+ **TypeScript**
279
+
280
+ ```ts
281
+ import { B3OS } from "@b3os/sdk";
282
+
283
+ const b3os = new B3OS();
284
+ const result = await b3os.actions.call({
285
+ ref: "io.b3os/hacker-news/search-recent@1",
286
+ input: { query: "rust", hits_per_page: 3 },
287
+ });
288
+ console.log(result.output);
289
+ ```
290
+ **Python**
291
+
292
+ ```python
293
+ from b3os import B3OS
294
+
295
+ b3os = B3OS()
296
+ result = b3os.actions.call({
297
+ "ref": "io.b3os/hacker-news/search-recent@1",
298
+ "input": {"query": "rust", "hits_per_page": 3},
299
+ })
300
+ print(result["output"])
301
+ ```
302
+ **MCP**
303
+
304
+ ```json
305
+ {
306
+ "method": "tools/call",
307
+ "params": {
308
+ "name": "hacker-news__search-recent",
309
+ "arguments": {"query": "rust", "hits_per_page": 3}
310
+ }
311
+ }
312
+ ```
313
+
314
+ Expose the pack as tools with `--packs hacker-news` on the local server or `?packs=hacker-news` on the remote URL, and the agent calls `hacker-news__search-recent` with the action's input. The tool needs no connection. Without exposing the pack, `actions_call` takes the same input with `ref`.
315
+
316
+ Output, labeled `fixture`: Search newest first (response recorded 2026-10-26). From the bundle's `fixtures/search-recent.json`, not a live call.
317
+
318
+ ```json
319
+ {
320
+ "stories": [
321
+ {
322
+ "id": "50240115",
323
+ "title": "Ask HN: Did crates.io stop processing new crate publishes?",
324
+ "url": null,
325
+ "hn_url": "https://news.ycombinator.com/item?id=50240115",
326
+ "author": "davvid",
327
+ "points": 1,
328
+ "comments": 0,
329
+ "created_at": "2026-10-26T07:03:21Z",
330
+ "created_at_i": 1792998201,
331
+ "text": "For example https:&#x2F;&#x2F;crates.io&#x2F;crates&#x2F;saphyr-parser&#x2F;0.3.2&#x2F;code was recently published (without any client-side errors) but crates.io says:<p><pre><code> The source code for this version is not available yet.\n\n Archives are built shortly after a version is published. This usually only takes a few seconds, so please try again in a couple of minutes.\n\n</code></pre>\nI&#x27;ve never seen this error before. The same can be seen by this just-published crate (12 minutes ago) says the same thing: https:&#x2F;&#x2F;crates.io&#x2F;crates&#x2F;skia-bindings&#x2F;0.156.0&#x2F;code<p>Does anyone know what&#x27;s going on?"
332
+ },
333
+ {
334
+ "id": "50239988",
335
+ "title": "Show HN: Skill-spotter, auto detect agent prompts and commands to create skills",
336
+ "url": "https://github.com/ykisana/skill-spotter",
337
+ "hn_url": "https://news.ycombinator.com/item?id=50239988",
338
+ "author": "ykisana",
339
+ "points": 1,
340
+ "comments": 0,
341
+ "created_at": "2026-10-26T06:48:10Z",
342
+ "created_at_i": 1792997290,
343
+ "text": "Skill-spotter auto detects commands and prompts you type.\nIt detects variations such as &#x27;push these changes&#x27; and &#x27;get these changes pushed&#x27;. Using both word comparison and the actual actions you agent performs.<p>It also adds to your Claude.md if that&#x27;s more applicable than creating a skill.<p>Just saving lots of time if you do repeat prompts."
344
+ },
345
+ {
346
+ "id": "50239884",
347
+ "title": "France's Nuclear Forces Bring in Neighbors to Keep Russia in Check",
348
+ "url": "https://www.wsj.com/world/europe/frances-nuclear-forces-bring-in-neighbors-to-keep-russia-in-check-58b0967d",
349
+ "hn_url": "https://news.ycombinator.com/item?id=50239884",
350
+ "author": "JumpCrisscross",
351
+ "points": 2,
352
+ "comments": 0,
353
+ "created_at": "2026-10-26T06:33:35Z",
354
+ "created_at_i": 1792996415,
355
+ "text": null
356
+ }
357
+ ],
358
+ "total": 71533,
359
+ ```
360
+
361
+ The first 40 of 43 lines; the fixture file has the rest.
362
+
363
+ When the service answers with an error, the call fails with [`upstream_error`](https://docs.beta.b3os.org/errors#upstream_error) and `pack_error.code` is one of:
364
+
365
+ | `pack_error.code` | Service status | Retryable | Message |
366
+ |---|---|---|---|
367
+ | `rate_limited` | 429 | yes | Algolia's HN Search rate limit reached (10,000 requests an hour per IP). |
368
+ | `invalid_request` | 400, 422 | no | built from the service's response |
369
+
370
+ <h3 id="hacker-news-get-item"><code>get-item</code></h3>
371
+
372
+ **Get an item.** One story, comment, job or poll by id from the official API: title, link, text, author, score, time, and the ids of its direct replies (kids, in ranked order). Call it again with a kid id to walk a thread.
373
+
374
+ Ref `io.b3os/hacker-news/get-item@1.0.0` · effect `read` · no connection · MCP tool `hacker-news__get-item`
375
+
376
+ **curl**
377
+
378
+ ```bash
379
+ curl -s https://beta-api.b3os.org/v1/actions/call \
380
+ -H "Authorization: Bearer $B3OS_API_KEY" \
381
+ -H "Content-Type: application/json" \
382
+ -d '{"ref": "io.b3os/hacker-news/get-item@1", "input": {"id": 8863}}'
383
+ ```
384
+ **TypeScript**
385
+
386
+ ```ts
387
+ import { B3OS } from "@b3os/sdk";
388
+
389
+ const b3os = new B3OS();
390
+ const result = await b3os.actions.call({ ref: "io.b3os/hacker-news/get-item@1", input: { id: 8863 } });
391
+ console.log(result.output);
392
+ ```
393
+ **Python**
394
+
395
+ ```python
396
+ from b3os import B3OS
397
+
398
+ b3os = B3OS()
399
+ result = b3os.actions.call({"ref": "io.b3os/hacker-news/get-item@1", "input": {"id": 8863}})
400
+ print(result["output"])
401
+ ```
402
+ **MCP**
403
+
404
+ ```json
405
+ {
406
+ "method": "tools/call",
407
+ "params": {"name": "hacker-news__get-item", "arguments": {"id": 8863}}
408
+ }
409
+ ```
410
+
411
+ Expose the pack as tools with `--packs hacker-news` on the local server or `?packs=hacker-news` on the remote URL, and the agent calls `hacker-news__get-item` with the action's input. The tool needs no connection. Without exposing the pack, `actions_call` takes the same input with `ref`.
412
+
413
+ Output, labeled `fixture`: Get an item (response recorded 2026-10-26). From the bundle's `fixtures/get-item.json`, not a live call.
414
+
415
+ ```json
416
+ {
417
+ "id": 8863,
418
+ "type": "story",
419
+ "by": "dhouston",
420
+ "time": 1175714200,
421
+ "title": "My YC app: Dropbox - Throw away your USB drive",
422
+ "url": "http://www.getdropbox.com/u/2/screencast.html",
423
+ "text": null,
424
+ "score": 104,
425
+ "descendants": 71,
426
+ "parent": null,
427
+ "kids": [9224, 8917, 8884, 8887],
428
+ "dead": false,
429
+ "deleted": false,
430
+ "hn_url": "https://news.ycombinator.com/item?id=8863"
431
+ }
432
+ ```
433
+
434
+ When the service answers with an error, the call fails with [`upstream_error`](https://docs.beta.b3os.org/errors#upstream_error) and `pack_error.code` is one of:
435
+
436
+ | `pack_error.code` | Service status | Retryable | Message |
437
+ |---|---|---|---|
438
+ | `not_found` | 200 | no | No Hacker News item with this id. |
439
+
440
+ <h3 id="hacker-news-get-user"><code>get-user</code></h3>
441
+
442
+ **Get a user.** A Hacker News user's public profile: karma, account creation time, the about text (HTML) and how many items they submitted. Ids are case-sensitive.
443
+
444
+ Ref `io.b3os/hacker-news/get-user@1.0.0` · effect `read` · no connection · MCP tool `hacker-news__get-user`
445
+
446
+ **curl**
447
+
448
+ ```bash
449
+ curl -s https://beta-api.b3os.org/v1/actions/call \
450
+ -H "Authorization: Bearer $B3OS_API_KEY" \
451
+ -H "Content-Type: application/json" \
452
+ -d '{"ref": "io.b3os/hacker-news/get-user@1", "input": {"username": "pg"}}'
453
+ ```
454
+ **TypeScript**
455
+
456
+ ```ts
457
+ import { B3OS } from "@b3os/sdk";
458
+
459
+ const b3os = new B3OS();
460
+ const result = await b3os.actions.call({ ref: "io.b3os/hacker-news/get-user@1", input: { username: "pg" } });
461
+ console.log(result.output);
462
+ ```
463
+ **Python**
464
+
465
+ ```python
466
+ from b3os import B3OS
467
+
468
+ b3os = B3OS()
469
+ result = b3os.actions.call({
470
+ "ref": "io.b3os/hacker-news/get-user@1",
471
+ "input": {"username": "pg"},
472
+ })
473
+ print(result["output"])
474
+ ```
475
+ **MCP**
476
+
477
+ ```json
478
+ {
479
+ "method": "tools/call",
480
+ "params": {"name": "hacker-news__get-user", "arguments": {"username": "pg"}}
481
+ }
482
+ ```
483
+
484
+ Expose the pack as tools with `--packs hacker-news` on the local server or `?packs=hacker-news` on the remote URL, and the agent calls `hacker-news__get-user` with the action's input. The tool needs no connection. Without exposing the pack, `actions_call` takes the same input with `ref`.
485
+
486
+ Output, labeled `fixture`: Get a user (response recorded 2026-10-26). From the bundle's `fixtures/get-user.json`, not a live call.
487
+
488
+ ```json
489
+ {
490
+ "id": "pg",
491
+ "created": 1160418092,
492
+ "karma": 157316,
493
+ "about": "Bug fixer.",
494
+ "submitted_count": 3
495
+ }
496
+ ```
497
+
498
+ When the service answers with an error, the call fails with [`upstream_error`](https://docs.beta.b3os.org/errors#upstream_error) and `pack_error.code` is one of:
499
+
500
+ | `pack_error.code` | Service status | Retryable | Message |
501
+ |---|---|---|---|
502
+ | `not_found` | 200 | no | No Hacker News user with this name. |
503
+
504
+ ## Triggers
505
+
506
+ <h3 id="hacker-news-trigger-new-story"><code>new-story</code> (trigger)</h3>
507
+
508
+ **New story.** Fires once for each new Hacker News item matching a query, checked every minute by default. The first check records what exists and emits nothing; later checks emit only items not seen before.
509
+
510
+ Ref `io.b3os/hacker-news/new-story@1.0.0` · poll of `search-recent`, every 60 s by default (at least 30 s) · no connection
511
+
512
+ | `with` key | Required | Description |
513
+ |---|---|---|
514
+ | `query` | no | Words to match; empty matches every new item. Default `""`. |
515
+ | `type` | no | Item type. Default `"story"`. |
516
+ | `min_points` | no | Minimum points. Default `0`. |
517
+
518
+ In a routine:
519
+
520
+ ```yaml
521
+ triggers:
522
+ - type: action
523
+ id: new_story
524
+ uses: io.b3os/hacker-news/new-story@1
525
+ ```
526
+
527
+ Event, labeled `fixture`: the first item of `search-recent`'s fixture fixtures/search-recent.json (Search newest first (response recorded 2026-10-26)) through the trigger's event mapping. A routine reads it as `trigger.data`; its fields are `id`, `title`, `url`, `hn_url`, `author`, `points`, `comments`, `created_at`, `created_at_i`, `text`.
528
+
529
+ ```json
530
+ {
531
+ "id": "50240115",
532
+ "title": "Ask HN: Did crates.io stop processing new crate publishes?",
533
+ "url": null,
534
+ "hn_url": "https://news.ycombinator.com/item?id=50240115",
535
+ "author": "davvid",
536
+ "points": 1,
537
+ "comments": 0,
538
+ "created_at": "2026-10-26T07:03:21Z",
539
+ "created_at_i": 1792998201,
540
+ "text": "For example https:&#x2F;&#x2F;crates.io&#x2F;crates&#x2F;saphyr-parser&#x2F;0.3.2&#x2F;code was recently published (without any client-side errors) but crates.io says:<p><pre><code> The source code for this version is not available yet.\n\n Archives are built shortly after a version is published. This usually only takes a few seconds, so please try again in a couple of minutes.\n\n</code></pre>\nI&#x27;ve never seen this error before. The same can be seen by this just-published crate (12 minutes ago) says the same thing: https:&#x2F;&#x2F;crates.io&#x2F;crates&#x2F;skia-bindings&#x2F;0.156.0&#x2F;code<p>Does anyone know what&#x27;s going on?"
541
+ }
542
+ ```