@hginsights/hgi 0.2.0-rc.1 → 0.2.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/README.md +6 -2
- package/dist/bin.js +683 -95
- package/docs/exit-codes.md +52 -5
- package/docs/output-formats.md +55 -3
- package/docs/security.md +2 -2
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/skills/hgi/SKILL.md +21 -17
package/README.md
CHANGED
|
@@ -75,6 +75,7 @@ hgi auth login --no-browser # prints a URL; open it anywhere, then past
|
|
|
75
75
|
| `hgi tools list [--refresh] [--json]` | the tools the server offers you, with `call`/`run`, required fields, schemas and the MCP version |
|
|
76
76
|
| `hgi call <tool> --input '<json>'` | run a read-only tool |
|
|
77
77
|
| `hgi call <tool> --ids @file` | run a read-only batch tool over a list of HG ids or domains, one row per line |
|
|
78
|
+
| `hgi call <tool> --all-pages` | fetch every page of an offset-paged tool and print one merged result; each extra page is a separate, billed call ([details](docs/output-formats.md#hgi-call---all-pages)) |
|
|
78
79
|
| `hgi run <tool> --input '<json>'` | run a state-changing tool |
|
|
79
80
|
| `hgi usage [--since <when>] [--by tool\|label\|day\|call]` | what `hgi` spent on this machine, from the local credit ledger (no sign-in needed) |
|
|
80
81
|
| `hgi budget status` / `hgi budget reset` | what this run has spent against `hgi call --max-credits`, and starting the count over (local only) |
|
|
@@ -86,8 +87,10 @@ Options for `call`, `run` and `tools list`:
|
|
|
86
87
|
- `-f, --format json|jsonl|csv|yaml|table`: JSON when piped, a table on a terminal. See [output formats](docs/output-formats.md).
|
|
87
88
|
- `--select a,b.c`: keep only those fields.
|
|
88
89
|
- `--out <file>`: write the complete result to a new file.
|
|
89
|
-
- `--meta`: print `{result, credit_cost, mcp_version}`.
|
|
90
|
-
- `--timeout <seconds>`: per-request timeout (default 120).
|
|
90
|
+
- `--meta`: print `{result, credit_cost, mcp_version, attempts}`.
|
|
91
|
+
- `--timeout <seconds>`: per-request timeout (default 120). It bounds each attempt, not the waits between retries.
|
|
92
|
+
- `--retries <n>` (0–20): retry a rate limit, the server shedding load, or a connection that was never established up to n times each, and on `call` also a `governance_unavailable` refusal. `0` turns every retry off. Without it, `hgi` keeps its built-in limits (3 and 2). A call that may already have run is never retried. Every retry prints one line on stderr. See [Retries](docs/exit-codes.md#retries).
|
|
93
|
+
- `--retry-budget <seconds>` (at most 3600): the most one request may spend waiting between retries (default 600 with `--retries`, else 60).
|
|
91
94
|
- `--label <label>` (`call` and `run`): tag the call in the credit ledger, for example by pipeline stage. 1 to 64 characters from `A-Z a-z 0-9 . _ : / -`.
|
|
92
95
|
|
|
93
96
|
Options for `call` only (batching):
|
|
@@ -165,6 +168,7 @@ Each row is `{"input": "<your line>", "result": {...}}` or `{"input": "<your lin
|
|
|
165
168
|
| `HGI_CONFIG_DIR`, `HGI_CACHE_DIR` | explicit directories (must not be inside a git working tree) |
|
|
166
169
|
| `HGI_LEDGER` | credit ledger path (default `<config dir>/ledger.jsonl`; must not be inside a git working tree), or `off` to keep no history |
|
|
167
170
|
| `HGI_MAX_CREDITS` | run cap for `hgi call`, same as `--max-credits` (the flag wins). See [Run cap](docs/exit-codes.md#run-cap) |
|
|
171
|
+
| `HGI_RETRIES`, `HGI_RETRY_BUDGET` | same as `--retries` / `--retry-budget` on `hgi call` and `hgi run` (the flags win). See [Retries](docs/exit-codes.md#retries) |
|
|
168
172
|
| `HGI_BUDGET_ID` | the run a capped `hgi call` counts against (default: the parent process id); when set, also recorded with each call in the credit ledger, to group the calls of one run |
|
|
169
173
|
|
|
170
174
|
`hgi` sends the User-Agent `hgi/<version>` and has no telemetry: it talks only to the server you configure, and sends nothing to HG Insights or anyone else about how you use it.
|