@floomhq/floom 3.1.0 → 5.0.1

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 (72) hide show
  1. package/LICENSE +6 -0
  2. package/README.md +346 -168
  3. package/bin/floom-mcp +9 -0
  4. package/bin/workeros-mcp +13 -0
  5. package/dist/cli.d.ts +6 -0
  6. package/dist/cli.js +336 -0
  7. package/dist/cli.js.map +1 -0
  8. package/dist/commands/completion.d.ts +2 -0
  9. package/dist/commands/completion.js +81 -0
  10. package/dist/commands/completion.js.map +1 -0
  11. package/dist/commands/connections.d.ts +22 -0
  12. package/dist/commands/connections.js +158 -0
  13. package/dist/commands/connections.js.map +1 -0
  14. package/dist/commands/contexts.d.ts +34 -0
  15. package/dist/commands/contexts.js +247 -0
  16. package/dist/commands/contexts.js.map +1 -0
  17. package/dist/commands/doctor.d.ts +3 -0
  18. package/dist/commands/doctor.js +158 -0
  19. package/dist/commands/doctor.js.map +1 -0
  20. package/dist/commands/login.d.ts +14 -0
  21. package/dist/commands/login.js +349 -0
  22. package/dist/commands/login.js.map +1 -0
  23. package/dist/commands/logout.d.ts +1 -0
  24. package/dist/commands/logout.js +15 -0
  25. package/dist/commands/logout.js.map +1 -0
  26. package/dist/commands/mcp.d.ts +42 -0
  27. package/dist/commands/mcp.js +382 -0
  28. package/dist/commands/mcp.js.map +1 -0
  29. package/dist/commands/run.d.ts +15 -0
  30. package/dist/commands/run.js +154 -0
  31. package/dist/commands/run.js.map +1 -0
  32. package/dist/commands/runs.d.ts +25 -0
  33. package/dist/commands/runs.js +324 -0
  34. package/dist/commands/runs.js.map +1 -0
  35. package/dist/commands/secrets.d.ts +9 -0
  36. package/dist/commands/secrets.js +97 -0
  37. package/dist/commands/secrets.js.map +1 -0
  38. package/dist/commands/whoami.d.ts +3 -0
  39. package/dist/commands/whoami.js +70 -0
  40. package/dist/commands/whoami.js.map +1 -0
  41. package/dist/commands/workers.d.ts +30 -0
  42. package/dist/commands/workers.js +773 -0
  43. package/dist/commands/workers.js.map +1 -0
  44. package/dist/commands/workspaces.d.ts +10 -0
  45. package/dist/commands/workspaces.js +171 -0
  46. package/dist/commands/workspaces.js.map +1 -0
  47. package/dist/lib/api.d.ts +38 -0
  48. package/dist/lib/api.js +311 -0
  49. package/dist/lib/api.js.map +1 -0
  50. package/dist/lib/cli-errors.d.ts +1 -0
  51. package/dist/lib/cli-errors.js +20 -0
  52. package/dist/lib/cli-errors.js.map +1 -0
  53. package/dist/lib/command-name.d.ts +4 -0
  54. package/dist/lib/command-name.js +23 -0
  55. package/dist/lib/command-name.js.map +1 -0
  56. package/dist/lib/credentials.d.ts +21 -0
  57. package/dist/lib/credentials.js +138 -0
  58. package/dist/lib/credentials.js.map +1 -0
  59. package/dist/lib/output.d.ts +18 -0
  60. package/dist/lib/output.js +44 -0
  61. package/dist/lib/output.js.map +1 -0
  62. package/dist/lib/prompt.d.ts +2 -0
  63. package/dist/lib/prompt.js +55 -0
  64. package/dist/lib/prompt.js.map +1 -0
  65. package/dist/server.d.ts +5 -0
  66. package/dist/server.js +1171 -0
  67. package/dist/server.js.map +1 -0
  68. package/package.json +43 -51
  69. package/dist/index.d.ts +0 -1
  70. package/dist/index.js +0 -8278
  71. package/dist/version.d.ts +0 -1
  72. package/dist/version.js +0 -1
package/LICENSE ADDED
@@ -0,0 +1,6 @@
1
+ Floom CLI and MCP Package License
2
+
3
+ The Floom CLI and MCP package is licensed under the Floom Source
4
+ Available License Version 1.0.
5
+
6
+ See ../../LICENSE for the full license text.
package/README.md CHANGED
@@ -1,168 +1,346 @@
1
- # @floomhq/floom
2
-
3
- The Floom CLI: one shared skill library, synced across every AI agent.
4
-
5
- Docs: <https://floom.dev/docs>
6
-
7
- ## Install
8
-
9
- ```bash
10
- npm i -g @floomhq/floom
11
- ```
12
-
13
- Pinned no-install form for automation:
14
-
15
- ```bash
16
- npx -y @floomhq/floom@3.0.2 --help
17
- ```
18
-
19
- ## Login
20
-
21
- ```bash
22
- floom login
23
- ```
24
-
25
- The login command starts a browser device flow. Sign in at floom.dev with
26
- Google or email, approve the device code, and the CLI stores the session at
27
- `~/.floom/auth.json`.
28
-
29
- Check the active account:
30
-
31
- ```bash
32
- floom account
33
- ```
34
-
35
- ## First Skill
36
-
37
- ```bash
38
- floom push ~/.claude/skills/my-skill
39
- ```
40
-
41
- The folder must contain `SKILL.md`. Each push creates a Library version.
42
-
43
- Create a starter skill when the folder does not exist yet:
44
-
45
- ```bash
46
- floom new my-skill --agent claude
47
- ```
48
-
49
- ## Bulk Sync
50
-
51
- ```bash
52
- floom sync
53
- ```
54
-
55
- Zero-arg `floom sync` detects installed agents and supported scopes, reviews
56
- local-to-Library and Library-to-local differences, and applies the selected
57
- plan. Use `--dry-run` to preview the plan without changing files or Library
58
- records.
59
-
60
- Library-to-local only:
61
-
62
- ```bash
63
- floom pull
64
- floom pull --agent claude,codex
65
- ```
66
-
67
- Local-to-Library only:
68
-
69
- ```bash
70
- floom push
71
- ```
72
-
73
- Use the installed `floom` command for interactive terminal work. Use the pinned
74
- `npx -y @floomhq/floom@3.0.2 <command>` form for automation and agent-run
75
- commands that need reproducible CLI behavior.
76
-
77
- ## Releasing
78
-
79
- Releases publish to npm and bump the Homebrew tap formula automatically via
80
- `.github/workflows/publish-cli.yml`, triggered by a `cli-v*` tag.
81
-
82
- ### Hard pre-publish smoke gate
83
-
84
- Every `npm publish` is gated by `packages/cli/scripts/pre-publish-smoke.sh`,
85
- which packs the tarball, installs it into an isolated `$HOME`, and drives
86
- every subcommand the way a real user would. If anything fails, the workflow
87
- fails BEFORE `npm publish` runs — no broken CLI can reach npm `latest`.
88
-
89
- Background: in 2026-05 we shipped `3.0.0` → `3.0.1` → `3.0.2` within hours
90
- because `3.0.0` hit npm `latest` with three P0s that code review missed:
91
- `--help` ran the destructive body, `--help | head` threw an unhandled EPIPE,
92
- and unknown commands silently rendered the dashboard. Only an out-of-band
93
- real-terminal smoke caught them. This script is that smoke, baked into the
94
- publish pipeline.
95
-
96
- ### Before pushing a `cli-v*` tag
97
-
98
- Run the local pre-tag check from the repo root:
99
-
100
- ```bash
101
- ./scripts/pre-tag-check.sh
102
- ```
103
-
104
- It:
105
-
106
- 1. Confirms the working tree is clean.
107
- 2. Rebuilds the CLI from a clean `dist/`.
108
- 3. Runs the CLI unit test suite (`pnpm --filter @floomhq/floom test`).
109
- 4. Runs the full pre-publish smoke (same script the workflow runs).
110
-
111
- If everything passes, the script prints the exact `git tag` + `git push origin`
112
- commands. You then push the tag and the workflow takes over.
113
-
114
- If anything fails, fix the issue first. Do not push the tag.
115
-
116
- ### Smoke-only workflow run
117
-
118
- To validate the smoke script itself without publishing (e.g. after editing
119
- `scripts/pre-publish-smoke.sh`):
120
-
121
- ```
122
- GitHub → Actions → Publish @floomhq/floom → Run workflow
123
- smoke_only: true
124
- ```
125
-
126
- The workflow will build, run the smoke, and stop. No `npm publish`, no
127
- Homebrew dispatch.
128
-
129
- ### Manual publish (rare)
130
-
131
- To publish without a tag (e.g. retag an existing version under a different
132
- dist-tag), use `workflow_dispatch` with `smoke_only: false` and the desired
133
- `tag` input. The smoke gate still runs first.
134
-
135
- ## What the pre-publish smoke checks
136
-
137
- See `scripts/pre-publish-smoke.sh` for the full assertion list. Summary:
138
-
139
- | Stage | Asserts |
140
- |------|---------|
141
- | 1 | Tarball builds, packs, installs cleanly into isolated `$HOME`; installed `floom --version` matches `package.json` |
142
- | 2 | **Every** subcommand `--help` exits 0, starts with `Usage: floom`, writes no `~/.floom/auth.json`, prints no "Signed (in|out)" / "Waiting for browser" (P0 #1 from 3.0.0) |
143
- | 3 | `floom --help \| head -3` and `floom push --help \| head -1` print no EPIPE / "Unhandled error event" (P0 #2 from 3.0.0) |
144
- | 4 | `floom <unknown>` exits non-zero with "unknown command" + "did you mean" hint (P0 #3 from 3.0.0) |
145
- | 5 | Bare `floom --help` exits 0 with grouped help |
146
- | 6 | Unauth `whoami` / `account` / `logout` exit 0 idempotent; unauth `status` / `sync --json` / `push --json` exit non-zero with no stack trace |
147
- | 7 | `floom logout extra-positional` is rejected with non-zero exit AND `~/.floom/auth.json` is preserved (no destructive body) |
148
- | 8 | **Agent detection** picks up fake `.claude/`, `.codex/`, `.cursor/` marker dirs in the isolated `$HOME` (verified by parsing `floom doctor --json`); bare `floom sync` / `floom pull` with planted agents do not crash unauth (clean `signedIn:false` envelope). Note: fan-out *behaviour itself* requires real auth, so it is exercised at the **unit-test layer** by `src/commands/sync.fanout.test.ts`, which the publish workflow runs as a separate hard gate before the smoke. |
149
-
150
- If any assertion fails, the publish job fails. The smoke script exits non-zero
151
- on the first failure and prints a summary of every failed check.
152
-
153
- ## Files
154
-
155
- ```
156
- packages/cli/
157
- ├── src/ # TypeScript source
158
- │ ├── index.ts # CLI entry point (commander)
159
- │ ├── commands/ # one file per subcommand
160
- │ ├── lib/ # shared helpers
161
- │ └── cli-smoke.test.ts # unit-level smoke (P0 lock-ins)
162
- ├── scripts/
163
- │ ├── build-bundle.mjs # esbuild → dist/index.js
164
- │ ├── verify-package.mjs # pre-pack file allowlist check
165
- │ └── pre-publish-smoke.sh # E2E smoke driven against tarball
166
- ├── package.json
167
- └── CHANGELOG.md
168
- ```
1
+ # Floom CLI + MCP
2
+
3
+ Floom lets agents create, update, run, watch, and delete worker automations through an HTTP MCP endpoint backed by the Floom API. The package installs into Claude Code, Cursor, VS Code, Windsurf, Continue, or any harness that accepts an MCP HTTP or stdio server entry.
4
+
5
+ Floom ships as a single npm package that exposes:
6
+
7
+ - **`floom` CLI** - `login`, `workspaces`, `workers`, `run`, `runs`, `secrets`, `mcp`, `whoami`, `logout`, plus an `install` shortcut that wires the MCP server into Claude Code / Cursor / Continue. `workeros` remains a compatibility alias for older installs.
8
+ - **HTTP MCP endpoint** - `floom mcp install` writes an HTTP transport entry (`url` + `headers`) pointing at `/mcp-tools/serve` on the Floom API. No local subprocess is required.
9
+ - **`floom-mcp` stdio server** - legacy stdio path; `workeros-mcp` still works as an alias. Use this for harnesses that do not support HTTP MCP transport.
10
+
11
+ The CLI targets local, self-hosted, and hosted deployments:
12
+
13
+ | Mode | API base | Auth | Workspaces |
14
+ |------|----------|------|------------|
15
+ | **Self-hosted** (default) | `http://localhost:8000` or your API URL | `x-floom-secret` when `FLOOM_SECRET` is set | local workspace |
16
+ | **Hosted** | your hosted API URL | bearer token or hosted login flow, legacy `x-workeros-workspace` header | multi-workspace |
17
+
18
+ ## Self-Hosted Quickstart
19
+
20
+ ```bash
21
+ npm i -g @floomhq/floom@latest
22
+ floom login --api http://localhost:8000
23
+ floom workers list
24
+ floom run <worker-id> --input key=value
25
+ ```
26
+
27
+ If your local API runs without `FLOOM_SECRET`, login is not required for basic local development. For a protected self-hosted API, set `FLOOM_SECRET` on the backend and use the matching secret when the CLI prompts.
28
+
29
+ If the self-hosted engine has user-header scope enabled (it requires `x-floom-user` alongside the shared secret), pass the identity with the `--user` flag or `WORKEROS_USER` env var:
30
+
31
+ ```bash
32
+ WORKEROS_API_BASE=http://127.0.0.1:8011 WORKEROS_API_SECRET=<secret> WORKEROS_USER=<user> floom whoami
33
+ # or
34
+ floom --user <user> whoami
35
+ ```
36
+
37
+ `WORKEROS_API_BASE` + `WORKEROS_API_SECRET` select self-hosted (OSS) mode and take precedence over any saved hosted credentials file; `mcp install` bakes `x-floom-user` into the generated client config when it is set.
38
+
39
+ Credentials live at `~/.config/floom/credentials.json` (mode 0600). Existing `~/.config/workeros/credentials.json` files are still read for compatibility. `floom logout` clears both paths.
40
+
41
+ ## MCP install
42
+
43
+ ```bash
44
+ npx -y @floomhq/floom mcp install
45
+ ```
46
+
47
+ Auto-detects the first existing config file. To target a specific harness:
48
+
49
+ ```bash
50
+ floom mcp install --target claude # ~/.claude/settings.json
51
+ floom mcp install --target cursor # ~/.cursor/mcp.json
52
+ floom mcp install --target vscode # .vscode/mcp.json (workspace-local)
53
+ floom mcp install --target windsurf # ~/.codeium/windsurf/mcp_config.json
54
+ floom mcp install --target continue # ~/.continue/.continuerc.json
55
+ floom mcp install --target generic # prints JSON snippet for manual paste
56
+ ```
57
+
58
+ ## Switching the active context
59
+
60
+ ```bash
61
+ floom workspace list # all workspaces your credentials can access, active marked with *
62
+ floom workspace switch <name> # by name or id; fails (exit 1) if not authenticated for it
63
+ floom mcp list # configured MCP servers (connections of kind "mcp")
64
+ floom mcp switch <name> # set the active MCP server by label
65
+ floom mcp test [name] # live probe (initialize + tools/list); defaults to the active server
66
+ ```
67
+
68
+ Switches persist in `~/.config/floom/credentials.json` and apply to every later CLI invocation. `workspaces`/`use` remain as aliases of `workspace`/`switch`. Workspace switching works in both modes: hosted deployments scope by membership, self-hosted deployments scope local workspaces via the legacy `x-workeros-workspace` header (which the CLI sends on every request, and `mcp install` bakes into the client config - re-run `mcp install` after switching to repoint installed MCP clients).
69
+
70
+ Re-running the installer updates the existing `floom` entry, and migrates an older `workeros` entry instead of duplicating it.
71
+
72
+ ## Supported targets
73
+
74
+ | Target | Config file written | Config shape |
75
+ |---|---|---|
76
+ | `claude` | `~/.claude/settings.json` | `{ mcpServers: { floom: {...} } }` |
77
+ | `cursor` | `~/.cursor/mcp.json` | `{ mcpServers: { floom: {...} } }` |
78
+ | `vscode` | `.vscode/mcp.json` (workspace) | `{ mcpServers: { floom: {...} } }` |
79
+ | `windsurf` | `~/.codeium/windsurf/mcp_config.json` | `{ mcpServers: { floom: {...} } }` |
80
+ | `continue` | `~/.continue/.continuerc.json` | `{ mcpServers: [ { name:"floom", ... } ] }` |
81
+ | `generic` | (no file) | prints JSON snippet to stdout |
82
+
83
+ All targets write **HTTP MCP transport** (`url` + `headers`) - no local subprocess is spawned. The MCP endpoint is hosted on the Floom API server.
84
+
85
+ ```json
86
+ {
87
+ "mcpServers": {
88
+ "floom": {
89
+ "url": "http://localhost:8000/mcp-tools/serve",
90
+ "headers": {
91
+ "x-floom-secret": "<WORKEROS_API_SECRET>"
92
+ }
93
+ }
94
+ }
95
+ }
96
+ ```
97
+
98
+ ### HTTP transport (recommended - written by `floom mcp install`)
99
+
100
+ Claude Code / Cursor / VS Code / Windsurf (`mcpServers` object shape):
101
+
102
+ ```json
103
+ {
104
+ "mcpServers": {
105
+ "floom": {
106
+ "url": "http://localhost:8000/mcp-tools/serve",
107
+ "headers": {
108
+ "x-floom-secret": "<WORKEROS_API_SECRET>"
109
+ }
110
+ }
111
+ }
112
+ }
113
+ ```
114
+
115
+ The published binary stays connected for that handshake when launched as `npx -p @floomhq/floom floom-mcp`.
116
+
117
+ ## Manual config
118
+
119
+ Claude Code / Cursor / VS Code / Windsurf (`mcpServers` object shape, HTTP MCP):
120
+
121
+ ```json
122
+ {
123
+ "mcpServers": {
124
+ "floom": {
125
+ "url": "http://localhost:8000/mcp-tools/serve",
126
+ "headers": {
127
+ "x-floom-secret": "<WORKEROS_API_SECRET>"
128
+ }
129
+ }
130
+ }
131
+ }
132
+ ```
133
+
134
+ Continue (`~/.continue/.continuerc.json`, array shape, HTTP MCP):
135
+
136
+ ```json
137
+ {
138
+ "mcpServers": [
139
+ {
140
+ "name": "floom",
141
+ "url": "http://localhost:8000/mcp-tools/serve",
142
+ "headers": {
143
+ "x-floom-secret": "<WORKEROS_API_SECRET>"
144
+ }
145
+ }
146
+ ]
147
+ }
148
+ ```
149
+
150
+ Replace `http://localhost:8000` with your deployed API base URL when connecting to a remote self-hosted instance.
151
+
152
+ ### Stdio transport (fallback - for harnesses that do not support HTTP MCP)
153
+
154
+ ```json
155
+ {
156
+ "mcpServers": {
157
+ "floom": {
158
+ "command": "npx",
159
+ "args": ["-p", "@floomhq/floom", "floom-mcp"],
160
+ "env": {
161
+ "WORKEROS_API_SECRET": "<WORKEROS_API_SECRET>",
162
+ "WORKEROS_API_BASE": "http://localhost:8000"
163
+ }
164
+ }
165
+ }
166
+ }
167
+ ```
168
+
169
+ Or launch directly if the package is already installed: `node /path/to/@floomhq/floom/dist/server.js`.
170
+
171
+ ## Worker bundle CLI flow
172
+
173
+ Use this path when a fresh agent has a local `workers/<id>/` folder and needs a repeatable create/edit/deploy loop:
174
+
175
+ ```bash
176
+ floom login
177
+ floom workers validate ./workers/<id>
178
+ floom workers push ./workers/<id>
179
+ floom run <id> --inputs-file docs/workers/inputs/<id>.json
180
+ floom workers info <id>
181
+ ```
182
+
183
+ `workers validate` is offline. It checks that `worker.yml` parses, the entry file exists, the runtime is declared, and E2B Composio workers do not use the local `composio execute` CLI. For structured connection declarations it also verifies that referenced tool slugs are covered by `allowed_tools`.
184
+
185
+ `workers push` uses `POST /workers` for new workers and `PUT /workers/{id}` for existing workers. If an older API returns 404/405 for source updates, upgrade the API before editing workers in place.
186
+
187
+ ## Tools
188
+
189
+ > **For full worked examples per tool, end-to-end recipes (deploy a worker from prompt, port a Claude skill, schedule + webhook + composio triggers), and the agent draft contract, see [docs/AGENT-COOKBOOK.md](../../docs/AGENT-COOKBOOK.md).**
190
+
191
+ ### Workers
192
+ | Tool | Description |
193
+ | --- | --- |
194
+ | `workers.list` | List available Floom workers. |
195
+ | `workers.get` | Read one worker, including config and recent run metadata. |
196
+ | `workers.create` | Create a script-mode worker from `worker_yml` and `run_py`. |
197
+ | `workers.update` | Patch trigger, cron, default inputs, capabilities, or rotate webhook secret. |
198
+ | `workers.delete` | Delete a worker and dependent run data. |
199
+ | `workers.run` | Start a manual worker run with input values. |
200
+ | `workers.logs` | Fetch cross-run log history, filterable by level and time. |
201
+ | `workers.stats` | 7-day run statistics for a specific worker. |
202
+ | `workers.timeseries` | Daily run counts and success/failure trend over N days. |
203
+ | `workers.sample_input` | Get example input values for a worker's fields. |
204
+ | `workers.archive` | Archive a worker (reversible). |
205
+ | `workers.restore` | Restore an archived worker to active status. |
206
+ | `workers.reload` | Reload all workers from disk on a self-hosted deployment. |
207
+ | `workers.versions` | List saved versions of a worker. |
208
+ | `workers.rollback` | Restore a worker to a previous version. |
209
+ | `workers.alerts.list` | List configured alerts for a worker. |
210
+ | `workers.alerts.create` | Add a failure/approval/success alert via webhook or email. |
211
+ | `workers.alerts.delete` | Remove a worker alert. |
212
+
213
+ ### Runs
214
+ | Tool | Description |
215
+ | --- | --- |
216
+ | `runs.list` | List runs, optionally filtered by worker id or status. |
217
+ | `runs.get` | Read one run with logs, outputs, artifacts, and approval state. |
218
+ | `runs.watch` | Stream SSE run events until a terminal state. |
219
+ | `runs.cancel` | Cancel an in-progress run. |
220
+ | `runs.replay` | Replay a completed or failed run with the same inputs. |
221
+
222
+ ### Approvals
223
+ | Tool | Description |
224
+ | --- | --- |
225
+ | `approvals.list` | List pending approval requests across all workers. |
226
+ | `approvals.approve` | Approve a pending run so it continues executing. |
227
+ | `approvals.reject` | Reject a pending run, stopping it. |
228
+
229
+ ### Secrets
230
+ | Tool | Description |
231
+ | --- | --- |
232
+ | `secrets.list` | List secret names and status. |
233
+ | `secrets.set` | Create or update a secret value. |
234
+ | `secrets.delete` | Delete a secret. |
235
+ | `secrets.test` | Verify a secret exists without revealing its value. |
236
+
237
+ ### Connections
238
+ | Tool | Description |
239
+ | --- | --- |
240
+ | `connections.list` | List configured app connections. |
241
+ | `connections.add_mcp` | Add an MCP server connection. |
242
+ | `connections.delete` | Remove a connection. |
243
+ | `connections.status` | Check connection health and auth status. |
244
+ | `connections.test` | Run a live connectivity check on a connection. |
245
+
246
+ ### Contexts (Brain Packs)
247
+ | Tool | Description |
248
+ | --- | --- |
249
+ | `contexts.list` | List context folders. |
250
+ | `contexts.create` | Create a new brain pack context. |
251
+ | `contexts.delete` | Delete a brain pack and all its files. |
252
+ | `contexts.read` | Read a file from a context. |
253
+ | `contexts.write` | Create or update a file in a context. |
254
+ | `contexts.upload` | Upload a binary file to a context. |
255
+ | `contexts.delete_file` | Delete a specific file from a context. |
256
+ | `contexts.versions` | List saved versions of a brain pack. |
257
+ | `contexts.rollback` | Restore a brain pack to a previous version. |
258
+
259
+ ### Triggers & Integrations
260
+ | Tool | Description |
261
+ | --- | --- |
262
+ | `triggers.list` | List integration triggers, globally or per worker/app. |
263
+ | `integrations.catalog` | Browse all available integrations. |
264
+
265
+ ### Workspace
266
+ | Tool | Description |
267
+ | --- | --- |
268
+ | `workspace.chat` | Send a message to the workspace agent and get a reply. |
269
+ | `workspace.instructions.get` | Read current workspace agent system prompt. |
270
+ | `workspace.instructions.set` | Update workspace agent system prompt. |
271
+ | `workspace.versions` | List version history of workspace instructions. |
272
+ | `workspace.rollback` | Restore workspace instructions to a previous version. |
273
+
274
+ ### Conversations
275
+ | Tool | Description |
276
+ | --- | --- |
277
+ | `conversations.list` | List past workspace agent conversations. |
278
+ | `conversations.get` | Retrieve a full conversation by ID. |
279
+
280
+ ### System
281
+ | Tool | Description |
282
+ | --- | --- |
283
+ | `system.overview` | Full workspace dashboard - health, runs, pending approvals, alerts. |
284
+ | `system.stats` | 7-day aggregate run statistics across the whole workspace. |
285
+ | `system.info` | Platform version and configuration flags. |
286
+ | `system.alerts` | Active system-wide alerts. |
287
+
288
+ ## Quick example - write + deploy + verify a worker in one MCP session
289
+
290
+ ```js
291
+ // 1. Create
292
+ await workers.create({
293
+ worker_yml: `
294
+ schema_version: "0.3"
295
+ name: text-summarizer
296
+ title: Text Summarizer
297
+ description: Summarizes any text in 3 bullets using GPT-4.1.
298
+ entrypoint: run.py
299
+ exec:
300
+ command: python run.py
301
+ runtime: python311
302
+ runner: e2b
303
+ entry: run.py
304
+ inputs:
305
+ - { name: text, kind: scalar, type: textarea, required: true, label: Text }
306
+ outputs:
307
+ - { name: summary, kind: file, media_type: text/markdown, path: out/summary.md, required: true, label: Summary }
308
+ secrets: [OPENAI_API_KEY]
309
+ capabilities:
310
+ secrets: [OPENAI_API_KEY]
311
+ network: { egress: true }
312
+ trigger: { type: manual }
313
+ `,
314
+ run_py: `
315
+ def run(inputs, context):
316
+ client = context.openai()
317
+ r = client.chat.completions.create(
318
+ model="gpt-4.1-mini",
319
+ messages=[
320
+ {"role": "system", "content": "Summarize in 3 bullets."},
321
+ {"role": "user", "content": inputs["text"]},
322
+ ],
323
+ )
324
+ summary = r.choices[0].message.content
325
+ context.write_output("summary", summary)
326
+ return {"summary": summary}
327
+ `,
328
+ });
329
+
330
+ // 2. Run
331
+ const { run_id } = await workers.run({
332
+ id: "text-summarizer",
333
+ inputs: { text: "Lorem ipsum dolor sit amet..." },
334
+ });
335
+
336
+ // 3. Watch until terminal
337
+ const watched = await runs.watch({ id: run_id });
338
+ console.log(watched.status);
339
+
340
+ // 4. Verify
341
+ const { run } = await runs.get({ id: run_id });
342
+ console.log(run.status); // "succeeded"
343
+ console.log(run.output?.summary);
344
+ ```
345
+
346
+ See [docs/AGENT-COOKBOOK.md section 1](../../docs/AGENT-COOKBOOK.md) for the full annotated walkthrough plus six more recipes (agent mode, Gmail trigger, cron schedule, webhook, approval gate, claude-skill port).
package/bin/floom-mcp ADDED
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env node
2
+ // Explicit Floom stdio MCP binary. The legacy workeros-mcp wrapper remains for
3
+ // older configs and npm installs.
4
+ import { main } from "../dist/server.js";
5
+ main().catch((/** @type {unknown} */ error) => {
6
+ const message = error instanceof Error ? error.message : String(error);
7
+ console.error(`floom-mcp failed: ${message}`);
8
+ process.exit(1);
9
+ });
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env node
2
+ // #596: previously this script only imported dist/server.js without calling
3
+ // main(). server.ts guards its main() call with an import.meta.url === argv[1]
4
+ // check — which is FALSE when the binary wrapper is the entry point because
5
+ // process.argv[1] is "bin/workeros-mcp", not "dist/server.js". The guard
6
+ // evaluated to false, main() was never called, and the process exited
7
+ // immediately. The MCP client received "Connection closed" before listTools.
8
+ import { main } from "../dist/server.js";
9
+ main().catch((/** @type {unknown} */ error) => {
10
+ const message = error instanceof Error ? error.message : String(error);
11
+ console.error(`workeros-mcp failed: ${message}`);
12
+ process.exit(1);
13
+ });
package/dist/cli.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env node
2
+ import { Command } from "commander";
3
+ import { type CommandName } from "./lib/command-name.js";
4
+ export declare function getPackageVersion(): string;
5
+ export declare function buildCliProgram(commandName?: CommandName): Command;
6
+ export declare function main(argv?: string[]): Promise<void>;