@trawlme/skills 1.4.4 → 1.4.5
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/package.json +1 -1
- package/skills/trawl-cli/SKILL.md +11 -11
package/package.json
CHANGED
|
@@ -48,7 +48,7 @@ CI-relevant env vars. The first three are per-invocation session overrides — t
|
|
|
48
48
|
|
|
49
49
|
All commands accept `--json` (where listed) for machine-readable or pipeable output.
|
|
50
50
|
|
|
51
|
-
Since CLI **v2.0.0** the agent-facing verbs are also top-level: `trawl list / get / run / data /
|
|
51
|
+
Since CLI **v2.0.0** the agent-facing verbs are also top-level: `trawl list / get / run / data / runs / run-info / trigger / whoami / ping / create` (`runs` is named `history` before CLI 3.14.0; `history` still works as an alias) (the `trawl scraps <verb>` paths below still work as aliases — zero breaking change, except `trawl fetch`, removed in 2.0.0, see the AI-wizard `create` below which replaced it).
|
|
52
52
|
|
|
53
53
|
### Create a scrap from a URL + a prompt (AI wizard — the flagship)
|
|
54
54
|
|
|
@@ -59,14 +59,14 @@ trawl create --url https://example.com/products --prompt "track product prices"
|
|
|
59
59
|
|
|
60
60
|
Optional flags: `--no-autofix` (skip the auto-fix retry on a failed first run), `--json` (raw API payload on stdout), `--url <url>` (**since 2.1.0**) — an alias of the positional `url` argument, for callers that prefer a named flag. Exactly one URL is required: pass the positional OR `--url`, never neither. Passing both is fine only when they're identical; two *different* URLs is a usage error (exit 2) rather than the CLI silently picking one.
|
|
61
61
|
|
|
62
|
-
One call: the server generates the extraction code (AI), creates a **persistent, self-healing scrap**, and triggers its first run (auto-fix on failure by default). Requires an api-key scoped `trawl:scraps:create` (or a session JWT). Response: `{ success, scrap, historyId }
|
|
62
|
+
One call: the server generates the extraction code (AI), creates a **persistent, self-healing scrap**, and triggers its first run (auto-fix on failure by default). Requires an api-key scoped `trawl:scraps:create` (or a session JWT). Response: `{ success, scrap, historyId }` — newer servers also send `runId`, the same value (prefer `runId`, fall back to `historyId`).
|
|
63
63
|
|
|
64
64
|
Critical semantics for agents:
|
|
65
65
|
- **Ask the user before running it** — `trawl create` sends the URL + prompt to Trawl, creates a persistent scrap, enables a DAILY schedule, and consumes quota (LLM generation + a real run). Obtain explicit user confirmation immediately before executing; never fire it speculatively.
|
|
66
66
|
- **NOT idempotent + not instant** — generation + first run legitimately takes 30-250s (the CLI already uses the 300s long-run timeout; a global `TRAWL_TIMEOUT` override clamps it). On a client-side timeout the scrap **may still have been created server-side**: run `trawl list` before retrying — a retry creates a DUPLICATE scrap and burns quota.
|
|
67
67
|
- **Daily schedule by default** — a wizard scrap is created with a daily cron (07:00 UTC); it re-runs and meters every day until you change it (`trawl scraps update <id> --cron <expr>` or `--no-cron`).
|
|
68
|
-
- **`success:false` (exit 1) ≠ retry** — the scrap EXISTS and auto-fix is retrying in the background: poll `trawl data <id>` / `trawl run-info <
|
|
69
|
-
- **On success, human mode proves the value (since 2.3.0)** — after a successful first run, `create` prints a small best-effort data sample (item count, field names, one truncated value) below the scrap summary, then `Next step: trawl data <id>` (with `trawl get <id>` noted as the secondary, metadata-only view). The sample is bonus output only: any fetch/parse failure is swallowed silently and never turns a successful create into an error. `--json` is unaffected — it always returns the raw `{ success, scrap, historyId }` payload with no sample appended.
|
|
68
|
+
- **`success:false` (exit 1) ≠ retry** — the scrap EXISTS and auto-fix is retrying in the background: poll `trawl data <id>` / `trawl run-info <runId>`, never re-run `create`.
|
|
69
|
+
- **On success, human mode proves the value (since 2.3.0)** — after a successful first run, `create` prints a small best-effort data sample (item count, field names, one truncated value) below the scrap summary, then `Next step: trawl data <id>` (with `trawl get <id>` noted as the secondary, metadata-only view). The sample is bonus output only: any fetch/parse failure is swallowed silently and never turns a successful create into an error. `--json` is unaffected — it always returns the raw `{ success, scrap, historyId }` payload (plus `runId` on newer servers) with no sample appended.
|
|
70
70
|
- Distinct from `trawl scraps create` below (raw Puppeteer script, no AI).
|
|
71
71
|
|
|
72
72
|
### List scraps
|
|
@@ -180,14 +180,14 @@ Control flow depends on the path: for a **synchronous** run (`run`, or `trigger
|
|
|
180
180
|
### Inspect past runs
|
|
181
181
|
|
|
182
182
|
```bash
|
|
183
|
-
trawl scraps
|
|
184
|
-
trawl scraps
|
|
185
|
-
trawl scraps
|
|
186
|
-
trawl scraps run-info <
|
|
187
|
-
trawl scraps run-info <
|
|
183
|
+
trawl scraps runs <id> # table of recent runs (status, time, tier, failureKind)
|
|
184
|
+
trawl scraps runs <id> --json # JSON array, newest first
|
|
185
|
+
trawl scraps runs <id> --limit 50 # cap rows (default 20)
|
|
186
|
+
trawl scraps run-info <runId> # one run's detail by its run id (status, tier, failureKind, error + selector)
|
|
187
|
+
trawl scraps run-info <runId> --json
|
|
188
188
|
```
|
|
189
189
|
|
|
190
|
-
`doctor`/`autofix` (below) inspect the **last** run; `
|
|
190
|
+
`runs` needs CLI ≥ 3.14.0 (on older installs, use `history`); `history` still works as an alias on every version. A run id and a history id are the same value — in the table and in `--json` rows the field is still named `hid`. `doctor`/`autofix` (below) inspect the **last** run; `runs` + `run-info` reach **any** run: list with `runs`, then pass a row's `hid` to `run-info` for the full diagnosis. `run-info` hits `/api/historys/:hid`, which returns the proxy tier + `failureKind` to the scrap owner, plus the error snapshot (`errorMessage`/selector context) that `runs`' embedded list never carries. (On servers released before mid-July 2026, `runs` also shows the tier/failureKind columns blank — `run-info` always has them.)
|
|
191
191
|
|
|
192
192
|
### Delete
|
|
193
193
|
|
|
@@ -315,7 +315,7 @@ Scrap object shape:
|
|
|
315
315
|
}
|
|
316
316
|
```
|
|
317
317
|
|
|
318
|
-
There is **no `lastRun` field** — that never existed. Last-run status/timing/error all derive from `history[0]` (newest first). The embedded row shape differs by command:
|
|
318
|
+
There is **no `lastRun` field** — that never existed. Last-run status/timing/error all derive from `history[0]` (newest first). Newer servers also send the same array as `runs` — read `runs ?? history`. The embedded row shape differs by command:
|
|
319
319
|
- `trawl scraps get <id>` — up to 100 rows, each with `status`, `statusDetail`, `time`, `proxyTier`, `failureKind`, `blockType`, `createdAt`
|
|
320
320
|
- `trawl scraps list` — only the single newest row per scrap, with just `status` / `statusDetail` / `createdAt` (no `time`/`proxyTier`/`failureKind`/`blockType` — those come back `undefined`, not `null`); fetch `get <id>` if you need the triage fields
|
|
321
321
|
- `status` — tri-state: `true` (success) / `false` (failure) / `null` (in-flight, no result yet)
|