neatlogs-cli 0.1.0-team-test.2 → 0.1.0-team-test.5

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
@@ -2,6 +2,44 @@
2
2
 
3
3
  All notable changes to `neatlogs-cli` are documented in this file.
4
4
 
5
+ ## Unreleased
6
+
7
+ ## 0.1.0-team-test.5
8
+
9
+ - Include the post-merge Public API fixes for custom detection detail responses
10
+ and bounded evaluation progress reads.
11
+
12
+ ## 0.1.0-team-test.4
13
+
14
+ - Publish the fully reconciled PR #1045 CLI candidate after the earlier
15
+ `0.1.0-team-test.3` release tag was reserved before npm publication.
16
+
17
+ ## 0.1.0-team-test.3
18
+
19
+ - Request the complete human CLI OAuth scope set by default while preserving
20
+ live app RBAC, membership, entitlement, and resource authorization checks.
21
+ - Show the signed-in account, active organization and role, and destination on
22
+ the browser consent page.
23
+ - Add bounded `--fields` projection, collection `--jsonl`, redacted `--debug`
24
+ diagnostics, and `--no-color`/`NO_COLOR` compatibility.
25
+ - Return actionable OAuth-scope, role, and plan diagnostics for MCP access.
26
+ - Add `neatlogs version` diagnostics and reject unknown commands consistently.
27
+ - Preserve validated RFC 9457 error detail and field errors in CLI diagnostics.
28
+ - Use Device Flow automatically in non-interactive login and print a browser
29
+ authorization URL before waiting on interactive login.
30
+ - Ignore a saved-profile project for organization-scoped commands while still
31
+ rejecting an explicitly supplied project context.
32
+ - Require the exact token ID confirmation for service-account token revocation.
33
+ - Add column headers to the main human-readable trace, session, span, detection,
34
+ detection-group, and alert-rule lists.
35
+ - Add bounded automatic pagination with `--all --max-items`, including a resume
36
+ cursor when the requested ceiling is reached.
37
+ - Add offline Bash, Zsh, and Fish completion generation plus a complete
38
+ generated command reference in the published package.
39
+ - Add prompt-label removal with an optional idempotency key.
40
+ - Keep team-test prereleases on the npm `team-test` dist-tag and fail closed for
41
+ unsupported prerelease channels without moving `latest`.
42
+
5
43
  ## 0.1.0-team-test.2
6
44
 
7
45
  - Resolve `auth login` host and profile context from the selected saved profile.
package/README.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  Use the CLI to inspect and manage your NeatLogs projects from a terminal or an automation agent.
4
4
 
5
+ The CLI and public API currently support the approved NeatLogs cloud deployments
6
+ and explicitly enabled localhost development only. Self-hosted deployments are
7
+ not supported; existing credentials do not bypass this restriction. Self-hosted
8
+ dashboard, SDK ingest and legacy Swirls integration use are unaffected. See the
9
+ [deployment policy](../backend/docs/public-api/v1.md#supported-deployments).
10
+
5
11
  ## Choose the right credential
6
12
 
7
13
  ```mermaid
@@ -35,19 +41,22 @@ flowchart LR
35
41
  neatlogs --help
36
42
  ```
37
43
 
38
- 2. Save the host and sign in through your browser.
44
+ 2. Save the host, select the profile, and sign in.
39
45
 
40
46
  ```bash
41
47
  neatlogs profile set work --host '<https-app-origin>'
42
- neatlogs --profile work auth login
43
- # Remote/headless alternative:
44
- neatlogs --profile work auth login --device
48
+ neatlogs profile use work
49
+ neatlogs auth login
45
50
  ```
46
51
 
52
+ An interactive terminal opens browser OAuth and prints the URL as a
53
+ copy/paste fallback. A non-interactive or headless terminal automatically
54
+ uses Device Flow; `--device` selects it explicitly.
55
+
47
56
  3. List the projects you can access.
48
57
 
49
58
  ```bash
50
- neatlogs --profile work projects list
59
+ neatlogs projects list
51
60
  ```
52
61
 
53
62
  4. Save the project you want this profile to use.
@@ -59,13 +68,39 @@ flowchart LR
59
68
  5. Check your identity and read recent traces.
60
69
 
61
70
  ```bash
62
- neatlogs --profile work whoami
63
- neatlogs --profile work traces list --limit 10
71
+ neatlogs whoami
72
+ neatlogs traces list --limit 10
64
73
  ```
65
74
 
66
75
  `profile set` stores non-secret host and project preferences. Login stores the
67
76
  OAuth credentials separately in the native operating-system vault.
68
77
 
78
+ ## Completion and bounded pagination
79
+
80
+ Generate completion from the installed CLI command tree, then regenerate it
81
+ after each CLI upgrade:
82
+
83
+ ```bash
84
+ # bash
85
+ source <(neatlogs completion bash)
86
+
87
+ # zsh
88
+ source <(neatlogs completion zsh)
89
+
90
+ # fish
91
+ neatlogs completion fish | source
92
+ ```
93
+
94
+ Cursor-list commands support bounded multi-page collection. Both flags are
95
+ required together, and the ceiling is 1 through 1,000 items:
96
+
97
+ ```bash
98
+ neatlogs traces list --all --max-items 500
99
+ ```
100
+
101
+ When the ceiling truncates the result, the response retains the next cursor so
102
+ the caller can resume.
103
+
69
104
  ## Request only the permissions you need
70
105
 
71
106
  ```bash
@@ -105,10 +140,12 @@ the service account. `NEATLOGS_API_KEY` remains a legacy fallback; if it and
105
140
  ## Credential storage and security
106
141
 
107
142
  Human login uses Authorization Code with PKCE and an exact `127.0.0.1`
108
- callback. `--device` explicitly selects Device Flow for a remote or headless
109
- terminal. OAuth access and refresh tokens are bound to the exact host, issuer,
110
- and profile, then stored in macOS Keychain, Windows Credential Manager, or
111
- Linux Secret Service.
143
+ callback when stdin is interactive. It prints the authorization URL before
144
+ waiting so it can be opened manually if the browser launch fails. A
145
+ non-interactive terminal automatically selects Device Flow, and `--device`
146
+ selects Device Flow explicitly. OAuth access and refresh tokens are bound to
147
+ the exact host, issuer, and profile, then stored in macOS Keychain, Windows
148
+ Credential Manager, or Linux Secret Service.
112
149
 
113
150
  The CLI does not consult Git credential configuration and never silently falls
114
151
  back to a file. Linux requires libsecret and a running Secret Service
@@ -134,6 +171,7 @@ operation is callable.
134
171
  neatlogs --profile <name> auth login [--device] [--allow-file-credentials] [--scope <scope...>]
135
172
  neatlogs --profile <name> auth status
136
173
  neatlogs --profile <name> auth logout [--all] [--local-only]
174
+ neatlogs version
137
175
  neatlogs profile list
138
176
  neatlogs profile show [name]
139
177
  neatlogs profile set <name> --host <https-origin> [--organization <uuid>] [--project <uuid>]
@@ -192,6 +230,7 @@ neatlogs prompts history <prompt-version-uuid> [--limit 1-100] [--cursor <opaque
192
230
  neatlogs prompts diff <from-version-uuid> <to-version-uuid>
193
231
  neatlogs prompts create (--body-stdin | --name <name> (--content <text> | --content-stdin | --messages <json>)) [--config <json>] [--variables <json>] [--display-name <name>] [--role <role>] [--tags <csv>] [--commit-message <message>] [--idempotency-key <uuid>]
194
232
  neatlogs prompts label <prompt-version-uuid> <label> [--idempotency-key <uuid>]
233
+ neatlogs prompts label-remove <prompt-version-uuid> <label> [--idempotency-key <uuid>]
195
234
  neatlogs prompts tag-add <prompt-version-uuid> <tag> [--idempotency-key <uuid>]
196
235
  neatlogs prompts tag-remove <prompt-version-uuid> <tag> [--idempotency-key <uuid>]
197
236
  neatlogs prompts delete <prompt-version-uuid> --confirm <prompt-version-uuid> [--idempotency-key <uuid>]
@@ -537,11 +576,23 @@ request.
537
576
  online commands; the CLI never guesses a deployment domain. Offline `schema`
538
577
  commands require neither.
539
578
  - Hosts must be HTTPS origins with no path, user information, query, or hash.
540
- - Browser PKCE is the default login. `--device` is the explicit fallback for a
541
- remote/headless terminal. Both request reviewed OAuth scopes; current RBAC is
542
- still evaluated by the server for every API request.
579
+ - Browser PKCE is the default login on an interactive terminal. The CLI prints
580
+ its authorization URL before waiting. Non-interactive terminals automatically
581
+ use Device Flow; `--device` selects it explicitly. Both request reviewed OAuth
582
+ scopes; normal human login requests the complete CLI scope set so OAuth does
583
+ not silently narrow access already granted in the app. `auth login --scope`
584
+ remains an explicit narrower override. Current RBAC, membership, plan, and
585
+ resource authorization are still evaluated by the server for every request.
543
586
  - `--json` or non-TTY stdout produces stable JSON. Data uses stdout and
544
- diagnostics use stderr.
587
+ diagnostics use stderr. Human list output includes tab-separated column
588
+ headers.
589
+ - `--jsonl` writes one object per line for cursor-backed collections.
590
+ `--fields id,name` projects at most 32 bounded object paths in JSON/JSONL
591
+ output. The trace-payload command keeps its existing request-specific
592
+ `--fields input[,output,error]` meaning.
593
+ - `--debug` writes redacted request lifecycle records to stderr without
594
+ credentials, headers, bodies, project IDs, or query values. `--no-color` and
595
+ `NO_COLOR` are accepted; current output contains no ANSI color sequences.
545
596
  - Requests time out after 10 seconds and never follow redirects.
546
597
  - Idempotent GET requests and explicitly marked safe POST reads retry at most
547
598
  twice after a `429` or `503`, honoring a safe, bounded `Retry-After` value.