@lotics/cli 0.321.91 → 0.321.93
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/dist/src/cli.js +7 -6
- package/dist/src/client.d.ts +13 -0
- package/docs/cli_reference.md +1 -1
- package/package.json +1 -1
package/dist/src/client.d.ts
CHANGED
|
@@ -109,6 +109,17 @@ export interface ToolBreakingChange {
|
|
|
109
109
|
message?: string;
|
|
110
110
|
app_id?: string;
|
|
111
111
|
}
|
|
112
|
+
/** A refused row of a write of several, named as the caller knows it: by the id it passed, else by its place (`records[3]`). */
|
|
113
|
+
export type ToolRefusedRow = ({
|
|
114
|
+
record_id: string;
|
|
115
|
+
row?: never;
|
|
116
|
+
} | {
|
|
117
|
+
row: string;
|
|
118
|
+
record_id?: never;
|
|
119
|
+
}) & {
|
|
120
|
+
message: string;
|
|
121
|
+
field_key?: string;
|
|
122
|
+
};
|
|
112
123
|
export interface ToolExecuteResult {
|
|
113
124
|
result: unknown;
|
|
114
125
|
model_output?: string;
|
|
@@ -124,6 +135,8 @@ export interface ToolExecuteResult {
|
|
|
124
135
|
* list from a refusing table check. */
|
|
125
136
|
field_errors?: Record<string, string> | Record<string, string[]>;
|
|
126
137
|
breaking_changes?: readonly ToolBreakingChange[];
|
|
138
|
+
/** Every row of the write the table refused, where `error` names a few per reason. */
|
|
139
|
+
refused?: readonly ToolRefusedRow[];
|
|
127
140
|
}
|
|
128
141
|
export interface ToolInfo {
|
|
129
142
|
name: string;
|
package/docs/cli_reference.md
CHANGED
|
@@ -7,7 +7,7 @@ Per-command syntax, flags, contracts, and gotchas for the public `lotics` CLI. S
|
|
|
7
7
|
| `lotics` / `lotics --help` | Show full help: capabilities, the verb list (§ COMMANDS), flags, config. `lotics <verb> --help` prints that verb's entries alone (`lotics app --help`, `lotics file download --help`); `lotics report --help` prints the report frame. |
|
|
8
8
|
| `lotics auth login` | Sign this terminal in, on a machine holding no key; a person with no account creates one on the page it opens. It takes no argument and sends no mail. **Two steps, and it does not wait for the person.** The first prints the page to open — `https://lotics.ai/cli_login/<request_id>` — and the code that page must show, records the request, and exits 0. They sign in there if asked, check the code, pick the organization and press Confirm. A person with no account creates one there, by email and a password or with Google: the page shows the code beside the button, and one press creates the account and its first workspace and signs the terminal in; creating the account accepts the Terms and Privacy Policy. A signed-in account with no workspace gets one button that creates the workspace and signs the terminal in. On a private instance, whose people arrive by invitation, the page sends a signed-out person to sign in. **Then the next command that needs a credential collects the key** before it does its own work, so the second step is just re-running whatever was wanted; a command run before Confirm exits 1 naming the page and the code again, and once the 15 minutes are up it says to ask again. The handful that run WITHOUT a credential — `docs` among them — claim nothing, so one of those run after Confirm still answers as though signed out. `--wait` keeps one command instead, holding the terminal until Confirm; `--local` pins this directory to that org rather than setting the global default, and implies `--wait` (a pin names THIS directory, so only the terminal that stays in it can write one). `--json` prints `organization_id`, `workspace_id` and `organization_name` when it finishes signed in, and `request_id`, `confirm_url`, `code`, `expires_at` when it is the first step. The request's secret is never printed and the org's key never leaves the store. |
|
|
9
9
|
| — | **A flag is refused on a verb that does not read it**, naming the verbs that do, before any request or credential: `--check` on `lotics run` would otherwise be parsed and ignored, and the write it was meant to stop would run. `--json`, `--workspace`, `--api-key` and `--timeout` are read by every verb. |
|
|
10
|
-
| — | **Every call a verb makes waits for the server's answer**; `--timeout <ms>` (a whole number of milliseconds from 1 to 2147483647) stops each wait early. The wait ends without an answer when `--timeout` passes or no answer arrives from the server. A read with no answer changed nothing: the command exits non-zero naming the request id. A write with no answer exits non-zero with `error_code: "outcome_unknown"` and the request id under `--json`, because it cannot say whether the call took effect: read before running it again. The one fetch outside this is the download from an object-storage signed URL, which carries no request id and is stopped by `--timeout` alone. Under `--json` every error is one object on stdout: `error`, with `error_code` and `
|
|
10
|
+
| — | **Every call a verb makes waits for the server's answer**; `--timeout <ms>` (a whole number of milliseconds from 1 to 2147483647) stops each wait early. The wait ends without an answer when `--timeout` passes or no answer arrives from the server. A read with no answer changed nothing: the command exits non-zero naming the request id. A write with no answer exits non-zero with `error_code: "outcome_unknown"` and the request id under `--json`, because it cannot say whether the call took effect: read before running it again. The one fetch outside this is the download from an object-storage signed URL, which carries no request id and is stopped by `--timeout` alone. Under `--json` every error is one object on stdout: `error`, with `error_code`, `request_id`, `field_errors`, `breaking_changes` and `refused` where the error has them; `refused` is every row a write of several had refused, where `error` names five per reason: `{record_id, message, field_key?}` for a row named by the id the call passed, `{row, message, field_key?}` (`records[3]`) for one named by its place. |
|
|
11
11
|
| `lotics auth api-key [key]` | `whoami` → **upsert** the key's org as a profile in the global store (never overwrites). The profile records the instance the key was verified against (`LOTICS_API_URL`, default `https://api.lotics.ai`), and every later command for that org goes there. `--local` additionally pins this directory to it (pointer) instead of setting the global default. |
|
|
12
12
|
| `lotics auth web` | Send a magic link email to access the web app (requires auth) |
|
|
13
13
|
| `lotics auth whoami` | Print active account name, email, org, resolved workspace, the instance the credential belongs to, which **kind** of credential this machine holds (a sign-in from `auth login`, or an API key — read from the saved profile, and from the server when the profile does not say, which covers `--api-key`/`LOTICS_API_KEY` and a profile saved before the field existed; unknown only when neither can say), and the resolution **source** (flag/env/local/app-manifest/global). `--json` adds `workspace_id`, `api_url`, `credential_kind` + `source`. |
|