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

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