sim 2.0.0-dev.12.1 → 2.0.0-dev.20.1

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.
Files changed (3) hide show
  1. package/README.md +18 -4
  2. package/dist/index.js +920 -381
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -20,7 +20,7 @@ Non-secret settings live in `~/.sim/config`:
20
20
 
21
21
  ```ini
22
22
  [default]
23
- endpoint = https://sim.ai
23
+ endpoint = https://www.sim.ai
24
24
  workspace = ws_abc123
25
25
  output = table
26
26
 
@@ -46,7 +46,7 @@ The section-naming asymmetry — `[profile dev]` in config, `[dev]` in credentia
46
46
  sim configure --set-endpoint http://localhost:3000 --profile dev
47
47
  sim configure --set-workspace ws_local --profile dev
48
48
  sim profiles # list them; * marks the active one
49
- sim whoami # resolved values, and where each came from
49
+ sim whoami # resolved values, where each came from, and whether they work
50
50
  ```
51
51
 
52
52
  ## Where settings come from
@@ -57,13 +57,27 @@ Each setting resolves independently, first match wins:
57
57
  | --- | --- |
58
58
  | 1 | Command-line flag (`--endpoint`, `--workspace`, `--output`) |
59
59
  | 2 | Environment (`SIM_ENDPOINT`, `SIM_API_KEY`, `SIM_WORKSPACE`, `SIM_OUTPUT`) |
60
+
61
+ `SIM_TIMEOUT_SECONDS` bounds each request (default `3600`, `0` waits
62
+ indefinitely) and `SIM_DEBUG=1` traces requests to stderr. Node ignores
63
+ `HTTPS_PROXY` unless `NODE_USE_ENV_PROXY=1` is also set, on Node 22.21+ or
64
+ 24.5+; the CLI warns when a proxy is configured but will not be used.
60
65
  | 3 | `~/.sim/config` / `~/.sim/credentials` for the selected profile |
61
- | 4 | Built-in default (`https://sim.ai`, `table`) |
66
+ | 4 | Built-in default (`https://www.sim.ai`, `table`) |
62
67
 
63
68
  Formats are listed under [Output formats](#output-formats).
64
69
 
65
70
  `sim whoami` prints the winning source per setting, which is usually the fastest
66
- way to explain a surprising result.
71
+ way to explain a surprising result. It then reads the configured workspace to
72
+ prove the settings actually work; `--no-verify` skips that and stays offline.
73
+
74
+ Its exit status is the answer, so CI can branch on it:
75
+
76
+ | Code | Meaning |
77
+ | --- | --- |
78
+ | `0` | The key works and reached the configured workspace |
79
+ | `1` | The credentials are wrong — no key stored, or the API refused it |
80
+ | `2` | The check could not be made — nothing to check against, or the endpoint did not answer |
67
81
 
68
82
  For CI, skip `sim login` entirely and set `SIM_API_KEY` and `SIM_WORKSPACE` —
69
83
  nothing needs to touch the filesystem. `SIM_CONFIG_DIR` relocates both files if