@uluops/cli 0.18.3 → 0.19.0

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.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,56 @@ All notable changes to `@uluops/cli` will be documented in this file.
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6
6
 
7
+ ## [0.19.0] - 2026-06-16
8
+
9
+ ### Dependencies
10
+
11
+ - **Bumped `@uluops/core` 0.22.1 → 0.22.7, `@uluops/registry-sdk` 0.32.1 → 0.35.0, `@uluops/ops-sdk` 3.2.1 → 3.3.0** (all exact). Pulls in the registry-sdk `ResponseValidationError` + safety/`riskProfile`/`RetranslateResult` root exports, and the sdk-core 0.13.0 runtime fixes (`retries: 0` makes one attempt with a typed error; actionable 401 with the server reason preserved; `isApiKey()` enforces minimum length) — all via the upgraded core/SDK chain. 460 tests green against the new versions.
12
+
13
+ ### Added
14
+
15
+ - **`ulu exec describe ... --version <v>` now fails closed** instead of silently printing the CLI version and exiting 0. Commander's program-level `-V/--version` is an immediate option that fires during parse (before any subcommand action or preAction hook), so a captive CI script that hardcoded `--version` against `describe` got the CLI version string + exit 0 rather than resolving the definition version. A pre-parse argv guard now detects this shadow and errors (exit 2) with a pointer to `--def-version` (or the `<name>@<version>` suffix). Bare `ulu --version` is untouched.
16
+ - **`ulu auth whoami --json` now emits the inferred credential source to stderr.** The default `--json` stdout shape stays frozen (adding a field is a breaking change under the JSON Output Stability Contract), but the most-captive population — CI debugging which identity authenticated — gets the source in the same invocation via stderr instead of being forced into a second non-JSON call.
17
+
18
+ ### Changed
19
+
20
+ - **`auth whoami` credential-source label is now "Credential Source (inferred)"** (was "Credential Source"). The label is re-derived from flags/env by mirroring sdk-core's precedence ladder, not reported by the SDK; the "(inferred)" qualifier makes that honest and prevents the label from reading as an authoritative readout that could silently drift if sdk-core's precedence changes.
21
+ - **`exec --report` wording corrected from "mutually exclusive" to "disables tracker submission."** The relationship is asymmetric (report mode silently wins and forces no-tracking, with no hard-error guard even when `--project` is set), not a symmetric mutual-exclusion. README, option help, and the inline comment are reconciled.
22
+ - **The "Report mode enabled — tracking disabled" notice now survives `-q`** when tracking intent is explicit (`--project` or `ULUOPS_PROJECT`). Previously `--report --project X -q` (the CI shape) got neither a tracker record nor the disclosure that explains why.
23
+ - **`--exec-timeout` help corrected**: removed the unreachable/mislabeled "5m SDK fallback" precedence tier (exec's `--timeout` always provides a 600s/10min default, so the fallback can never be reached). Precedence now reads `--exec-timeout > definition default > --timeout (default 600s/10min)`.
24
+ - **`ulu issues history` now ships an examples help block** (`--help`), matching the other `issues` subcommands.
25
+
26
+ ### Fixed
27
+
28
+ - Picker-mode `--json` output (`ulu issues history --project <slug>`, kind `issue.historyList`) now has a contract-anchor test pinning its bare-array shape and DESC-by-`updatedAt` sort.
29
+
30
+ ### Internal
31
+
32
+ - Renamed a shadowing `issues` local in the history picker action to `recentIssues` (was shadowing the outer `issues` command builder).
33
+ - Test suite 460 cases (was 454): +2 whoami (inferred label + stderr-in-json), +5 `--version` shadow guard, +1 picker-`--json` anchor, report-notice test split into intent/no-intent paths.
34
+
35
+ ## [0.18.4] - 2026-06-16
36
+
37
+ ### Changed
38
+
39
+ - `runs list`/`details`/`archive`/`update` and `issues list` now declare the project as a required positional (`<project>`) instead of optional (`[project]`), so Commander reports a clear "missing required argument" error instead of falling through to a fallback message.
40
+ - Bumped `@uluops/core` to `0.22.1`.
41
+
42
+ ### Fixed
43
+
44
+ - `exec` misplaced-option correction hint no longer appends a `<value>` placeholder for boolean inherited flags (e.g. `--no-tracking`, `--no-safety-warnings`); the placeholder now appears only for value-taking flags (`--project`, `--local-definitions`).
45
+ - `resolveProject` "no project specified" error now points to the positional-argument form instead of a `--project` flag that those commands do not accept.
46
+ - `issues list --priority` help and README now list the correct values (`critical`, `high`, `suggested`, `backlog`) — `high` was missing and the unsupported `all` was removed.
47
+
48
+ ### Documentation
49
+
50
+ - Corrected all `exec` examples (README and command help) for the v0.16.0 argument-order change — parent options (`--project`, `--no-tracking`, `--local-definitions`) now appear before the subcommand.
51
+ - Fixed stale help-text examples: `runs details -n`, `runs save --project`, `def list --search`, and `issues close --reason` (removed the nonexistent `--status` flag).
52
+ - Documented previously-undocumented surfaces: `--json-envelope`, `ULUOPS_PROJECT`, `ULUOPS_MAX_CONCURRENCY`, `definitions update` options (`--change-type`, `--visibility`, `--display-name`, `--description`), `runs details -n`, `runs archive --before-date`, and `definitions list` filters (`--domain`, `--limit`, `--offset`).
53
+ - Clarified that `runs validate` previews against the live tracker and requires auth; added `ANTHROPIC_API_KEY` to the Quick Start at point of use.
54
+ - Documented `def get -m/--model`, `definitions create --visibility`, and the `issues list --all` shorthand; added a model-targeted render example.
55
+ - Shell-completion setup now uses `eval "$(ulu completion <shell>)"`, matching the tool's own `--help` and generated-script guidance.
56
+
7
57
  ## [0.18.3] - 2026-06-15
8
58
 
9
59
  ### Added
@@ -234,9 +284,6 @@ Suite 414 → 417. Build + typecheck + lint clean.
234
284
  - `note` events with note type, author, and a truncated content body
235
285
  A `⚠ Truncated to most recent N of M events` warning surfaces when the server applies the 1000-event ceiling.
236
286
  - **BREAKING (JSON output):** `--json ulu issues history` now emits the `IssueHistoryEnvelope` shape (`{issueId, events, totalEvents, truncated}`) instead of a flat `StatusHistory[]`. Scripts consuming `result[0]` or `Array.isArray(result)` need to switch to `result.events`. The bare-array shape was lossy on F10 (occurrences + notes were dropped on the server side, then undo destroyed status rows) so most real consumers were already getting `[]` before the fix landed.
237
-
238
- ### Changed
239
-
240
287
  - **`ulu deps get` / `ulu deps dependents` now render the real envelope shapes** (live-tests T2 §3.5, R12). registry-sdk v0.31.0 fixed both endpoints to return real structured graphs/lists instead of the silent `{}` they used to parse to. The CLI used to defend against the broken contract with `data.nodes ?? data.flat ?? []` fallbacks; that scaffolding is gone. `deps get` now prints a flat indented list by default (each line tagged with its `(depth N)`) and accepts `--tree` to render the recursive graph as an indented tree with `[context]` labels per edge (`[invokes.agent]`, `[stage "Final Checks"]`, `[dependencies.requires]`, etc). `deps dependents` now shows `← context` arrows so operators can see which reference type each consumer uses.
241
288
  - Removed: the unused `cycleDetected` / `cycles` warning — the registry API never tracked those.
242
289
 
@@ -315,6 +362,7 @@ Suite 414 → 417. Build + typecheck + lint clean.
315
362
  - **Warning when `--project` is omitted with tracking enabled.** `exec run`, `exec agent`, `exec command`, `exec workflow`, and `exec pipeline` now print a stderr advisory showing the project name the SDK would silently infer from `basename(resolve(target))` and pointing to `--project` or `--no-tracking`. Suppressed under `--quiet`, `--json`, when `ULUOPS_PROJECT` is set, or when the operator passes `--project` explicitly. Surfaces the phantom-project class of bug (`exec agent foo ./src` creating a project literally named `src`) without breaking the one-line ad-hoc invocation pattern. The structural fix lives in `ops-uluops-api` issue `76f1c7e6`.
316
363
  - **Inherited options now visible on `exec` subcommand help.** `ulu exec agent --help`, `ulu exec pipeline --help`, etc. now list `--project`, `--no-tracking`, `--no-safety-warnings`, `--local-definitions`, `--registry-url` as inherited from the parent `exec` command, plus a pointer to global flags. Previously these were invisible in subcommand help, leading operators to believe tracking and project-scoping weren't available on the subcommand they were looking at.
317
364
  - **Default exec timeout: 10 minutes.** `createCoreContext` now passes `timeout: 600_000` to `UluOpsClient` when `--timeout` is not specified, overriding the SDK's internal 5-minute fallback with a single predictable CLI-owned ceiling that accounts for model cold-start and long agent execution. Ops/registry HTTP timeout remains 30s. `--timeout` help text updated to reflect both defaults.
365
+ - **`zod@4.3.6` added as a direct dependency** (exact pin, matching `@uluops/ops-sdk`'s pin) to back the new `runs update` input schema.
318
366
 
319
367
  ### Changed
320
368
 
@@ -331,10 +379,6 @@ Suite 414 → 417. Build + typecheck + lint clean.
331
379
 
332
380
  - **`@uluops/sdk-core` no longer listed as a direct dependency.** Verified unimported in `src/`/`test/`; remains transitively available via `@uluops/ops-sdk` and `@uluops/registry-sdk`.
333
381
 
334
- ### Added
335
-
336
- - **`zod@4.3.6` added as a direct dependency** (exact pin, matching `@uluops/ops-sdk`'s pin) to back the new `runs update` input schema.
337
-
338
382
  ### Internal
339
383
 
340
384
  - 20 new tests across `test/utils.test.ts` (writeFileAtomic — 6), `test/commands/exec.test.ts` (`exec pipeline` happy/prompt/JSON/error paths plus `warnIfProjectInferred` 7-case matrix — 11), and `test/commands/runs.test.ts` (Zod validation — 4). Test suite now 394 cases.
package/README.md CHANGED
@@ -25,6 +25,7 @@ export ULUOPS_API_KEY=ulr_your-api-key-here
25
25
  # Create a project and save a validation run
26
26
  ulu projects create my-project
27
27
  ulu runs save --file results.json
28
+ # → Run #1 saved for my-project (3 agents, 12 recommendations)
28
29
 
29
30
  # Browse issues
30
31
  ulu issues list my-project --status open --priority critical
@@ -32,8 +33,11 @@ ulu issues list my-project --status open --priority critical
32
33
  # Check analytics
33
34
  ulu analytics burndown --project my-project --days 30
34
35
 
35
- # Run a validator agent
36
- ulu exec agent code-validator -t ./src --model sonnet --project my-project
36
+ # Run a validator agent (requires ANTHROPIC_API_KEY; parent options like
37
+ # --project come BEFORE the subcommand)
38
+ export ANTHROPIC_API_KEY=sk-ant-your-key-here
39
+ ulu exec --project my-project agent code-validator -t ./src --model sonnet
40
+ # → code-validator: PASS (score 92) — results tracked under my-project
37
41
  ```
38
42
 
39
43
  ## Table of Contents
@@ -151,11 +155,12 @@ The CLI resolves credentials in this order:
151
155
 
152
156
  Every command accepts these flags:
153
157
 
154
- ```
158
+ ```text
155
159
  --api-key <key> Override API key (env: ULUOPS_API_KEY)
156
160
  --profile <name> Config profile to use (default: 'default')
157
161
  --timeout <ms> Request timeout in milliseconds (default: 30000 for ops/registry, 600000 for exec)
158
162
  --json Output raw JSON for scripting
163
+ --json-envelope Wrap --json output in the versioned stability envelope (same as ULU_JSON_SCHEMA=1)
159
164
  --debug Enable debug output
160
165
  -q, --quiet Suppress spinners and non-essential output
161
166
  -V, --version Show CLI version
@@ -181,7 +186,7 @@ ulu auth update-profile # Update profile (display name, bio, avatar)
181
186
  ulu auth sessions list # List active sessions
182
187
  ulu auth sessions revoke <id> # Revoke a session
183
188
  ulu auth api-keys list # List API keys
184
- ulu auth api-keys create # Create new API key
189
+ ulu auth api-keys create # Create new API key (--name, --expires <ISO date>)
185
190
  ulu auth api-keys revoke <id> # Revoke an API key
186
191
  ```
187
192
 
@@ -191,6 +196,7 @@ ulu auth api-keys revoke <id> # Revoke an API key
191
196
  # Register and create an API key
192
197
  ulu auth register --email user@example.com --password mypassword
193
198
  ulu auth api-keys create --name "CI Pipeline"
199
+ ulu auth api-keys create --name "CI Pipeline" --expires 2026-12-31 # optional expiry
194
200
  # Save this key: ulr_abc123... (shown once)
195
201
 
196
202
  # Login interactively
@@ -247,12 +253,12 @@ Validation run management — save, compare, and archive pipeline results. Alias
247
253
  ulu runs list <project> # List runs (--workflow, --limit)
248
254
  ulu runs get <runId> # Get run by UUID
249
255
  ulu runs latest <project> # Get latest run (--workflow)
250
- ulu runs details <project> # Detailed run with agents/recommendations
251
- ulu runs save # Save run from JSON (--file or --stdin)
252
- ulu runs validate # Dry run — preview without saving
256
+ ulu runs details <project> # Detailed run with agents/recommendations (-n for a specific run number)
257
+ ulu runs save # Save run from JSON (--file or --stdin; -p/-w override input fields)
258
+ ulu runs validate # Dry run — preview against the live tracker (requires auth; -p/-w override)
253
259
  ulu runs diff <project> # Compare two runs (--base, --compare)
254
- ulu runs archive <project> # Archive old runs (--before-run, --keep-last)
255
- ulu runs update <project> # Update run metadata (--number, --score, --file)
260
+ ulu runs archive <project> # Archive old runs (--before-run, --before-date, --keep-last, --reason)
261
+ ulu runs update <project> # Update run metadata (--number, --score, --passed, --file)
256
262
  ulu runs delete <runId> # Delete a run
257
263
  ```
258
264
 
@@ -265,6 +271,9 @@ ulu runs save --file validation-results.json
265
271
  # Save from stdin (pipe from another tool)
266
272
  cat results.json | ulu runs save --stdin
267
273
 
274
+ # Override the project or workflow type in the JSON without editing the file (handy in CI)
275
+ ulu runs save --file results.json -p override-project -w post-implementation
276
+
268
277
  # Dry run to preview what would happen
269
278
  ulu runs validate --file results.json
270
279
 
@@ -279,6 +288,9 @@ ulu runs archive my-project --keep-last 10
279
288
 
280
289
  # Update token counts on a run after the fact
281
290
  ulu runs update my-project --number 5 --file token-update.json
291
+
292
+ # Set the gates-passed flag on a run after the fact
293
+ ulu runs update my-project --number 5 --passed true
282
294
  ```
283
295
 
284
296
  > **Note:** `runs update --score` is rejected on finalized runs ("Cannot rewrite averageScore"). Use the `--file` form to patch per-agent fields. Each agent entry in the file must include `name` and `decision` (any other fields like `tokens` are merged into the existing record).
@@ -326,15 +338,15 @@ Issue tracking and management. Alias: `i`.
326
338
  ```bash
327
339
  ulu issues list <project> # List issues with filters
328
340
  ulu issues get <id> # Get issue (--full for occurrences/notes)
329
- ulu issues search # Search across projects (--query)
330
- ulu issues create # Create user-submitted issue
341
+ ulu issues search # Search across projects (--query, --projects to scope)
342
+ ulu issues create # Create user-submitted issue (--failure-code, --domain link to taxonomy)
331
343
  ulu issues update <id> # Update status (--status, --reason)
332
344
  ulu issues close <id> # Mark as completed (--reason)
333
345
  ulu issues edit <id> # Edit metadata (--title, --severity, etc.)
334
346
  ulu issues add-note <id> # Add note (--message, --type)
335
347
  ulu issues history <id> # Show timeline by UUID
336
348
  ulu issues history <fingerprint> --project <slug> # Resolve fingerprint then show timeline
337
- ulu issues history --project <slug> # Picker: list recent issues, then drill in
349
+ ulu issues history --project <slug> # Picker: list recent issues (--limit), then drill in
338
350
  ulu issues undo <id> # Undo last status change
339
351
  ulu issues restore <id> # Restore soft-deleted issue
340
352
  ulu issues bulk-update # Bulk update statuses (--ids, --status)
@@ -348,15 +360,19 @@ ulu issues update-by-fingerprint <fp> --project <name> # Update by fingerprint
348
360
  # List open critical issues
349
361
  ulu issues list my-project --status open --priority critical
350
362
 
351
- # Search across all projects
363
+ # Search across all projects (or scope to specific ones with --projects)
352
364
  ulu issues search --query "authentication" --status open
365
+ ulu issues search --query "timeout" --projects my-app,my-api
353
366
 
354
- # Create an issue manually
367
+ # Create an issue manually. Pass --failure-code and --domain to link it into
368
+ # the failure taxonomy — without them the issue is excluded from domain/code analytics.
355
369
  ulu issues create --project my-project \
356
370
  --title "SQL injection in login" \
357
371
  --priority critical \
358
372
  --severity critical \
359
373
  --type security \
374
+ --failure-code SEM-VAL/H \
375
+ --domain SEM \
360
376
  --file-path src/auth/login.ts \
361
377
  --line 45
362
378
 
@@ -390,10 +406,12 @@ ulu issues history a1b2c3d4 --project my-project # then drill in by fingerprint
390
406
  | Flag | Values |
391
407
  |------|--------|
392
408
  | `--status` | `open`, `completed`, `deferred`, `wontfix`, `all` |
393
- | `--priority` | `critical`, `suggested`, `backlog`, `all` |
409
+ | `--all` | Shorthand for `--status all` |
410
+ | `--priority` | `critical`, `high`, `suggested`, `backlog` |
394
411
  | `--severity` | `critical`, `high`, `medium`, `low`, `info` |
395
412
  | `--agent` | Any agent name (e.g., `code-validator`) |
396
413
  | `--domain` | `STR`, `SEM`, `PRA`, `EPI` |
414
+ | `--include-resolved` | Include resolved (completed/wontfix/deferred) issues in results |
397
415
  | `--limit` | Max results (default: 50) |
398
416
 
399
417
  ---
@@ -409,7 +427,7 @@ ulu analytics hotspots # Files with most issues
409
427
  ulu analytics burndown # Taxonomy burndown time series
410
428
  ulu analytics velocity # Rate of change per failure mode
411
429
  ulu analytics discovery # New vs recurring issues timeline
412
- ulu analytics matrix # Agent-taxonomy coverage matrix
430
+ ulu analytics matrix # Agent-taxonomy coverage matrix (--min-issues to threshold)
413
431
  ulu analytics resolution # Issue resolution rates by project (cross-project; no --project flag)
414
432
  ulu analytics taxonomy # Taxonomy distribution
415
433
  ulu analytics full-taxonomy # Full taxonomy analytics breakdown
@@ -436,6 +454,7 @@ ulu analytics discovery --project my-project --group-by week
436
454
 
437
455
  # Coverage gaps — which domains lack agent coverage?
438
456
  ulu analytics matrix --project my-project
457
+ ulu analytics matrix --project my-project --min-issues 3 # only failure modes seen 3+ times
439
458
 
440
459
  # Reliability — which agents have high false positive rates?
441
460
  ulu analytics reliability --days 90
@@ -460,14 +479,14 @@ Displays the four failure domains (STR, SEM, PRA, EPI), their failure modes, sev
460
479
  Workflow definition management (registry API). Alias: `def`.
461
480
 
462
481
  ```bash
463
- ulu definitions list # List definitions (--type, --status, --search)
464
- ulu definitions get <type> <name> [version] # Get definition (--yaml, --rendered, --target, -o)
465
- ulu definitions create <type> <name> # Create draft (--file)
466
- ulu definitions update <type> <name> <ver> # Update draft (--file)
482
+ ulu definitions list # List definitions (--type, --status, --search, --domain, --visibility, --limit, --offset)
483
+ ulu definitions get <type> <name> [version] # Get definition (--yaml, --rendered, --target, --render-profile, --include-runtime, -m/--model, -o)
484
+ ulu definitions create <type> <name> # Create draft (--file, --visibility public|private)
485
+ ulu definitions update <type> <name> <ver> # Update draft (--file, --display-name, --description, --visibility); --change-type major|minor|patch creates a new version from a published one
467
486
  ulu definitions publish <type> <name> <ver> # Publish definition
468
487
  ulu definitions deprecate <type> <name> <ver> # Deprecate (--reason, --successor)
469
488
  ulu definitions validate [type] # Validate YAML (--file, type auto-detected)
470
- ulu definitions render [type] # Render YAML preview (--file, type auto-detected)
489
+ ulu definitions render [type] # Render YAML preview (--file, --render-profile core|uluops-full, type auto-detected)
471
490
  ulu definitions delete <type> <name> <ver> # Delete draft (--yes)
472
491
  ```
473
492
 
@@ -491,6 +510,9 @@ ulu def get agent code-validator --rendered
491
510
  # Render for a specific harness (claude-code, opencode, codex, gemini-cli)
492
511
  ulu def get agent code-validator --rendered --target opencode
493
512
 
513
+ # Render for a harness with a model-specific override
514
+ ulu def get agent code-validator --rendered --target gemini-cli -m gemini-2.5-pro
515
+
494
516
  # Write rendered output to file instead of stdout
495
517
  ulu def get agent code-validator --rendered -o ./code-validator.md
496
518
 
@@ -498,6 +520,9 @@ ulu def get agent code-validator --rendered -o ./code-validator.md
498
520
  ulu def validate --file my-agent.agent.yaml
499
521
  ulu def render --file my-agent.agent.yaml
500
522
 
523
+ # Render with the full UluOps profile (platform preamble) instead of the lean core profile
524
+ ulu def render --file my-agent.agent.yaml --render-profile uluops-full
525
+
501
526
  # Create, validate, and publish a new agent
502
527
  ulu def validate agent --file my-agent.yaml
503
528
  ulu def create agent my-agent --file my-agent.yaml
@@ -561,7 +586,7 @@ Definition forking and lineage.
561
586
 
562
587
  ```bash
563
588
  ulu forks list <type> <name> <version> # List forks
564
- ulu forks create <type> <name> <version> # Fork definition (--fork-name)
589
+ ulu forks create <type> <name> <version> # Fork definition (--fork-name, --visibility, --display-name, --description)
565
590
  ulu forks check <type> <name> <version> # Check if forkable
566
591
  ulu forks lineage <type> <name> <version> # Show fork ancestry chain
567
592
  ```
@@ -616,7 +641,7 @@ ulu exec command my-command ./src
616
641
  ulu exec workflow post-implementation ./
617
642
 
618
643
  # Execute a multi-stage pipeline
619
- ulu exec pipeline foundations ./ --project my-project
644
+ ulu exec --project my-project pipeline foundations ./
620
645
 
621
646
  # List available definitions
622
647
  ulu exec list # All definitions
@@ -676,7 +701,7 @@ ulu exec describe --type pipeline # No name + --type → f
676
701
  | `--threshold-warn <n>` | Warning threshold score (agents) |
677
702
  | `--hash <sha256:...>` | **Optional.** Pin the expected YAML hash (from a trusted channel). Verifies the resolved definition source + config before executing; refuses on mismatch (**exit 4**). |
678
703
  | `--prompt-hash <sha256:...>` | **Optional.** Pin the expected rendered-prompt hash. Pair with `--hash` for full agent executed-prompt integrity. Both pins are opt-in — omitting them runs unverified as before. Refuses on mismatch (**exit 4**). |
679
- | `--report [path]` | Write a human-readable, publication-quality report to file (single agent only). With no path, defaults to `./<agent>-report-<YYYYMMDDTHHmmss>.md` in cwd. Injects a report-mode directive into the agent's prompt and disables structured-output enforcement so the model can emit prose. **Mutually exclusive with tracker submission** (implies `--no-tracking`): the schema-validated path the tracker depends on is no longer guaranteed under report mode. Run without `--report` for tracker submission. |
704
+ | `--report [path]` | Write a human-readable, publication-quality report to file (single agent only). With no path, defaults to `./<agent>-report-<YYYYMMDDTHHmmss>.md` in cwd. Injects a report-mode directive into the agent's prompt and disables structured-output enforcement so the model can emit prose. **Disables tracker submission** (implies `--no-tracking`): the schema-validated path the tracker depends on is no longer guaranteed under report mode, so `--report` silently wins over `--project` rather than erroring. With `--project` (or `ULUOPS_PROJECT`) set, a "tracking disabled" notice prints even under `-q`. Run without `--report` for tracker submission. |
680
705
  | `-o, --output <path>` | Explicit output path for `--report` (overrides the `--report` argument and the default) |
681
706
  | `--features-list <path>` | Write structured features/recommendations to file (single agent only) |
682
707
 
@@ -697,7 +722,7 @@ ulu exec describe --type pipeline # No name + --type → f
697
722
 
698
723
  ```bash
699
724
  # Run code-validator with a specific model
700
- ulu exec agent code-validator -t . --model sonnet --project my-project
725
+ ulu exec --project my-project agent code-validator -t . --model sonnet
701
726
 
702
727
  # Generator: tell the agent what to create
703
728
  ulu exec agent aristotle-generator -t ./src \
@@ -708,9 +733,8 @@ ulu exec agent security-analyst -t ./src \
708
733
  -p "Focus on the authentication middleware and JWT handling"
709
734
 
710
735
  # Use local definitions instead of registry
711
- ulu exec agent my-validator -t ./src \
712
- --local-definitions ./agent-defs \
713
- --project my-project
736
+ ulu exec --project my-project --local-definitions ./agent-defs \
737
+ agent my-validator -t ./src
714
738
 
715
739
  # Produce a publication-quality report (cwd default destination)
716
740
  ulu exec agent wittgenstein-analyst -t ./docs --report
@@ -719,7 +743,7 @@ ulu exec agent wittgenstein-analyst -t ./docs --report
719
743
  ulu exec agent wittgenstein-analyst -t ./docs --report -o ~/my-report.md
720
744
 
721
745
  # Execute without tracking results
722
- ulu exec workflow ship ./packages/api --no-tracking
746
+ ulu exec --no-tracking workflow ship ./packages/api
723
747
 
724
748
  # Inspect what a definition expects
725
749
  ulu exec describe code-validator
@@ -743,7 +767,7 @@ ulu exec agent code-validator -t ./src \
743
767
  Execution tracking for definitions.
744
768
 
745
769
  ```bash
746
- ulu executions record <type> <name> <version> # Record execution (--source)
770
+ ulu executions record <type> <name> <version> # Record execution (--source, --run-id for idempotency)
747
771
  ulu executions stats <type> <name> <version> # Get statistics (--window)
748
772
  ```
749
773
 
@@ -766,11 +790,11 @@ ulu translation upgrade <type> <name> # Upgrade legacy YAML (--file)
766
790
  Generate shell completion scripts.
767
791
 
768
792
  ```bash
769
- # Bash
770
- ulu completion bash >> ~/.bashrc
793
+ # Bash — add to ~/.bashrc
794
+ echo 'eval "$(ulu completion bash)"' >> ~/.bashrc
771
795
 
772
- # Zsh
773
- ulu completion zsh >> ~/.zshrc
796
+ # Zsh — add to ~/.zshrc
797
+ echo 'eval "$(ulu completion zsh)"' >> ~/.zshrc
774
798
 
775
799
  # Fish
776
800
  ulu completion fish > ~/.config/fish/completions/ulu.fish
@@ -858,12 +882,13 @@ through the single `emitJson()` chokepoint. To change an output shape you must:
858
882
  | Variable | Description | Default |
859
883
  |----------|-------------|---------|
860
884
  | `ULUOPS_API_KEY` | API key for authentication | - |
885
+ | `ULUOPS_PROJECT` | Project name for `ulu exec` result tracking when `--project` is not passed (useful in CI) | - |
861
886
  | `ULUOPS_EMAIL` | Email for session auth | - |
862
887
  | `ULUOPS_PASSWORD` | Password for session auth | - |
863
- | `ULUOPS_BASE_URL` | API base URL (overrides the built-in default) | `https://api.uluops.ai/api/v1` (production); `http://localhost:3100/api/v1` only when `NODE_ENV=development` |
864
888
  | `ULUOPS_DEBUG` | Enable debug logging (also expands the global unhandled-error handler's output) | `false` |
865
889
  | `ULU_JSON_SCHEMA` | Set to `1` to wrap `--json` output in the versioned stability envelope | - |
866
890
  | `ANTHROPIC_API_KEY` | API key for AI model execution (required for `ulu exec` commands) | - |
891
+ | `ULUOPS_MAX_CONCURRENCY` | Engine-wide cap on concurrent in-flight LLM calls for `ulu exec` (distinct from `exec agent -c/--concurrency`); honored by `@uluops/core` | `8` |
867
892
  | `ULUOPS_THINKING_BUDGET` | Token budget for extended thinking (optional) | - |
868
893
 
869
894
  Create a `.env` file in your project directory:
package/dist/cli.js CHANGED
@@ -11,7 +11,7 @@ import { registerCompletionCommands } from './commands/completion.js';
11
11
  import { registerDefinitionCommands } from './commands/definitions.js';
12
12
  import { registerDepsCommands } from './commands/deps.js';
13
13
  // Core SDK commands
14
- import { registerExecCommands } from './commands/exec.js';
14
+ import { guardShadowedVersionFlag, registerExecCommands, } from './commands/exec.js';
15
15
  import { registerExecutionCommands } from './commands/executions.js';
16
16
  import { registerForkCommands } from './commands/forks.js';
17
17
  import { registerIssueCommands } from './commands/issues.js';
@@ -106,6 +106,10 @@ registerCompletionCommands(program);
106
106
  program.action(() => {
107
107
  program.help();
108
108
  });
109
+ // Catch the `--version` shadow trap before Commander's immediate version
110
+ // handler fires during parse (`exec describe ... --version <v>` would otherwise
111
+ // silently print the CLI version and exit 0).
112
+ guardShadowedVersionFlag();
109
113
  // Parse and execute
110
114
  program.parse();
111
115
  //# sourceMappingURL=cli.js.map
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,qDAAqD;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AACpE,eAAe;AACf,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,0BAA0B;AAC1B,OAAO,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AACtE,oBAAoB;AACpB,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,oBAAoB;AACpB,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,C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,mBAAmB,CAAC,OAAO,CAAC,CAAC;AAC7B,qBAAqB,CAAC,OAAO,CAAC,CAAC;AAC/B,yBAAyB,CAAC,OAAO,CAAC,CAAC;AAEnC,wBAAwB,CAAC,OAAO,CAAC,CAAC;AAElC,oBAAoB;AACpB,0BAA0B,CAAC,OAAO,CAAC,CAAC;AACpC,uBAAuB,CAAC,OAAO,CAAC,CAAC;AACjC,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAC9B,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAC9B,qBAAqB,CAAC,OAAO,CAAC,CAAC;AAC/B,yBAAyB,CAAC,OAAO,CAAC,CAAC;AACnC,2BAA2B,CAAC,OAAO,CAAC,CAAC;AACrC,wBAAwB,CAAC,OAAO,CAAC,CAAC;AAElC,oBAAoB;AACpB,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAE9B,0BAA0B;AAC1B,0BAA0B,CAAC,OAAO,CAAC,CAAC;AAEpC,6CAA6C;AAC7C,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE;IAClB,OAAO,CAAC,IAAI,EAAE,CAAC;AACjB,CAAC,CAAC,CAAC;AAEH,yEAAyE;AACzE,gFAAgF;AAChF,8CAA8C;AAC9C,wBAAwB,EAAE,CAAC;AAE3B,oBAAoB;AACpB,OAAO,CAAC,KAAK,EAAE,CAAC"}
@@ -1,19 +1,27 @@
1
1
  import type { Command } from 'commander';
2
2
  /**
3
- * Resolve which credential SOURCE the SDK used, by mirroring the exact
4
- * precedence ladder in @uluops/sdk-core loadCredentials (explicit flag > env
5
- * vars > stored profile). Returns a human-readable LABEL only never the
6
- * credential value matching the codebase's no-secret-leak discipline
7
- * (sdk-core's loader deliberately avoids echoing credential-file content).
3
+ * INFER which credential source the precedence resolution would select, by
4
+ * re-deriving the same ladder @uluops/sdk-core loadCredentials uses (explicit
5
+ * flag > env vars > stored profile). This is an INFERENCE, not an observation:
6
+ * loadCredentials returns the resolved credential but NOT which tier it came
7
+ * from, so this label is reconstructed from globalOpts + env and is never
8
+ * reported by the SDK. It is surfaced to users as "Credential Source (inferred)"
9
+ * precisely so it is not mistaken for an authoritative SDK readout. Returns a
10
+ * human-readable LABEL only — never the credential value — matching the
11
+ * codebase's no-secret-leak discipline (sdk-core's loader deliberately avoids
12
+ * echoing credential-file content).
8
13
  *
9
14
  * `.env` files are loaded into process.env at startup (loadEnvFiles), so a
10
15
  * credential set via .env is reported as an environment variable — there is no
11
16
  * separate ".env" tier to distinguish at this layer.
12
17
  *
13
- * This MIRRORS sdk-core; if that precedence changes, update both. Each tier is
14
- * pinned by a unit test. Only reached after createOpsContext has confirmed
15
- * credentials resolved (requireCredentials exits otherwise), so the final
16
- * else-branch is necessarily the stored profile.
18
+ * Because this MIRRORS sdk-core rather than observing it, a precedence change in
19
+ * sdk-core that is not mirrored here will make the inferred label drift — the
20
+ * "(inferred)" qualifier is what keeps that honest until/unless loadCredentials
21
+ * is taught to report its resolved source. Each tier is pinned by a unit test.
22
+ * Only reached after createOpsContext has confirmed credentials resolved
23
+ * (requireCredentials exits otherwise), so the final else-branch is necessarily
24
+ * the stored profile.
17
25
  *
18
26
  * @internal Exported for unit testing only.
19
27
  */
@@ -1 +1 @@
1
- {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/commands/auth.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAgBzC;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,EAC9C,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,MAAM,CAWR;AA+ED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAgnB3D"}
1
+ {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/commands/auth.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAgBzC;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,EAC9C,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,MAAM,CAWR;AA+ED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAynB3D"}
@@ -7,20 +7,28 @@ import { emitJson } from '../formatters/json.js';
7
7
  import { formatApiKeys } from '../formatters/ops.js';
8
8
  import { exitWithError, promptInput, withSpinner, writeFileAtomic, } from '../utils.js';
9
9
  /**
10
- * Resolve which credential SOURCE the SDK used, by mirroring the exact
11
- * precedence ladder in @uluops/sdk-core loadCredentials (explicit flag > env
12
- * vars > stored profile). Returns a human-readable LABEL only never the
13
- * credential value matching the codebase's no-secret-leak discipline
14
- * (sdk-core's loader deliberately avoids echoing credential-file content).
10
+ * INFER which credential source the precedence resolution would select, by
11
+ * re-deriving the same ladder @uluops/sdk-core loadCredentials uses (explicit
12
+ * flag > env vars > stored profile). This is an INFERENCE, not an observation:
13
+ * loadCredentials returns the resolved credential but NOT which tier it came
14
+ * from, so this label is reconstructed from globalOpts + env and is never
15
+ * reported by the SDK. It is surfaced to users as "Credential Source (inferred)"
16
+ * precisely so it is not mistaken for an authoritative SDK readout. Returns a
17
+ * human-readable LABEL only — never the credential value — matching the
18
+ * codebase's no-secret-leak discipline (sdk-core's loader deliberately avoids
19
+ * echoing credential-file content).
15
20
  *
16
21
  * `.env` files are loaded into process.env at startup (loadEnvFiles), so a
17
22
  * credential set via .env is reported as an environment variable — there is no
18
23
  * separate ".env" tier to distinguish at this layer.
19
24
  *
20
- * This MIRRORS sdk-core; if that precedence changes, update both. Each tier is
21
- * pinned by a unit test. Only reached after createOpsContext has confirmed
22
- * credentials resolved (requireCredentials exits otherwise), so the final
23
- * else-branch is necessarily the stored profile.
25
+ * Because this MIRRORS sdk-core rather than observing it, a precedence change in
26
+ * sdk-core that is not mirrored here will make the inferred label drift — the
27
+ * "(inferred)" qualifier is what keeps that honest until/unless loadCredentials
28
+ * is taught to report its resolved source. Each tier is pinned by a unit test.
29
+ * Only reached after createOpsContext has confirmed credentials resolved
30
+ * (requireCredentials exits otherwise), so the final else-branch is necessarily
31
+ * the stored profile.
24
32
  *
25
33
  * @internal Exported for unit testing only.
26
34
  */
@@ -256,10 +264,17 @@ Examples:
256
264
  failure: 'Failed to fetch user info',
257
265
  }, () => ctx.client.auth.getMe());
258
266
  if (ctx.json) {
259
- // Default --json shape is a frozen public contract (README JSON
260
- // Output Stability) — do NOT add credentialSource here. The source
261
- // label is a human-readable convenience only.
267
+ // The default --json shape is a frozen public contract (README JSON
268
+ // Output Stability) — adding a field to it is a breaking change, so
269
+ // credentialSource is deliberately NOT in the stdout payload. But the
270
+ // most-captive population (CI debugging which identity authenticated)
271
+ // needs the source without a second non-JSON invocation, so emit the
272
+ // inferred label to STDERR: it reaches the debugging caller in the same
273
+ // run while leaving the frozen stdout bytes a parser pins untouched.
262
274
  emitJson(ctx, user, 'auth.whoami');
275
+ if (!ctx.quiet) {
276
+ console.error(`Credential Source (inferred): ${resolveCredentialSource(globalOpts)}`);
277
+ }
263
278
  }
264
279
  else {
265
280
  console.log(`Email: ${user.email}`);
@@ -270,7 +285,7 @@ Examples:
270
285
  if (user.name)
271
286
  console.log(`Name: ${user.name}`);
272
287
  console.log(`Auth Type: ${ctx.client.getAuthType()}`);
273
- console.log(`Credential Source: ${resolveCredentialSource(globalOpts)}`);
288
+ console.log(`Credential Source (inferred): ${resolveCredentialSource(globalOpts)}`);
274
289
  }
275
290
  }
276
291
  catch (error) {