@b3os/cli 0.1.3 → 0.2.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 (42) hide show
  1. package/README.md +7 -3
  2. package/dist/commands/app.d.ts +7 -0
  3. package/dist/commands/app.js +922 -0
  4. package/dist/commands/app.js.map +1 -0
  5. package/dist/commands/auth.d.ts +18 -0
  6. package/dist/commands/auth.js +64 -17
  7. package/dist/commands/auth.js.map +1 -1
  8. package/dist/commands/manifest.d.ts +50 -0
  9. package/dist/commands/manifest.js +316 -24
  10. package/dist/commands/manifest.js.map +1 -1
  11. package/dist/commands/requests.d.ts +8 -1
  12. package/dist/commands/requests.js +42 -6
  13. package/dist/commands/requests.js.map +1 -1
  14. package/dist/commands/tool.d.ts +46 -0
  15. package/dist/commands/tool.js +197 -0
  16. package/dist/commands/tool.js.map +1 -0
  17. package/dist/main.d.ts +1 -1
  18. package/dist/main.js +7 -2
  19. package/dist/main.js.map +1 -1
  20. package/dist/manifest/apply.d.ts +83 -0
  21. package/dist/manifest/apply.js +125 -0
  22. package/dist/manifest/apply.js.map +1 -0
  23. package/dist/manifest/grant.d.ts +1 -0
  24. package/dist/manifest/grant.js +3 -0
  25. package/dist/manifest/grant.js.map +1 -0
  26. package/dist/manifest/load.d.ts +4 -141
  27. package/dist/manifest/load.js +24 -268
  28. package/dist/manifest/load.js.map +1 -1
  29. package/dist/manifest/plan.d.ts +1 -52
  30. package/dist/manifest/plan.js +3 -627
  31. package/dist/manifest/plan.js.map +1 -1
  32. package/dist/manifest/record.d.ts +98 -0
  33. package/dist/manifest/record.js +233 -0
  34. package/dist/manifest/record.js.map +1 -0
  35. package/dist/manifest/skip.d.ts +1 -0
  36. package/dist/manifest/skip.js +3 -0
  37. package/dist/manifest/skip.js.map +1 -0
  38. package/dist/manifest/source.d.ts +48 -0
  39. package/dist/manifest/source.js +223 -0
  40. package/dist/manifest/source.js.map +1 -0
  41. package/package.json +6 -6
  42. package/schemas/b3os.v0.schema.json +0 -244
package/README.md CHANGED
@@ -8,10 +8,10 @@ destructive command without `--yes` exits 2. An option takes the name of the req
8
8
  and subcommands (`--lifetime`, `routine deploy`, ...) still work.
9
9
  `b3os help <command> [<sub>]` (or `b3os <command> <sub> --help`) prints the help of one command or subcommand.
10
10
 
11
- Install `@b3os/cli` to get the `b3os` executable, or run a command with `npx -y @b3os/cli@0.1 <command>`.
11
+ Install `@b3os/cli` to get the `b3os` executable, or run a command with `npx -y @b3os/cli@0.2 <command>`.
12
12
 
13
13
  ```sh
14
- npm install --global @b3os/cli@0.1
14
+ npm install --global @b3os/cli@0.2
15
15
  b3os login # device login; stores a CLI token
16
16
  b3os scrape https://example.com # Markdown on stdout
17
17
  b3os screenshot https://example.com --out shot.png --frame browser-dark
@@ -80,11 +80,15 @@ routines that run as it and asks before it revokes the token (`--yes` without a
80
80
  | `requests [ls\|get <req_id>]` | your request log with timing (`--status 2xx\|4xx\|5xx`, `--product`, `--operation-id`, `--sandbox-id`, `--since`) |
81
81
  | `webhooks secret\|rotate\|test\|deliveries --url URL` | webhook signing secrets (printed once on stdout), rotation with a grace period, a signed test delivery |
82
82
  | `action search\|describe\|call` | marketplace actions (`call io.b3os/github/create-issue@1 --input @issue.json`) |
83
+ | `tool publish <dir>`, `tool earnings` | hosted tools (a preview, on for every organization in the beta; no tool is published yet): `publish` uploads a tool's build (`<dir>/dist/`, made by `node packages/packs/src/cli/tool.ts build`): the archive when the registry lacks it, then the pack, and prints each action's exact pin and a `b3os action call` line (a key with `actions:tools:publish`, named exactly, and `actions:write`); `earnings --namespace NS --period YYYY-MM` prints the month's earnings line with B3OS's rate and why |
83
84
  | `mcp install --client claude\|cursor\|codex` | adds the B3OS MCP server to the client (below) |
84
85
  | `mcp serve [--packs a,b] [--routines a,b\|all] [--toolsets a,b]` | the stdio MCP server in this process |
85
86
  | `mcp tools [--toolsets a,b]` | the tools the server lists (the shared table both MCP servers serve) |
86
87
  | `bench [ping\|scrape\|exec]` | a client-side latency probe from where you run it (below) |
87
88
  | `api <METHOD> <path>` | any operation, with `--data JSON\|@file`, `--query k=v`, `--header k=v`, `--edge`/`--node` |
89
+ | `apply [--file b3os.yaml]` | deploys a version 1 b3os.yaml: publishes its routines, builds and starts its services, and tags what it makes with the application's name (asks first; `--yes` without a terminal). `--dry-run` prints the plan and changes nothing; `--keepalive` (run on a schedule) renews each running service and recreates a lost one from the commit it ran; `--prune`, `--replace SERVICE`. A version 0 file only plans |
90
+ | `app status\|logs\|requests\|down\|rollback` | an applied application, found by that tag: its services with URL, lease, last call to B3OS and logs command; a service's output (`--follow`); the calls it made; `down --app NAME` deletes it; `rollback` deploys the commit before the current one again |
91
+ | `manifest validate\|schema` | checks a b3os.yaml offline; `schema --version 0\|1` prints its JSON Schema |
88
92
 
89
93
  ## Exit codes
90
94
 
@@ -111,7 +115,7 @@ object.
111
115
  ## MCP install
112
116
 
113
117
  `b3os mcp install --client claude|cursor|codex [--scope user|project] [--packs github,slack] [--routines daily-digest|all] [--toolsets routines]`
114
- adds an entry that runs `npx -y @b3os/mcp@0.1`, the CLI's own minor line (the core tools, plus the actions of `--packs` and the opt-in tools of
118
+ adds an entry that runs `npx -y @b3os/mcp@0.2`, the CLI's own minor line (the core tools, plus the actions of `--packs` and the opt-in tools of
115
119
  `--toolsets`: `sandboxes`, `vision`, `routines`, `infer`, `platform` or `all`; `b3os mcp tools` lists them). The server reads `B3OS_API_KEY` or the `b3os login` token itself, so the client's config holds no
116
120
  secret. Claude Code is configured through `claude mcp add` (or `.mcp.json` with `--scope project` when the `claude`
117
121
  CLI is missing), Cursor through `~/.cursor/mcp.json` (or `.cursor/mcp.json`), Codex through
@@ -0,0 +1,7 @@
1
+ import type { CliCommand } from "../registry.ts";
2
+ /**
3
+ * Whether `url` is what `b3os app open` may hand a browser: exactly `https://<label>.<app domain>/`, with at most a
4
+ * `?b3os_link=` of a link token's shape (apps/edge/src/apphosts/link.ts LINK_TOKEN).
5
+ */
6
+ export declare function openable(url: string, label: string): boolean;
7
+ export declare const commands: CliCommand[];