@lotics/cli 0.114.0 → 0.123.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/AGENTS.md CHANGED
@@ -48,6 +48,10 @@ whether something exists, read `lotics --help` § COMMANDS — the whole section
48
48
  `workspace doctor` on findings. Scripts can gate on them.
49
49
  - **Text output is the default and is built for reading**; reach for `--json` only when a field is
50
50
  needed programmatically.
51
+ - **`LOTICS_TELEMETRY=1` correlates a whole session** so the authoring loop's rough edges can be
52
+ found and fixed. Off by default; set it in the shell profile, not per command (each invocation is
53
+ its own process). It sends no arguments, no file contents, and no record data — see README
54
+ § Diagnostics.
51
55
 
52
56
  ## Where this CLI is not the answer
53
57
 
package/README.md CHANGED
@@ -103,6 +103,19 @@ Every command names its target before it acts — `lotics → <org> / <workspace
103
103
 
104
104
  `LOTICS_WORKSPACE` (or `--workspace <id>` / `-w`) overrides the workspace at any level. For ephemeral or CI use, set `LOTICS_API_KEY` instead of saving anything.
105
105
 
106
+ ### Diagnostics
107
+
108
+ Every request identifies the CLI (`user-agent: lotics-cli/<version> node/<v> <platform>`) and names the command that made it (`x-lotics-cli-command: app.workflow.set`), so a failure in the server's logs can be traced to the verb and version that produced it. Neither header carries arguments: the command chain stops before any id, path, `@file`, or JSON payload.
109
+
110
+ **`LOTICS_TELEMETRY=1` additionally records the session.** Off by default. Set it in your shell profile rather than per command — each invocation is its own process. When set:
111
+
112
+ - Requests carry a session id shared by every command in the sitting — under an agent harness it adopts the harness's own session id, otherwise it rolls over after 30 minutes idle (`~/.lotics/session.json`).
113
+ - Each invocation appends one record to `~/.lotics/telemetry.ndjson` — the command, its exit code, how long it took, and, on a failure, the message that was printed. Batches are sent on a later run; a failed send is retried, never dropped silently.
114
+
115
+ Arguments contribute a **hash** and a **shape** (`records[].data.name:string`) and nothing else — no values, no file contents, no record data. The hash is the point: two failures in a row with the same hash mean the error message did not tell you enough to fix the call, which is how bad errors get found. This turns "this command failed" into "this command failed after these eleven, and the agent never recovered."
116
+
117
+ Unset, nothing is stored, nothing is sent, and no spool file is created.
118
+
106
119
  In an app project, `lotics app *` commands derive the credential from the directory when nothing explicit chose one: the manifest names the app's workspace, and when exactly one saved profile owns that workspace, that profile is used — the machine-wide default (which another shell can move between two of your commands) is never consulted. An explicit flag, env var, or directory pin still wins, and an org whose profile remembers a different workspace simply falls through to the announced default, exactly as before.
107
120
 
108
121
  ## Workspaces