@trawlme/cli 3.14.1 → 3.16.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 +19 -1
- package/dist/commands/admin.d.ts +2 -0
- package/dist/commands/admin.js +35 -0
- package/dist/commands/scraps.d.ts +89 -0
- package/dist/commands/scraps.js +102 -7
- package/dist/index.js +2 -0
- package/docs/agent-quickstart.md +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -54,7 +54,7 @@ trawl create <url> --prompt <goal> [--no-autofix] [--no-digest] [--json] # url
|
|
|
54
54
|
trawl list|ls [--json] [--status <success|failure|never|running|regression>] [--unhealthy] [--limit <n>] [--page <n>]
|
|
55
55
|
trawl get <id> [--json] Get scrap details
|
|
56
56
|
trawl run <id> [--watch] [--json] Run a scrap (blocks until finished)
|
|
57
|
-
trawl trigger <id> [--watch] [--wait] [--json] Launch a scrap as a background worker (returns immediately)
|
|
57
|
+
trawl trigger <id> [--param <k=v>]... [--watch] [--wait] [--json] Launch a scrap as a background worker (returns immediately)
|
|
58
58
|
trawl data <id> [--json] [--fresh] [--errors] Get scrap data (last persisted run — read-only, no quota; --fresh to launch one)
|
|
59
59
|
trawl runs|history <id> [--json] [-n <limit>] List past runs for a scrap (newest first)
|
|
60
60
|
trawl run-info <hid> [--json] Show details of a single run
|
|
@@ -109,6 +109,14 @@ trawl scraps delete <id> [--force] [--json] Alias: rm
|
|
|
109
109
|
- `scraps banner -f <file>` only accepts `png`/`jpg`/`jpeg`/`webp`; any other extension is a usage error (exit 2) instead of silently uploading the file under a fabricated `image/png` Content-Type.
|
|
110
110
|
- `scraps delete`/`banner --json` print `{"deleted":true,"id"}` / the raw upload response.
|
|
111
111
|
|
|
112
|
+
### Params & scenarios
|
|
113
|
+
|
|
114
|
+
- Params stored with `scraps update -p/--params-file` are **scenarios** (test cases): every `trawl run` and scheduled run picks ONE set at random, never "the last saved set".
|
|
115
|
+
- `trawl trigger <id> --param k=v` (repeatable) runs the scrap once with your own values and leaves the stored sets untouched. Keys come from the first stored set (`TRAWL.` prefix optional); values are typed like that set (number, `true`/`false`, or string). Every key is required; blank values, unknown, duplicate and wrongly typed keys are refused with exit 2 (unknown or missing keys list the expected keys; type errors say "must be a number" or "must be true or false"). Works with `--wait` and the async default. `-p` is taken by `update`, so `--param` has no short form.
|
|
116
|
+
- Without `--param`, a scrap that has params is rejected with 422 under `--wait`; the default async trigger is acked as queued and the run then fails in the worker. Pass `--param`.
|
|
117
|
+
- `--param` reads the scrap first, so an API key needs `trawl:scraps:read` besides `trawl:scraps:run`.
|
|
118
|
+
- On a scrap with no cron, every `trigger` prints a stderr warning: the stored scenarios never run unattended.
|
|
119
|
+
|
|
112
120
|
### Scrap accounts
|
|
113
121
|
|
|
114
122
|
```
|
|
@@ -124,6 +132,16 @@ trawl scraps account session capture <id> [--chrome <path>] [--json]
|
|
|
124
132
|
|
|
125
133
|
`account session capture <id>` is the one-command version of the same idea: it opens a real, visible Chrome window at the scrap's target URL, waits for **you** to log in there — 2FA included — then reads the resulting session over the Chrome DevTools Protocol (cookies **and** per-origin localStorage) and uploads it. You stay authenticated as yourself; Trawl never sees your credentials, and responsibility for lawful use of the captured session stays with you. The capture is scoped to the scrap's own target host by RFC 6265 domain-matching, the same rule a real browser uses to decide which cookies to send: a cookie explicitly scoped to a domain (e.g. `Domain=example.com`) is in scope for that host and its subdomains, while a host-only cookie (no `Domain` attribute) is in scope only for the exact host it was set on — never a sibling subdomain, even one sharing a parent domain, and never another tenant on the same multi-tenant hosting domain (e.g. a different `*.github.io` site). localStorage follows the same anchor: an origin is in scope only if it's the target host itself or a subdomain of it. The one deliberate gap: a host-only cookie set on a sibling host (e.g. `auth.example.com` while the scrap targets `app.example.com`) is excluded — a real browser would never send it to the target host either, so nothing replay-relevant is lost unless the scrap script itself later navigates to that sibling. Completion is explicit: press Enter in the terminal once you're signed in — the primary path, and the only one guaranteed cross-platform. Closing the Chrome window also completes the capture (cookies only, not localStorage) when Chrome itself stays running after its last window closes, which this CLI verified on macOS; on a platform where closing the last window quits Chrome entirely, the command reports that fact instead of a session, and pressing Enter is the reliable path there. This command needs a local interactive terminal with a real display; it does not work headless, in CI, or over a plain SSH session, and auto-detects a system Chrome/Chromium (override with `--chrome <path>` or `TRAWL_CHROME_PATH`). Never prints the captured session itself, in any mode — `--json` echoes only the server's response plus capture counts.
|
|
126
134
|
|
|
135
|
+
### Platform admin (read-only)
|
|
136
|
+
|
|
137
|
+
Three read-only views for a platform admin. They need an API key with the `trawl:admin:read` scope whose owner is a platform admin (or an admin session); otherwise the API answers 403. Output is always JSON.
|
|
138
|
+
|
|
139
|
+
```
|
|
140
|
+
trawl admin orgs [--window 7d|30d|90d] Per-organization health and churn signals
|
|
141
|
+
trawl admin series [--window 7d|30d|90d] Platform-wide runs per day
|
|
142
|
+
trawl admin costs [--period day|week|month] Aggregate costs over a period
|
|
143
|
+
```
|
|
144
|
+
|
|
127
145
|
### Claude Code skills
|
|
128
146
|
|
|
129
147
|
The CLI bundles 5 Claude Code skills that teach Claude how to use `trawl`. Once installed, Claude can manage scraps for you via prompts.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Command, Option } from 'commander';
|
|
2
|
+
import { ApiError, api } from '../lib/api.js';
|
|
3
|
+
import { json } from '../lib/format.js';
|
|
4
|
+
const FORBIDDEN_HINT = 'Forbidden: this key needs the trawl:admin:read scope and a platform-admin owner (or log in as an admin).';
|
|
5
|
+
async function getAdmin(path, query) {
|
|
6
|
+
const qs = new URLSearchParams(Object.entries(query).filter(([, v]) => v !== undefined)).toString();
|
|
7
|
+
try {
|
|
8
|
+
json(await api.get(qs ? `${path}?${qs}` : path));
|
|
9
|
+
}
|
|
10
|
+
catch (err) {
|
|
11
|
+
if (err instanceof ApiError && err.status === 403)
|
|
12
|
+
throw new ApiError(403, `${FORBIDDEN_HINT} (${err.message})`);
|
|
13
|
+
throw err;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
const windowOption = () => new Option('--window <window>', 'Time window (7d|30d|90d)').choices(['7d', '30d', '90d']);
|
|
17
|
+
export const admin = new Command('admin').description('Platform-admin read-only views (needs trawl:admin:read + an admin owner)');
|
|
18
|
+
admin
|
|
19
|
+
.command('orgs')
|
|
20
|
+
.description('Per-organization health and churn signals (GET /api/admin/monitoring/organizations)')
|
|
21
|
+
.addOption(windowOption())
|
|
22
|
+
.option('--json', 'Output as JSON (default: on)', true)
|
|
23
|
+
.action((opts) => getAdmin('/api/admin/monitoring/organizations', { window: opts.window }));
|
|
24
|
+
admin
|
|
25
|
+
.command('series')
|
|
26
|
+
.description('Platform-wide runs per day (GET /api/admin/monitoring/series)')
|
|
27
|
+
.addOption(windowOption())
|
|
28
|
+
.option('--json', 'Output as JSON (default: on)', true)
|
|
29
|
+
.action((opts) => getAdmin('/api/admin/monitoring/series', { window: opts.window }));
|
|
30
|
+
admin
|
|
31
|
+
.command('costs')
|
|
32
|
+
.description('Aggregate costs over a period (GET /api/admin/costs)')
|
|
33
|
+
.addOption(new Option('--period <period>', 'Reporting period (day|week|month)').choices(['day', 'week', 'month']))
|
|
34
|
+
.option('--json', 'Output as JSON (default: on)', true)
|
|
35
|
+
.action((opts) => getAdmin('/api/admin/costs', { period: opts.period }));
|
|
@@ -2,6 +2,85 @@ import { Command } from 'commander';
|
|
|
2
2
|
type AttachOptions = {
|
|
3
3
|
hidden?: boolean;
|
|
4
4
|
};
|
|
5
|
+
interface HistoryRun {
|
|
6
|
+
_id?: string;
|
|
7
|
+
status?: boolean | null;
|
|
8
|
+
statusDetail?: 'success' | 'error' | 'empty' | 'regression' | null;
|
|
9
|
+
time?: number;
|
|
10
|
+
proxyTier?: string | null;
|
|
11
|
+
failureKind?: string | null;
|
|
12
|
+
block?: {
|
|
13
|
+
kind?: string | null;
|
|
14
|
+
} | null;
|
|
15
|
+
blockType?: string | null;
|
|
16
|
+
createdAt?: string;
|
|
17
|
+
items?: unknown[];
|
|
18
|
+
errorSnapshot?: {
|
|
19
|
+
errorMessage?: string;
|
|
20
|
+
selector?: string;
|
|
21
|
+
};
|
|
22
|
+
emptyContext?: EmptyContext | null;
|
|
23
|
+
}
|
|
24
|
+
interface EmptyContext {
|
|
25
|
+
selectors?: Record<string, number>;
|
|
26
|
+
page?: {
|
|
27
|
+
title?: string;
|
|
28
|
+
url?: string;
|
|
29
|
+
totalAnchors?: number;
|
|
30
|
+
topClasses?: {
|
|
31
|
+
class: string;
|
|
32
|
+
count: number;
|
|
33
|
+
}[];
|
|
34
|
+
topAnchorPaths?: {
|
|
35
|
+
path: string;
|
|
36
|
+
count: number;
|
|
37
|
+
}[];
|
|
38
|
+
};
|
|
39
|
+
_captureWarnings?: string[];
|
|
40
|
+
}
|
|
41
|
+
interface Scrap {
|
|
42
|
+
_id: string;
|
|
43
|
+
title: string;
|
|
44
|
+
request: string;
|
|
45
|
+
scrapper: string;
|
|
46
|
+
url?: string;
|
|
47
|
+
cron: string | null;
|
|
48
|
+
params?: Record<string, unknown>[];
|
|
49
|
+
autoFix?: boolean | null;
|
|
50
|
+
digest?: {
|
|
51
|
+
enabled: boolean;
|
|
52
|
+
mode: 'latest' | 'changes' | 'changes_only';
|
|
53
|
+
prompt: string | null;
|
|
54
|
+
recipient: string | null;
|
|
55
|
+
};
|
|
56
|
+
createdAt: string;
|
|
57
|
+
updatedAt: string;
|
|
58
|
+
runs?: HistoryRun[];
|
|
59
|
+
history?: HistoryRun[];
|
|
60
|
+
account?: AccountStatus;
|
|
61
|
+
lastCronOutcome?: 'ok' | 'quota_denied' | 'error' | 'skipped_unhealthy' | null;
|
|
62
|
+
consecutiveFailedRuns?: number;
|
|
63
|
+
unhealthySince?: string | null;
|
|
64
|
+
_tierOverride?: {
|
|
65
|
+
requestedMaxTier?: string;
|
|
66
|
+
effectiveMaxTier?: string | null;
|
|
67
|
+
refused?: boolean;
|
|
68
|
+
reason?: string;
|
|
69
|
+
provider?: string;
|
|
70
|
+
warning?: string | null;
|
|
71
|
+
proxyTier?: {
|
|
72
|
+
requested: string;
|
|
73
|
+
effective: string;
|
|
74
|
+
clamped: boolean;
|
|
75
|
+
reason?: string;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
interface AccountStatus {
|
|
80
|
+
hasCredentials: boolean;
|
|
81
|
+
hasSession: boolean;
|
|
82
|
+
sessionSavedAt?: string | null;
|
|
83
|
+
}
|
|
5
84
|
export declare const scraps: Command;
|
|
6
85
|
interface BeforeRunState {
|
|
7
86
|
id?: string;
|
|
@@ -24,5 +103,15 @@ export declare function attachRunCommand(parent: Command, attachOpts?: AttachOpt
|
|
|
24
103
|
export declare function attachDataCommand(parent: Command, attachOpts?: AttachOptions): Command;
|
|
25
104
|
export declare function attachRunsCommand(parent: Command, attachOpts?: AttachOptions): Command;
|
|
26
105
|
export declare function attachRunInfoCommand(parent: Command, attachOpts?: AttachOptions): Command;
|
|
106
|
+
export declare function parseTriggerPairs(pairs: string[]): {
|
|
107
|
+
entries: [string, string][];
|
|
108
|
+
} | {
|
|
109
|
+
error: string;
|
|
110
|
+
};
|
|
111
|
+
export declare function buildTriggerParams(scrap: Scrap, pairs: string[]): {
|
|
112
|
+
body: Record<string, unknown>;
|
|
113
|
+
} | {
|
|
114
|
+
error: string;
|
|
115
|
+
};
|
|
27
116
|
export declare function attachTriggerCommand(parent: Command, attachOpts?: AttachOptions): Command;
|
|
28
117
|
export {};
|
package/dist/commands/scraps.js
CHANGED
|
@@ -141,11 +141,13 @@ async function watchActivities(id, asJson) {
|
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
+
function beforeRunStateFrom(scrap) {
|
|
145
|
+
const top = (scrap ? runsOf(scrap) : undefined)?.[0];
|
|
146
|
+
return { id: top?._id, alreadyInFlight: top?.status === null, captured: true };
|
|
147
|
+
}
|
|
144
148
|
async function captureBeforeRunState(id) {
|
|
145
149
|
try {
|
|
146
|
-
|
|
147
|
-
const top = runsOf(scrap)?.[0];
|
|
148
|
-
return { id: top?._id, alreadyInFlight: top?.status === null, captured: true };
|
|
150
|
+
return beforeRunStateFrom(await api.get(`/api/scraps/${id}`));
|
|
149
151
|
}
|
|
150
152
|
catch {
|
|
151
153
|
return { id: undefined, alreadyInFlight: false, captured: false };
|
|
@@ -465,8 +467,8 @@ scraps
|
|
|
465
467
|
.option('--no-digest', 'Disable the AI digest (partial update — other digest settings are kept)')
|
|
466
468
|
.option('--digest-mode <mode>', `Digest mode (${VALID_DIGEST_MODES.join('|')} — latest: this run's data · changes: only what changed · changes_only: like changes, no mail when nothing changed; partial update — other digest settings are kept)`)
|
|
467
469
|
.option('--digest-prompt <text>', 'Digest prompt (empty string to clear; partial update — other digest settings are kept)')
|
|
468
|
-
.option('-p, --params <json>', '
|
|
469
|
-
.option('--params-file <path>', '
|
|
470
|
+
.option('-p, --params <json>', 'Scenario sets as a JSON array of objects (e.g. \'[{"TRAWL.q":"shoes"},{"TRAWL.q":"boots"}]\'). One set is picked at random on every run (trawl run and the schedule); the first set\'s keys/types define what `trawl trigger --param` accepts')
|
|
471
|
+
.option('--params-file <path>', 'Scenario sets (same shape as --params) from a JSON file')
|
|
470
472
|
.option('--tier <tier>', `Force proxy tier (${VALID_TIERS.join('|')})`)
|
|
471
473
|
.option('--force-tier <tier>', `Raise the proxy-tier ceiling PAST the auto-cap (${VALID_TIERS.join('|')}) — history-gated: may be refused or cost more`)
|
|
472
474
|
.option('--json', 'Output as JSON')
|
|
@@ -880,18 +882,111 @@ scraps
|
|
|
880
882
|
validateObjectId(id);
|
|
881
883
|
await watchActivities(id, opts.json);
|
|
882
884
|
});
|
|
885
|
+
export function parseTriggerPairs(pairs) {
|
|
886
|
+
const entries = [];
|
|
887
|
+
for (const pair of pairs) {
|
|
888
|
+
const eq = pair.indexOf('=');
|
|
889
|
+
const k = eq === -1 ? '' : pair.slice(0, eq);
|
|
890
|
+
const v = eq === -1 ? '' : pair.slice(eq + 1);
|
|
891
|
+
if (!k)
|
|
892
|
+
return { error: `Invalid --param "${pair}" (expected key=value)` };
|
|
893
|
+
if (v.trim() === '')
|
|
894
|
+
return { error: `--param ${k} has an empty value` };
|
|
895
|
+
entries.push([k, v]);
|
|
896
|
+
}
|
|
897
|
+
return { entries };
|
|
898
|
+
}
|
|
899
|
+
export function buildTriggerParams(scrap, pairs) {
|
|
900
|
+
const parsed = parseTriggerPairs(pairs);
|
|
901
|
+
if ('error' in parsed)
|
|
902
|
+
return parsed;
|
|
903
|
+
const schema = scrap.params?.[0];
|
|
904
|
+
if (!schema || Object.keys(schema).length === 0) {
|
|
905
|
+
return { error: `Scrap ${scrap._id} takes no params (it has no stored scenario set) — drop --param` };
|
|
906
|
+
}
|
|
907
|
+
const bare = (k) => (k.startsWith('TRAWL.') ? k.slice(6) : k);
|
|
908
|
+
const stored = new Map();
|
|
909
|
+
for (const key of Object.keys(schema)) {
|
|
910
|
+
const prev = stored.get(bare(key));
|
|
911
|
+
if (prev !== undefined) {
|
|
912
|
+
return { error: `Scrap params have conflicting keys ${prev} / ${key} — fix them with trawl scraps update ${scrap._id} -p` };
|
|
913
|
+
}
|
|
914
|
+
stored.set(bare(key), key);
|
|
915
|
+
}
|
|
916
|
+
const expected = [...stored.keys()].join(', ');
|
|
917
|
+
const body = {};
|
|
918
|
+
for (const [k, v] of parsed.entries) {
|
|
919
|
+
const storedKey = stored.get(bare(k));
|
|
920
|
+
if (storedKey === undefined)
|
|
921
|
+
return { error: `Unknown param "${k}" — expected: ${expected}` };
|
|
922
|
+
if (Object.hasOwn(body, storedKey))
|
|
923
|
+
return { error: `Duplicate --param ${k}` };
|
|
924
|
+
const type = typeof schema[storedKey];
|
|
925
|
+
if (type === 'number') {
|
|
926
|
+
const n = Number(v);
|
|
927
|
+
if (!Number.isFinite(n))
|
|
928
|
+
return { error: `--param ${k} must be a number` };
|
|
929
|
+
body[storedKey] = n;
|
|
930
|
+
}
|
|
931
|
+
else if (type === 'boolean') {
|
|
932
|
+
if (v !== 'true' && v !== 'false')
|
|
933
|
+
return { error: `--param ${k} must be true or false` };
|
|
934
|
+
body[storedKey] = v === 'true';
|
|
935
|
+
}
|
|
936
|
+
else {
|
|
937
|
+
body[storedKey] = v;
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
const missing = [...stored.entries()].filter(([, sk]) => !Object.hasOwn(body, sk)).map(([b]) => b);
|
|
941
|
+
if (missing.length > 0)
|
|
942
|
+
return { error: `Missing param(s): ${missing.join(', ')} — expected: ${expected}` };
|
|
943
|
+
return { body };
|
|
944
|
+
}
|
|
883
945
|
export function attachTriggerCommand(parent, attachOpts = {}) {
|
|
884
946
|
return parent
|
|
885
947
|
.command('trigger <id>', attachOpts)
|
|
886
948
|
.description('Launch a scrap as a background worker (returns immediately)')
|
|
887
949
|
.option('-w, --watch', 'Poll for progress after triggering (#91 — the default async run happens in a separate cron pod; activities SSE never reaches it)')
|
|
888
950
|
.option('--wait', 'Run synchronously and wait for the result (legacy behaviour — prefer `trawl run` instead)')
|
|
951
|
+
.option('--param <key=value>', "Run with custom params (repeatable; key as in the scrap's params, TRAWL. prefix optional). Values are typed like the stored set. A one-off run, not added to the scrap's scenarios", (v, prev) => prev.concat(v), [])
|
|
889
952
|
.option('--json', 'Output the raw trigger payload as JSON')
|
|
890
953
|
.action(async (id, opts) => {
|
|
891
954
|
validateObjectId(id);
|
|
892
|
-
const
|
|
955
|
+
const pairs = opts.param ?? [];
|
|
956
|
+
const syntax = parseTriggerPairs(pairs);
|
|
957
|
+
if ('error' in syntax) {
|
|
958
|
+
usageError(syntax.error, { json: opts.json });
|
|
959
|
+
return;
|
|
960
|
+
}
|
|
961
|
+
let scrap;
|
|
962
|
+
let readFailed = false;
|
|
963
|
+
try {
|
|
964
|
+
scrap = await api.get(`/api/scraps/${id}`);
|
|
965
|
+
}
|
|
966
|
+
catch (e) {
|
|
967
|
+
if (pairs.length > 0)
|
|
968
|
+
throw e;
|
|
969
|
+
readFailed = true;
|
|
970
|
+
}
|
|
971
|
+
let body;
|
|
972
|
+
if (pairs.length > 0) {
|
|
973
|
+
const r = buildTriggerParams(typeof scrap === 'object' && scrap ? scrap : { _id: id }, pairs);
|
|
974
|
+
if ('error' in r) {
|
|
975
|
+
usageError(r.error, { json: opts.json });
|
|
976
|
+
return;
|
|
977
|
+
}
|
|
978
|
+
body = r.body;
|
|
979
|
+
}
|
|
980
|
+
if (scrap && typeof scrap === 'object' && !scrap.cron) {
|
|
981
|
+
console.error(chalk.yellow(` ⚠ Scrap ${id} has no schedule: nothing runs it unattended after this one-off run, so nothing checks its health. Add one: trawl scraps update ${id} --cron <expr>`));
|
|
982
|
+
}
|
|
983
|
+
const beforeRun = opts.watch
|
|
984
|
+
? readFailed
|
|
985
|
+
? { id: undefined, alreadyInFlight: false, captured: false }
|
|
986
|
+
: beforeRunStateFrom(scrap)
|
|
987
|
+
: undefined;
|
|
893
988
|
const path = opts.wait ? `/api/scraps/worker/${id}` : `/api/scraps/worker/${id}?wait=false`;
|
|
894
|
-
const call = () => (opts.wait ? api.postLongRunning(path,
|
|
989
|
+
const call = () => (opts.wait ? api.postLongRunning(path, body, { timeoutMs: LONG_RUN_TIMEOUT_MS }) : body ? api.post(path, body) : api.post(path));
|
|
895
990
|
const data = opts.json
|
|
896
991
|
? await call()
|
|
897
992
|
: await spin(call, {
|
package/dist/index.js
CHANGED
|
@@ -13,6 +13,7 @@ import { upgrade } from './commands/upgrade.js';
|
|
|
13
13
|
import { create } from './commands/create.js';
|
|
14
14
|
import { whoami } from './commands/whoami.js';
|
|
15
15
|
import { ping } from './commands/ping.js';
|
|
16
|
+
import { admin } from './commands/admin.js';
|
|
16
17
|
import { spec } from './commands/spec.js';
|
|
17
18
|
import { autoUpdateInstalledSkills } from './lib/skills.js';
|
|
18
19
|
import { maybeSuggestSkillsInstall } from './lib/skillsNudge.js';
|
|
@@ -70,6 +71,7 @@ export function createProgram() {
|
|
|
70
71
|
program.commandsGroup(MANAGEMENT_GROUP);
|
|
71
72
|
program.addCommand(scraps);
|
|
72
73
|
program.addCommand(skills);
|
|
74
|
+
program.addCommand(admin);
|
|
73
75
|
program.addCommand(login);
|
|
74
76
|
program.addCommand(logout);
|
|
75
77
|
program.addCommand(telemetry);
|
package/docs/agent-quickstart.md
CHANGED
|
@@ -84,7 +84,7 @@ trawl create <url> --prompt <goal> [--no-autofix] [--no-digest] [--json] # url
|
|
|
84
84
|
trawl list|ls [--json] [--status <s>] [--unhealthy] [--limit <n>] [--page <n>] List all scraps
|
|
85
85
|
trawl get <id> [--json] Get scrap details
|
|
86
86
|
trawl run <id> [--watch] [--json] Run a scrap (blocks until finished)
|
|
87
|
-
trawl trigger <id> [--watch] [--wait] [--json] Launch a scrap as a background worker
|
|
87
|
+
trawl trigger <id> [--param <k=v>]... [--watch] [--wait] [--json] Launch a scrap as a background worker
|
|
88
88
|
trawl data <id> [--json] [--fresh] [--errors] Get scrap data (last persisted run, or --fresh to launch one)
|
|
89
89
|
trawl runs|history <id> [--json] [-n <limit>] List past runs for a scrap
|
|
90
90
|
trawl run-info <hid> [--json] Show details of a single run
|