@mightybot/mbcli 0.6.9-rc.877 → 0.6.10-dev.1002

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 (2) hide show
  1. package/README.md +35 -2
  2. package/package.json +6 -6
package/README.md CHANGED
@@ -106,7 +106,9 @@ agents. Auth flags pass through (e.g. `--base-url <your-platform-url>`).
106
106
  | `mb auth configure` | Set/switch the backend (base URL, environment). |
107
107
  | `mb auth probe-write` | Pre-flight check that the token can perform writes. |
108
108
 
109
- > `mb` has **one** profile slot the last `mb auth login` wins. Confirm the
109
+ > Inside a git repository `mb` uses that checkout's own `.mightybot.json`, so
110
+ > each worktree keeps its own backend and token. Outside one it falls back to a
111
+ > single global profile, where the last `mb auth login` wins. Confirm the
110
112
  > active backend with `mb auth inspect` before any write.
111
113
 
112
114
  ### `mb mcp` — local design-time MCP server
@@ -137,10 +139,41 @@ mb surface step # step-level detail
137
139
  | `mb workflow list` | List workflow definitions. |
138
140
  | `mb workflow inspect <id>` | Show a definition's full configuration. |
139
141
  | `mb workflow create` / `update` / `duplicate` / `delete` | Manage definitions. |
140
- | `mb workflow export <id>` | Export a definition (e.g. for diffing/backup). |
142
+ | `mb workflow export <id>` | Write a definition's config to a local file (for diffing/backup). |
143
+ | `mb workflow fork <id> --target-org <id-or-name>` | Copy a workflow into another organization you administer. Stages a background job. |
144
+ | `mb workflow export-job <job_id>` | Check one copy job. |
145
+ | `mb workflow jobs <id>` | List a workflow's recent copy/deploy/release jobs. |
141
146
  | `mb workflow diff` | Diff two definitions/versions. |
142
147
  | `mb workflow versions` / `version` / `version-history` / `version-diff` | Inspect version history and compare versions. |
143
148
 
149
+ **Three verbs copy a workflow — pick by destination.** `export` writes config to
150
+ your local disk. `duplicate` copies within the *same* organization. `fork` copies
151
+ *into another organization* you administer.
152
+
153
+ ```bash
154
+ # Copy into another org. Lands a DRAFT there with secrets blanked.
155
+ mb workflow fork expense-approver --target-org "Acme Corp"
156
+ # → {"status_code": 202, "body": {"export_job_id": "...", "status": "PENDING"}}
157
+ # Like every mb command, the response is wrapped — read .body.export_job_id:
158
+ mb workflow fork expense-approver --target-org "Acme Corp" | jq -r .body.export_job_id
159
+
160
+ # Block until the copy — and its Git sync — settles. Exits non-zero if it failed,
161
+ # so this works as a CI gate.
162
+ mb workflow fork expense-approver --target-org "Acme Corp" --wait
163
+
164
+ # Or poll it yourself.
165
+ mb workflow export-job <export_job_id>
166
+ mb workflow jobs expense-approver
167
+ ```
168
+
169
+ `--target-org` takes an organization id or an exact name. Omit it entirely to
170
+ stage a same-org export. Other flags: `--repo owner/name` (target workflow repo),
171
+ `--branch` (source branch to copy from), `--no-config` (shell only),
172
+ `--no-sync-to-git` (skip the Git branch sync).
173
+
174
+ Forking needs platform super-admin, or admin in **both** the source and target
175
+ organization, and the backend must run with `WORKFLOW_CROSS_ORG_EXPORT_ENABLED`.
176
+
144
177
  ### `mb git` — git ↔ workflow sync state
145
178
 
146
179
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mightybot/mbcli",
3
- "version": "0.6.9-rc.877",
3
+ "version": "0.6.10-dev.1002",
4
4
  "description": "MightyBot mb CLI and local MCP server",
5
5
  "bin": {
6
6
  "mb": "bin/mb.js"
@@ -15,11 +15,11 @@
15
15
  "license": "UNLICENSED",
16
16
  "private": false,
17
17
  "optionalDependencies": {
18
- "@mightybot/mbcli-darwin-arm64": "0.6.9-rc.877",
19
- "@mightybot/mbcli-darwin-x64": "0.6.9-rc.877",
20
- "@mightybot/mbcli-linux-x64": "0.6.9-rc.877",
21
- "@mightybot/mbcli-linux-arm64": "0.6.9-rc.877",
22
- "@mightybot/mbcli-win32-x64": "0.6.9-rc.877"
18
+ "@mightybot/mbcli-darwin-arm64": "0.6.10-dev.1002",
19
+ "@mightybot/mbcli-darwin-x64": "0.6.10-dev.1002",
20
+ "@mightybot/mbcli-linux-x64": "0.6.10-dev.1002",
21
+ "@mightybot/mbcli-linux-arm64": "0.6.10-dev.1002",
22
+ "@mightybot/mbcli-win32-x64": "0.6.10-dev.1002"
23
23
  },
24
24
  "homepage": "https://mightybot.ai"
25
25
  }