@invarn/cli 0.9.377 → 0.9.378

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 (38) hide show
  1. package/README.md +33 -71
  2. package/dist/THIRD-PARTY-LICENSES.txt +1 -1
  3. package/dist/capture/android/VERSION +1 -1
  4. package/dist/capture/android/capture-build.cjs +1 -1
  5. package/dist/capture/android/controller.cjs +1 -1
  6. package/dist/capture/android/index.cjs +1 -1
  7. package/dist/capture/android/invarn-agent-0.150.0.aar +0 -0
  8. package/dist/capture/android/verify-apk.cjs +1 -1
  9. package/dist/capture/ios/{InvarnAgent-0.105.0.dylib → InvarnAgent-0.106.0.dylib} +0 -0
  10. package/dist/capture/ios/InvarnComposeReader-0.106.0/VERSION +1 -0
  11. package/dist/capture/ios/{InvarnComposeReader-0.105.0.tar → InvarnComposeReader-0.106.0.tar} +0 -0
  12. package/dist/capture/ios/{InvarnFold-0.105.0 → InvarnFold-0.106.0} +0 -0
  13. package/dist/capture/ios/{InvarnHinge-0.105.0 → InvarnHinge-0.106.0} +0 -0
  14. package/dist/capture/ios/{InvarnQuit-0.105.0 → InvarnQuit-0.106.0} +0 -0
  15. package/dist/capture/ios/{InvarnReencode-0.105.0 → InvarnReencode-0.106.0} +0 -0
  16. package/dist/capture/ios/{InvarnSystemRunner-0.105.0.dylib → InvarnSystemRunner-0.106.0.dylib} +0 -0
  17. package/dist/capture/ios/VERSION +1 -1
  18. package/dist/capture/ios/capture-build.cjs +1 -1
  19. package/dist/capture/ios/controller.cjs +1 -1
  20. package/dist/capture/ios/index.cjs +1 -1
  21. package/dist/invarn.cjs +17 -17
  22. package/dist/sdk.d.mts +3 -2
  23. package/dist/sdk.mjs +38 -36
  24. package/package.json +1 -2
  25. package/dist/capture/android/invarn-agent-0.147.0.aar +0 -0
  26. package/dist/capture/ios/InvarnComposeReader-0.105.0/VERSION +0 -1
  27. package/dist/local-run-worker.mjs +0 -2
  28. /package/dist/capture/android/{invarn-init-0.147.0.gradle → invarn-init-0.150.0.gradle} +0 -0
  29. /package/dist/capture/android/{invarn-instrument-0.147.0.jar → invarn-instrument-0.150.0.jar} +0 -0
  30. /package/dist/capture/android/{invarn-reader-0.147.0.jar → invarn-reader-0.150.0.jar} +0 -0
  31. /package/dist/capture/ios/{InvarnComposeReader-0.105.0 → InvarnComposeReader-0.106.0}/invarn-compose.gradle +0 -0
  32. /package/dist/capture/ios/{InvarnComposeReader-0.105.0 → InvarnComposeReader-0.106.0}/scan.groovy +0 -0
  33. /package/dist/capture/ios/{InvarnComposeReader-0.105.0 → InvarnComposeReader-0.106.0}/src/Ivx.kt +0 -0
  34. /package/dist/capture/ios/{InvarnComposeReader-0.105.0 → InvarnComposeReader-0.106.0}/src/Zjq0.kt +0 -0
  35. /package/dist/capture/ios/{InvarnComposeReader-0.105.0 → InvarnComposeReader-0.106.0}/src/Zkq0.kt +0 -0
  36. /package/dist/capture/ios/{InvarnComposeReader-0.105.0 → InvarnComposeReader-0.106.0}/src/Zlq0.kt +0 -0
  37. /package/dist/capture/ios/{InvarnComposeReader-0.105.0 → InvarnComposeReader-0.106.0}/src/Zmq0.kt +0 -0
  38. /package/dist/capture/ios/{InvarnComposeReader-0.105.0 → InvarnComposeReader-0.106.0}/src/Zpq0.kt +0 -0
package/README.md CHANGED
@@ -23,7 +23,7 @@ It signs the machine in, matches the checkout to the project you created,
23
23
  writes the pipeline Invarn finishes for your commit (Invarn works the build
24
24
  variables out from the repository on GitHub, so commit and push first), finds
25
25
  the secrets already on this machine, **asks** before uploading any of them,
26
- then commits, pushes, and streams the first proof.
26
+ then commits, pushes, and streams the first build.
27
27
 
28
28
  | Flag | Effect |
29
29
  |---|---|
@@ -32,7 +32,7 @@ then commits, pushes, and streams the first proof.
32
32
  | `--no-push` | Write the files, stop before committing. |
33
33
  | `--no-build` | Stop after the push. |
34
34
  | `--import <path>` | Adopt an existing `bitrise.yml` instead of the generated pipeline. |
35
- | `--workflow <name>` | Which workflow the first proof runs. |
35
+ | `--workflow <name>` | Which workflow the first build runs. |
36
36
  | `--project-dir <path>` | Where the project is, when it is not at the repository root. |
37
37
  | `--module <gradle-path>` | Which module builds the app, for a repository that builds more than one. |
38
38
  | `--shared-module <gradle-path>` | Which module is the KMM shared module. |
@@ -113,16 +113,13 @@ invarn auth login --token inv_human_... # Direct token from the dashboard
113
113
  ### 2. Run a build
114
114
 
115
115
  ```bash
116
- # Submit an iOS / Android build on Invarn's infrastructure
116
+ # Start an iOS / Android build on Invarn's infrastructure
117
117
  invarn build run --pipeline .ci/pipelines/cibuild.yml --workflow primary
118
-
119
- # Or run a local pipeline on your own machine (via @invarn/cibuild)
120
- invarn run --pipeline .ci/pipelines/agent-verify.yml --workflow test
121
118
  ```
122
119
 
123
120
  ### 3. Let AI drive your CI
124
121
 
125
- Start the MCP server and your AI coding agent can register agents, run builds, and report results without leaving the conversation:
122
+ Start the MCP server and your AI coding agent can run builds, fetch their files, and look at your app and check it (capture) without leaving the conversation:
126
123
 
127
124
  ```bash
128
125
  invarn mcp serve
@@ -156,6 +153,8 @@ Or without a global install, using `npx` (always the newest published version):
156
153
 
157
154
  ## Commands
158
155
 
156
+ Twelve top-level commands; `invarn help` lists them with every option.
157
+
159
158
  | Command | Description |
160
159
  |---|---|
161
160
  | `invarn install` | Sign in if needed and add the MCP server to the AI clients on this computer |
@@ -165,20 +164,23 @@ Or without a global install, using `npx` (always the newest published version):
165
164
  | `invarn auth login --token <token>` | Authenticate with a token directly |
166
165
  | `invarn auth logout` | Remove stored credentials |
167
166
  | `invarn auth status` | Show current auth state |
168
- | `invarn build run --pipeline <path> --workflow <name>` | Submit a new proof |
169
- | `invarn build list [--state <s>]` | List recent proofs |
170
- | `invarn build status <build-id>` | Show proof details |
171
- | `invarn build logs <build-id>` | Stream proof logs |
172
- | `invarn build cancel <build-id>` | Cancel a running proof |
173
- | `invarn build retry <build-id>` | Retry a failed proof |
174
- | `invarn artifact list <build-id>` | List artifacts for a proof |
175
- | `invarn artifact download <build-id> [--out <dir>]` | Download artifact bundle |
176
- | `invarn secrets list [--pipeline <id>]` | List secrets at org or pipeline scope |
177
- | `invarn secrets set <KEY> [--pipeline <id>]` | Create or update a secret (stdin-only) |
178
- | `invarn secrets rm <KEY> [--pipeline <id>]` | Delete a secret |
179
- | `invarn vars list/set/rm` | Same as `secrets` for plaintext variables |
180
- | `invarn run --pipeline <path> [--workflow <name>]` | Run a local-* pipeline on this machine |
167
+ | `invarn setup` | Take this checkout from the web wizard to a running build (above) |
168
+ | `invarn detect` | Show the build variables Invarn works out for this checkout, then find the secrets on this machine and ask before uploading them |
169
+ | `invarn project create` / `disconnect` | Create this repository's project, or delete it |
170
+ | `invarn build run --pipeline <path> --workflow <name>` | Start a new build |
171
+ | `invarn build list [--state <s>]` | List recent builds |
172
+ | `invarn build status <build-id>` | Show a build's details |
173
+ | `invarn build logs <build-id>` | Stream a build's logs |
174
+ | `invarn build cancel <build-id>` | Cancel a running build |
175
+ | `invarn build retry <build-id>` | Retry a failed or canceled build |
176
+ | `invarn artifact list <build-id>` | List a build's artifacts |
177
+ | `invarn artifact download <build-id> [--out <dir>]` | Download a build's artifact bundle |
178
+ | `invarn capture evidence <session_id>` | Download a remote capture session's snapshots and screen recordings |
179
+ | `invarn capture native-test <module> <Class>` | Run one native Android test class once, from this checkout, on the running emulator |
181
180
  | `invarn mcp serve` | Start MCP server for AI agents |
181
+ | `invarn mcp tools [--json]` | List every MCP tool `mcp serve` exposes, capture tools included |
182
+ | `invarn version` | Print the CLI version (also `--version`, `-v`) |
183
+ | `invarn help` | List the commands and their options |
182
184
 
183
185
  ### Options
184
186
 
@@ -188,67 +190,27 @@ Or without a global install, using `npx` (always the newest published version):
188
190
  | `--no-follow` | Don't follow logs (snapshot only) |
189
191
  | `--out <dir>` | Output directory for downloads |
190
192
 
191
- ## Local pipelines
192
-
193
- Pipelines with `stack: local` run on your own machine via the embedded [`@invarn/cibuild`](https://www.npmjs.com/package/@invarn/cibuild) engine — no remote runner, no network round trip. Useful for fast iteration and for AI agents that need to verify changes before a push.
194
-
195
- ```yaml
196
- # .ci/pipelines/agent-verify.yml
197
- format_version: '1'
198
- meta:
199
- cibuild.io:
200
- stack: local
201
- workflows:
202
- test:
203
- steps:
204
- - script@1.0.0:
205
- inputs:
206
- content: npm ci && npm test
207
- ```
208
-
209
- ```bash
210
- invarn run --pipeline .ci/pipelines/agent-verify.yml --workflow test
211
- ```
212
-
213
193
  ## MCP server (for AI agents)
214
194
 
215
- `invarn mcp serve` exposes build, artifact, secret, and agent operations as MCP tools. It reads the login `invarn auth login` (or `invarn install`) saved on this computer, or `INVARN_TOKEN`. Without a login it still starts: the agent signs it in with `invarn_auth_login`, and every tool works in the same session afterwards, without a restart.
195
+ `invarn mcp serve` exposes build, artifact, capture and design operations as MCP tools. It reads the login `invarn auth login` (or `invarn install`) saved on this computer, or `INVARN_TOKEN`. Without a login it still starts: the agent signs it in with `invarn_auth_login`, and every tool works in the same session afterwards, without a restart.
216
196
 
217
197
  | Tool | Description |
218
198
  |---|---|
219
199
  | `invarn_auth_login` | Sign this MCP server in (opens the browser, or returns a code to approve on any device) |
220
- | `invarn_agent_find` | Search for an existing agent by intent/type |
221
- | `invarn_agent_register` | Register a new AI agent with its own pipeline |
222
- | `invarn_agent_list` | List all agents in the organization |
223
- | `invarn_agent_unregister` | Delete an agent |
224
- | `invarn_agent_run` | Run a workflow through an agent (local or remote) |
225
- | `invarn_agent_result` | Fetch build state, step progress, logs, artifacts |
226
200
  | `invarn_build_list` | List recent builds |
227
- | `invarn_build_logs` | Fetch log output for a build |
201
+ | `invarn_build_run` | Start a build of the project's pipeline on a branch (default: the one checked out) |
202
+ | `invarn_build_logs` | Read a build's log, about 24 KB per reply (its ending by default; `offset` and `tail_lines` read the rest) |
228
203
  | `invarn_build_cancel` | Cancel a running build |
229
204
  | `invarn_build_retry` | Retry a failed build |
230
205
  | `invarn_artifact_list` | List artifacts for a build |
231
- | `invarn_secrets_list` | List secret/variable metadata (never values) |
232
- | `invarn_secrets_set` | Create or update a secret or variable |
233
206
 
234
- Agents are AI-owned pipelines — created on demand by an orchestrator (Claude, Codex, Cursor, …), invoked by AI, and reported back into the conversation. Each agent has its own credentials, its own pipeline file, and short-lived session tokens scoped to one human user. Typical uses: compile the iOS/Android app, run unit tests, produce an IPA/APK, push a TestFlight build.
207
+ `invarn mcp tools` lists every tool the server exposes, the capture tools included.
235
208
 
236
- ## Secrets
237
-
238
- Secrets and variables are scoped to the org or a specific pipeline. Values are piped via stdin — never passed on argv (visible in shell history and `ps` output):
239
-
240
- ```bash
241
- echo "sk_live_..." | invarn secrets set STRIPE_KEY
242
- echo "sk_live_..." | invarn secrets set STRIPE_KEY --pipeline pipe_abc
243
- echo "sk_live_..." | invarn secrets set STRIPE_KEY --agent agt_xyz # scope to the agent's owned pipeline
244
- invarn secrets list
245
- invarn secrets list --agent agt_xyz
246
- invarn secrets rm STRIPE_KEY
247
- ```
209
+ Secrets are managed on the Invarn dashboard, never through MCP, so their values never pass through an agent's context.
248
210
 
249
- `--agent` and `--pipeline` are mutually exclusive. The agent variant is a convenience — the server resolves the agent's 1:1 pipeline internally, so you don't need to look up the pipeline id in the dashboard. Same applies to the `invarn_secrets_set` / `invarn_secrets_list` MCP tools (pass `agent_id`).
211
+ ## Secrets
250
212
 
251
- There is no read command — once set, values cannot be retrieved through the CLI or MCP.
213
+ `invarn setup` and `invarn detect` find the secrets your pipeline declares in this checkout (a `google-services.json`, a keystore, …) and **ask** before uploading them; run `invarn detect` again after adding one. Values are never printed. Secrets are managed in the project's settings on the Invarn dashboard.
252
214
 
253
215
  ## In-process SDK (for agent hosts)
254
216
 
@@ -260,7 +222,7 @@ import { createInvarnMcpServer } from '@invarn/cli/sdk'
260
222
 
261
223
  const invarn = createInvarnMcpServer({
262
224
  token: process.env.INVARN_API_KEY, // or INVARN_TOKEN env / disk profile
263
- tools: ['invarn_build_list', 'invarn_agent_run', 'invarn_agent_result'],
225
+ tools: ['invarn_build_run', 'invarn_build_list', 'invarn_build_logs'], // optional: every tool by default
264
226
  })
265
227
 
266
228
  for await (const msg of query({
@@ -268,9 +230,9 @@ for await (const msg of query({
268
230
  options: {
269
231
  mcpServers: { invarn },
270
232
  allowedTools: [
233
+ 'mcp__invarn__invarn_build_run',
271
234
  'mcp__invarn__invarn_build_list',
272
- 'mcp__invarn__invarn_agent_run',
273
- 'mcp__invarn__invarn_agent_result',
235
+ 'mcp__invarn__invarn_build_logs',
274
236
  ],
275
237
  },
276
238
  })) { /* ... */ }
@@ -282,7 +244,7 @@ for await (const msg of query({
282
244
  |---|---|---|
283
245
  | `token` | `process.env.INVARN_TOKEN` → disk profile | Invarn human API key (`inv_human_...`) |
284
246
  | `baseUrl` | `process.env.INVARN_URL` → `https://invarn.com` | Override for self-hosted deployments |
285
- | `tools` | all 13 | Allowlist by tool name. |
247
+ | `tools` | every tool it serves | Allowlist by tool name: `invarn_build_list`, `invarn_build_run`, `invarn_build_logs`, `invarn_build_cancel`, `invarn_build_retry`, `invarn_artifact_list`. A name it does not serve throws. |
286
248
  | `version` | CLI version | Reported as the MCP server version |
287
249
 
288
250
  Responses from the SDK path are JSON (`JSON.stringify(result, null, 2)` in a single text block), not the formatted prose the stdio CLI emits — LLMs parse structured data more reliably. The stdio server (`invarn mcp serve`) is unchanged.
@@ -1,6 +1,6 @@
1
1
  Invarn CLI (@invarn/cli) — third-party license notices
2
2
 
3
- The published bundles (invarn.cjs, sdk.mjs, local-run-worker.mjs) are minified
3
+ The published bundles (invarn.cjs, sdk.mjs) are minified
4
4
  and obfuscated, which strips inline license headers. This file reproduces the
5
5
  notices for every third-party package inlined into those bundles, as required
6
6
  by their licenses. Packages resolved at install time (e.g. @invarn/cibuild,
@@ -1 +1 @@
1
- 0.147.0
1
+ 0.150.0