@cleanslop/cli 0.1.0-beta.41 → 0.1.0-beta.42
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/assets/skill-core.md +4 -0
- package/dist/args.d.ts +2 -1
- package/dist/args.js +46 -0
- package/dist/args.js.map +1 -1
- package/dist/commands/feedback.d.ts +7 -0
- package/dist/commands/feedback.js +75 -0
- package/dist/commands/feedback.js.map +1 -0
- package/dist/config.d.ts +2 -2
- package/dist/config.js +1 -1
- package/dist/main.js +3 -0
- package/dist/main.js.map +1 -1
- package/dist/types.d.ts +7 -1
- package/package.json +1 -1
package/assets/skill-core.md
CHANGED
|
@@ -73,6 +73,10 @@ Stop when all listed issues are resolved; the same fingerprints are still open a
|
|
|
73
73
|
|
|
74
74
|
Tell the human what you fixed, what is still open, what needs their input, and the web link from the CLI.
|
|
75
75
|
|
|
76
|
+
## Feedback
|
|
77
|
+
|
|
78
|
+
When the human is unhappy with CleanSlop, a step failed in a way you can't explain, they say a finding is wrong, or they have an idea, offer to send it to the CleanSlop team. Ask first and send their words, quoted. Run `cleanslop feedback "<their words>" --kind bug|confusing|false_positive|idea|other` (MCP: `send_feedback`); add `--scan <id>` and, for a wrong finding, `--finding <fp1_…>` from the report. Never include source code, file contents, secrets, tokens or paths. Later, or when the human asks whether CleanSlop answered, run `cleanslop feedback --replies` (MCP: `feedback_replies`) and show any replies in full; quote their words, never paraphrase them into a complaint they didn't make.
|
|
79
|
+
|
|
76
80
|
## Email
|
|
77
81
|
|
|
78
82
|
Do not email the report yourself. Ask the human the exact masked-recipient question from `email_opt_in` or `GET /api/agent/v1/scans/{id}/email` (for example, “Should CleanSlop email this report to e***@s***.com?”). Quote that question exactly as `promptText` or `--consent`. Never invent a recipient. If they agree, run `cleanslop email <scan-id> --consent "<the exact question you asked>"` or call `email_opt_in`.
|
package/dist/args.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ParsedArgs } from "./types.js";
|
|
2
|
+
export declare const FEEDBACK_KINDS: readonly ["bug", "confusing", "false_positive", "idea", "other"];
|
|
2
3
|
export declare function parseWaitMs(raw: string, fallback?: number): number;
|
|
3
4
|
export declare function parseArgs(argv: string[], defaultWaitMs?: number): ParsedArgs;
|
|
4
|
-
export declare const HELP_TEXT = "cleanslop \u2014 CleanSlop agent CLI\n\nUsage:\n cleanslop [scan] [--wait [duration]] [--json] [--force] [--preview] [--upload]\n cleanslop login [--link] [--agree] [--no-wait | --resume]\n cleanslop link-identity [--no-wait | --resume]\n cleanslop credits buy --link [--pack p5] [--no-promo] [--no-wait | --resume]\n cleanslop redeem <code>\n cleanslop billing\n cleanslop plan [starter|pro|max] [--no-wait | --resume]\n cleanslop logout [--all]\n cleanslop whoami\n cleanslop status [id] [--wait [duration]]\n cleanslop report [id] [--format md|json] [--preview]\n cleanslop email <id> --consent \"<exact question>\" [--reply \"<human reply>\"]\n cleanslop setup [--dry-run] [--uninstall] [--project] [--yes]\n\nscan is the default command. GitHub App repos, or a packed upload when /me\nreports uploads:true (Link). With uploadFallback:true (GitHub), a folder not\non GitHub asks whether to upload its files, and a dirty or unpushed checkout\nasks whether to upload them or push first. --dry-run on scan lists the upload pack.\n\nbilling (Link accounts): prints where the human manages the plan and credits\non the web and the masked email to enter there, then exits 10 to relay it.\n\nplan (Link accounts): starts a monthly plan paid each month from a recurring\nLink approval. Without a plan name it asks which one. When CleanSlop offers no\nLink plans, it does what billing does.\n\nWait:\n --wait poll until final or the budget (default 8 minutes)\n --wait 75m Claude Code background budget (hours/minutes/seconds: 1h, 75m, 30s)\n At the deadline: exit 75 and print a resume command. The scan keeps running.\n\nFlags:\n --json one JSON document on stdout\n --force skip same-commit dedupe (sends Idempotency-Key)\n --preview first-pass report before judgment is final\n --upload scan: upload the local files instead of the pushed commit (after the human picks it)\n --no-wait login / link-identity / credits buy / plan: print what to approve and exit 10\n --resume login / link-identity / credits buy / plan: continue a pending --no-wait approval\n --link login: Stripe Link sign-up / sign-in (requires link-cli)\n --agree login --link: pass only after the human answers yes to the quoted terms question\n (--accept-terms --yes-share-email together still work)\n --pack credits buy: p5, p15, or p40. Required without a terminal (the human picks); a terminal defaults to p5. Price and network id come from CleanSlop.\n --no-promo credits buy: skip the promo-code choice (the human already chose to buy)\n --all logout: revoke every saved token and delete all local CleanSlop data\n (without it, logout signs out of this origin and drops its pending login and Link payment)\n --dry-run setup: print the plan. scan (upload): list the pack, upload nothing\n --uninstall setup: remove marker blocks / skill files\n --project setup: project files instead of user scope\n --yes setup: write in a non-TTY (otherwise non-TTY is a plan only)\n --consent email: the exact masked-recipient question you asked\n --reply email: optional verbatim human reply\n\nEnv:\n CLEANSLOP_ORIGIN API origin (default https://cleanslop.com)\n CLEANSLOP_TOKEN bearer token override (never printed)\n CLEANSLOP_LINK_CLI path to link-cli (default: link-cli on PATH)\n\nCredentials: $XDG_CONFIG_HOME/cleanslop/credentials.json or ~/.config/cleanslop/\nDirectory 0700, file 0600. Never stored inside the git worktree.\n\nExit codes: 0 ok \u00B7 1 unexpected \u00B7 2 usage \u00B7 10 human action \u00B7 11 payment\n 12 policy \u00B7 13 source \u00B7 20 scan failed \u00B7 75 still running\n\nNever open, approve, or pay yourself. Relay CLEANSLOP_ACTION_REQUIRED blocks.\nAsk a CLEANSLOP_QUESTION with your multiple-choice question tool when you have\none (never ask the human to type \"Done\"), using exactly its options. Never\nanswer for the human.\n";
|
|
5
|
+
export declare const HELP_TEXT = "cleanslop \u2014 CleanSlop agent CLI\n\nUsage:\n cleanslop [scan] [--wait [duration]] [--json] [--force] [--preview] [--upload]\n cleanslop login [--link] [--agree] [--no-wait | --resume]\n cleanslop link-identity [--no-wait | --resume]\n cleanslop credits buy --link [--pack p5] [--no-promo] [--no-wait | --resume]\n cleanslop redeem <code>\n cleanslop billing\n cleanslop plan [starter|pro|max] [--no-wait | --resume]\n cleanslop logout [--all]\n cleanslop whoami\n cleanslop status [id] [--wait [duration]]\n cleanslop report [id] [--format md|json] [--preview]\n cleanslop email <id> --consent \"<exact question>\" [--reply \"<human reply>\"]\n cleanslop setup [--dry-run] [--uninstall] [--project] [--yes]\n cleanslop feedback \"<message>\" [--kind bug|confusing|false_positive|idea|other]\n [--scan <id>] [--finding <fp1_\u2026>] [--new]\n cleanslop feedback --replies\n\nscan is the default command. GitHub App repos, or a packed upload when /me\nreports uploads:true (Link). With uploadFallback:true (GitHub), a folder not\non GitHub asks whether to upload its files, and a dirty or unpushed checkout\nasks whether to upload them or push first. --dry-run on scan lists the upload pack.\n\nbilling (Link accounts): prints where the human manages the plan and credits\non the web and the masked email to enter there, then exits 10 to relay it.\n\nfeedback: sends the human's words to the CleanSlop team (ask first; no code,\nfile contents, secrets or paths). --replies shows answers from the team.\n\nplan (Link accounts): starts a monthly plan paid each month from a recurring\nLink approval. Without a plan name it asks which one. When CleanSlop offers no\nLink plans, it does what billing does.\n\nWait:\n --wait poll until final or the budget (default 8 minutes)\n --wait 75m Claude Code background budget (hours/minutes/seconds: 1h, 75m, 30s)\n At the deadline: exit 75 and print a resume command. The scan keeps running.\n\nFlags:\n --json one JSON document on stdout\n --force skip same-commit dedupe (sends Idempotency-Key)\n --preview first-pass report before judgment is final\n --upload scan: upload the local files instead of the pushed commit (after the human picks it)\n --no-wait login / link-identity / credits buy / plan: print what to approve and exit 10\n --resume login / link-identity / credits buy / plan: continue a pending --no-wait approval\n --link login: Stripe Link sign-up / sign-in (requires link-cli)\n --agree login --link: pass only after the human answers yes to the quoted terms question\n (--accept-terms --yes-share-email together still work)\n --pack credits buy: p5, p15, or p40. Required without a terminal (the human picks); a terminal defaults to p5. Price and network id come from CleanSlop.\n --no-promo credits buy: skip the promo-code choice (the human already chose to buy)\n --all logout: revoke every saved token and delete all local CleanSlop data\n (without it, logout signs out of this origin and drops its pending login and Link payment)\n --dry-run setup: print the plan. scan (upload): list the pack, upload nothing\n --uninstall setup: remove marker blocks / skill files\n --project setup: project files instead of user scope\n --yes setup: write in a non-TTY (otherwise non-TTY is a plan only)\n --consent email: the exact masked-recipient question you asked\n --reply email: optional verbatim human reply\n --kind feedback: what it is about (default other)\n --scan feedback: the scan it is about\n --finding feedback: a finding id from that scan's report (false_positive)\n --new feedback: start a new conversation instead of adding to the last\n --replies feedback: show replies from the CleanSlop team\n\nEnv:\n CLEANSLOP_ORIGIN API origin (default https://cleanslop.com)\n CLEANSLOP_TOKEN bearer token override (never printed)\n CLEANSLOP_LINK_CLI path to link-cli (default: link-cli on PATH)\n\nCredentials: $XDG_CONFIG_HOME/cleanslop/credentials.json or ~/.config/cleanslop/\nDirectory 0700, file 0600. Never stored inside the git worktree.\n\nExit codes: 0 ok \u00B7 1 unexpected \u00B7 2 usage \u00B7 10 human action \u00B7 11 payment\n 12 policy \u00B7 13 source \u00B7 20 scan failed \u00B7 75 still running\n\nNever open, approve, or pay yourself. Relay CLEANSLOP_ACTION_REQUIRED blocks.\nAsk a CLEANSLOP_QUESTION with your multiple-choice question tool when you have\none (never ask the human to type \"Done\"), using exactly its options. Never\nanswer for the human.\n";
|
package/dist/args.js
CHANGED
|
@@ -14,7 +14,9 @@ const COMMANDS = [
|
|
|
14
14
|
"redeem",
|
|
15
15
|
"billing",
|
|
16
16
|
"plan",
|
|
17
|
+
"feedback",
|
|
17
18
|
];
|
|
19
|
+
export const FEEDBACK_KINDS = ["bug", "confusing", "false_positive", "idea", "other"];
|
|
18
20
|
function isCommand(value) {
|
|
19
21
|
return COMMANDS.includes(value);
|
|
20
22
|
}
|
|
@@ -62,6 +64,11 @@ function emptyArgs(defaultWaitMs) {
|
|
|
62
64
|
amount: null,
|
|
63
65
|
networkId: null,
|
|
64
66
|
spendRequestId: null,
|
|
67
|
+
feedbackKind: null,
|
|
68
|
+
scanId: null,
|
|
69
|
+
findingId: null,
|
|
70
|
+
newTicket: false,
|
|
71
|
+
replies: false,
|
|
65
72
|
};
|
|
66
73
|
}
|
|
67
74
|
export function parseArgs(argv, defaultWaitMs = DEFAULT_WAIT_MS) {
|
|
@@ -154,6 +161,34 @@ export function parseArgs(argv, defaultWaitMs = DEFAULT_WAIT_MS) {
|
|
|
154
161
|
out.networkId = next;
|
|
155
162
|
break;
|
|
156
163
|
}
|
|
164
|
+
case "--kind": {
|
|
165
|
+
const next = rest.shift();
|
|
166
|
+
if (!next || !FEEDBACK_KINDS.includes(next)) {
|
|
167
|
+
throw usageError(`--kind must be one of ${FEEDBACK_KINDS.join(", ")}`);
|
|
168
|
+
}
|
|
169
|
+
out.feedbackKind = next;
|
|
170
|
+
break;
|
|
171
|
+
}
|
|
172
|
+
case "--scan": {
|
|
173
|
+
const next = rest.shift();
|
|
174
|
+
if (!next)
|
|
175
|
+
throw usageError("--scan requires a scan id");
|
|
176
|
+
out.scanId = next;
|
|
177
|
+
break;
|
|
178
|
+
}
|
|
179
|
+
case "--finding": {
|
|
180
|
+
const next = rest.shift();
|
|
181
|
+
if (!next)
|
|
182
|
+
throw usageError("--finding requires a finding id (fp1_…)");
|
|
183
|
+
out.findingId = next;
|
|
184
|
+
break;
|
|
185
|
+
}
|
|
186
|
+
case "--new":
|
|
187
|
+
out.newTicket = true;
|
|
188
|
+
break;
|
|
189
|
+
case "--replies":
|
|
190
|
+
out.replies = true;
|
|
191
|
+
break;
|
|
157
192
|
case "--spend-request-id": {
|
|
158
193
|
const next = rest.shift();
|
|
159
194
|
if (!next)
|
|
@@ -222,6 +257,9 @@ Usage:
|
|
|
222
257
|
cleanslop report [id] [--format md|json] [--preview]
|
|
223
258
|
cleanslop email <id> --consent "<exact question>" [--reply "<human reply>"]
|
|
224
259
|
cleanslop setup [--dry-run] [--uninstall] [--project] [--yes]
|
|
260
|
+
cleanslop feedback "<message>" [--kind bug|confusing|false_positive|idea|other]
|
|
261
|
+
[--scan <id>] [--finding <fp1_…>] [--new]
|
|
262
|
+
cleanslop feedback --replies
|
|
225
263
|
|
|
226
264
|
scan is the default command. GitHub App repos, or a packed upload when /me
|
|
227
265
|
reports uploads:true (Link). With uploadFallback:true (GitHub), a folder not
|
|
@@ -231,6 +269,9 @@ asks whether to upload them or push first. --dry-run on scan lists the upload pa
|
|
|
231
269
|
billing (Link accounts): prints where the human manages the plan and credits
|
|
232
270
|
on the web and the masked email to enter there, then exits 10 to relay it.
|
|
233
271
|
|
|
272
|
+
feedback: sends the human's words to the CleanSlop team (ask first; no code,
|
|
273
|
+
file contents, secrets or paths). --replies shows answers from the team.
|
|
274
|
+
|
|
234
275
|
plan (Link accounts): starts a monthly plan paid each month from a recurring
|
|
235
276
|
Link approval. Without a plan name it asks which one. When CleanSlop offers no
|
|
236
277
|
Link plans, it does what billing does.
|
|
@@ -260,6 +301,11 @@ Flags:
|
|
|
260
301
|
--yes setup: write in a non-TTY (otherwise non-TTY is a plan only)
|
|
261
302
|
--consent email: the exact masked-recipient question you asked
|
|
262
303
|
--reply email: optional verbatim human reply
|
|
304
|
+
--kind feedback: what it is about (default other)
|
|
305
|
+
--scan feedback: the scan it is about
|
|
306
|
+
--finding feedback: a finding id from that scan's report (false_positive)
|
|
307
|
+
--new feedback: start a new conversation instead of adding to the last
|
|
308
|
+
--replies feedback: show replies from the CleanSlop team
|
|
263
309
|
|
|
264
310
|
Env:
|
|
265
311
|
CLEANSLOP_ORIGIN API origin (default https://cleanslop.com)
|
package/dist/args.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"args.js","sourceRoot":"","sources":["../src/args.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAGvC,MAAM,QAAQ,GAA2B;IACvC,MAAM;IACN,OAAO;IACP,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,OAAO;IACP,eAAe;IACf,SAAS;IACT,QAAQ;IACR,SAAS;IACT,MAAM;
|
|
1
|
+
{"version":3,"file":"args.js","sourceRoot":"","sources":["../src/args.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,a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,EAAE,CAAC;oBACX,MAAM,UAAU,CAAC,8BAA8B,KAAK,EAAE,CAAC,CAAC;gBAC1D,CAAC;gBACD,GAAG,CAAC,EAAE,GAAG,KAAK,CAAC;gBACf,MAAM;QACV,CAAC;IACH,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC;AAED,MAAM,CAAC,MAAM,SAAS,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiFxB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CliDeps } from "../deps.js";
|
|
2
|
+
import type { ParsedArgs } from "../types.js";
|
|
3
|
+
/**
|
|
4
|
+
* `cleanslop feedback "<message>"`: send the human's feedback to the CleanSlop
|
|
5
|
+
* team. `cleanslop feedback --replies`: show the team's answers.
|
|
6
|
+
*/
|
|
7
|
+
export declare function runFeedback(deps: CliDeps, args: ParsedArgs): Promise<number>;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { requireToken, resolveOrigin } from "../credentials.js";
|
|
2
|
+
import { EXIT_OK, usageError } from "../exit.js";
|
|
3
|
+
import { asRecord, httpRequest, requireOk } from "../http.js";
|
|
4
|
+
import { writeJson } from "../output.js";
|
|
5
|
+
const FEEDBACK_PATH = "/api/agent/v1/feedback";
|
|
6
|
+
/**
|
|
7
|
+
* `cleanslop feedback "<message>"`: send the human's feedback to the CleanSlop
|
|
8
|
+
* team. `cleanslop feedback --replies`: show the team's answers.
|
|
9
|
+
*/
|
|
10
|
+
export async function runFeedback(deps, args) {
|
|
11
|
+
const origin = resolveOrigin(deps);
|
|
12
|
+
if (args.replies) {
|
|
13
|
+
if (args.id)
|
|
14
|
+
throw usageError("--replies takes no message: cleanslop feedback --replies");
|
|
15
|
+
const creds = requireToken(deps, origin);
|
|
16
|
+
const result = requireOk(await httpRequest(deps, origin, "GET", FEEDBACK_PATH, { token: creds.token }));
|
|
17
|
+
if (args.json) {
|
|
18
|
+
writeJson(deps, result.json);
|
|
19
|
+
return EXIT_OK;
|
|
20
|
+
}
|
|
21
|
+
deps.io.stdout(formatReplies(result.json));
|
|
22
|
+
return EXIT_OK;
|
|
23
|
+
}
|
|
24
|
+
const message = args.id?.trim();
|
|
25
|
+
if (!message) {
|
|
26
|
+
throw usageError('Pass the human\'s words: cleanslop feedback "<message>"');
|
|
27
|
+
}
|
|
28
|
+
if (args.findingId && !args.scanId) {
|
|
29
|
+
throw usageError("--finding needs the --scan it came from");
|
|
30
|
+
}
|
|
31
|
+
const creds = requireToken(deps, origin);
|
|
32
|
+
const body = { message };
|
|
33
|
+
if (args.feedbackKind)
|
|
34
|
+
body.kind = args.feedbackKind;
|
|
35
|
+
if (args.scanId)
|
|
36
|
+
body.scanId = args.scanId;
|
|
37
|
+
if (args.findingId)
|
|
38
|
+
body.findingId = args.findingId;
|
|
39
|
+
if (args.newTicket)
|
|
40
|
+
body.newTicket = true;
|
|
41
|
+
const result = requireOk(await httpRequest(deps, origin, "POST", FEEDBACK_PATH, { token: creds.token, body }));
|
|
42
|
+
if (args.json) {
|
|
43
|
+
writeJson(deps, result.json);
|
|
44
|
+
return EXIT_OK;
|
|
45
|
+
}
|
|
46
|
+
const rec = asRecord(result.json);
|
|
47
|
+
const note = typeof rec?.message === "string" ? rec.message : "Thanks, the CleanSlop team will read this.";
|
|
48
|
+
const head = rec?.status === "sent"
|
|
49
|
+
? "Sent to the CleanSlop team."
|
|
50
|
+
: "Saved. It will reach the CleanSlop team shortly.";
|
|
51
|
+
deps.io.stdout(`${head}\n${note}\n`);
|
|
52
|
+
return EXIT_OK;
|
|
53
|
+
}
|
|
54
|
+
function formatReplies(json) {
|
|
55
|
+
const rec = asRecord(json);
|
|
56
|
+
const tickets = Array.isArray(rec?.tickets) ? rec.tickets : [];
|
|
57
|
+
const lines = [];
|
|
58
|
+
for (const raw of tickets) {
|
|
59
|
+
const ticket = asRecord(raw);
|
|
60
|
+
const replies = Array.isArray(ticket?.replies) ? ticket.replies : [];
|
|
61
|
+
const where = typeof ticket?.number === "number" ? ` (conversation #${ticket.number})` : "";
|
|
62
|
+
for (const reply of replies) {
|
|
63
|
+
const r = asRecord(reply);
|
|
64
|
+
if (typeof r?.body !== "string" || !r.body)
|
|
65
|
+
continue;
|
|
66
|
+
const from = typeof r.from === "string" && r.from ? r.from : "CleanSlop";
|
|
67
|
+
lines.push(`Reply from ${from}${where}:\n${r.body}\n`);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
const message = typeof rec?.message === "string" ? rec.message : "";
|
|
71
|
+
if (lines.length === 0)
|
|
72
|
+
return `${message || "No new replies from the CleanSlop team yet."}\n`;
|
|
73
|
+
return `${lines.join("\n")}\n${message}\n`;
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=feedback.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feedback.js","sourceRoot":"","sources":["../../src/commands/feedback.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEhE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzC,MAAM,aAAa,GAAG,wBAAwB,CAAC;AAE/C;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,IAAa,EAAE,IAAgB;IAC/D,MAAM,MAAM,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;IACnC,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;QACjB,IAAI,IAAI,CAAC,EAAE;YAAE,MAAM,UAAU,CAAC,0DAA0D,CAAC,CAAC;QAC1F,MAAM,KAAK,GAAG,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACzC,MAA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AC,CAAC,mBAAmB,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;QAC5F,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;YAC5B,MAAM,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;YAC1B,IAAI,OAAO,CAAC,EAAE,IAAI,KAAK,QAAQ,IAAI,CAAC,CAAC,CAAC,IAAI;gBAAE,SAAS;YACrD,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,IAAI,KAAK,QAAQ,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC;YACzE,KAAK,CAAC,IAAI,CAAC,cAAc,IAAI,GAAG,KAAK,MAAM,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC;QACzD,CAAC;IACH,CAAC;IACD,MAAM,OAAO,GAAG,OAAO,GAAG,EAAE,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;IACpE,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,GAAG,OAAO,IAAI,6CAA6C,IAAI,CAAC;IAC/F,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,OAAO,IAAI,CAAC;AAC7C,CAAC"}
|
package/dist/config.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export declare const PACKAGE_NAME = "@cleanslop/cli";
|
|
2
|
-
export declare const PACKAGE_VERSION = "0.1.0-beta.
|
|
2
|
+
export declare const PACKAGE_VERSION = "0.1.0-beta.42";
|
|
3
3
|
export declare const CLIENT_ID = "cleanslop-cli";
|
|
4
4
|
export declare const DEFAULT_ORIGIN = "https://cleanslop.com";
|
|
5
5
|
export declare const DEFAULT_WAIT_MS: number;
|
|
6
6
|
export declare const MIN_POLL_MS = 3000;
|
|
7
7
|
export declare const LONGPOLL_MAX_SEC = 45;
|
|
8
8
|
export declare const DEVICE_GRANT_TYPE = "urn:ietf:params:oauth:grant-type:device_code";
|
|
9
|
-
export declare const USER_AGENT = "cleanslop-cli/0.1.0-beta.
|
|
9
|
+
export declare const USER_AGENT = "cleanslop-cli/0.1.0-beta.42";
|
|
10
10
|
export declare const CREDENTIALS_FILE = "credentials.json";
|
|
11
11
|
export declare const PENDING_LOGIN_FILE = "pending-login.json";
|
|
12
12
|
export declare const PENDING_SPEND_FILE = "pending-spend-request.json";
|
package/dist/config.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export const PACKAGE_NAME = "@cleanslop/cli";
|
|
2
|
-
export const PACKAGE_VERSION = "0.1.0-beta.
|
|
2
|
+
export const PACKAGE_VERSION = "0.1.0-beta.42";
|
|
3
3
|
export const CLIENT_ID = "cleanslop-cli";
|
|
4
4
|
export const DEFAULT_ORIGIN = "https://cleanslop.com";
|
|
5
5
|
export const DEFAULT_WAIT_MS = 8 * 60 * 1000;
|
package/dist/main.js
CHANGED
|
@@ -7,6 +7,7 @@ import { runLogin } from "./commands/login.js";
|
|
|
7
7
|
import { runLogout } from "./commands/logout.js";
|
|
8
8
|
import { runEmail } from "./commands/email.js";
|
|
9
9
|
import { runPlan } from "./commands/plan.js";
|
|
10
|
+
import { runFeedback } from "./commands/feedback.js";
|
|
10
11
|
import { runRedeem } from "./commands/redeem.js";
|
|
11
12
|
import { runReport } from "./commands/report.js";
|
|
12
13
|
import { runScan } from "./commands/scan.js";
|
|
@@ -57,6 +58,8 @@ export async function dispatch(deps, args) {
|
|
|
57
58
|
return runBilling(deps, args);
|
|
58
59
|
case "plan":
|
|
59
60
|
return runPlan(deps, args);
|
|
61
|
+
case "feedback":
|
|
62
|
+
return runFeedback(deps, args);
|
|
60
63
|
default: {
|
|
61
64
|
const _exhaustive = args.command;
|
|
62
65
|
return _exhaustive;
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"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C,MAAM,CAAC,GAAG,CAAC,CAAC;QACjE,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,OAAO,IAAI,CAAC,CAAC;QAC/B,OAAO,eAAe,CAAC;IACzB,CAAC;AACH,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type CommandName = "scan" | "login" | "logout" | "whoami" | "status" | "report" | "setup" | "email" | "link-identity" | "credits" | "redeem" | "billing" | "plan";
|
|
1
|
+
export type CommandName = "scan" | "login" | "logout" | "whoami" | "status" | "report" | "setup" | "email" | "link-identity" | "credits" | "redeem" | "billing" | "plan" | "feedback";
|
|
2
2
|
export type ReportFormat = "md" | "json";
|
|
3
3
|
export type ParsedArgs = {
|
|
4
4
|
command: CommandName;
|
|
@@ -30,6 +30,12 @@ export type ParsedArgs = {
|
|
|
30
30
|
amount: number | null;
|
|
31
31
|
networkId: string | null;
|
|
32
32
|
spendRequestId: string | null;
|
|
33
|
+
/** feedback: bug | confusing | false_positive | idea | other */
|
|
34
|
+
feedbackKind: string | null;
|
|
35
|
+
scanId: string | null;
|
|
36
|
+
findingId: string | null;
|
|
37
|
+
newTicket: boolean;
|
|
38
|
+
replies: boolean;
|
|
33
39
|
};
|
|
34
40
|
export type AgentScan = {
|
|
35
41
|
id: string;
|