benignswarm 0.7.6 → 0.7.7
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/dist/args.js +1 -1
- package/dist/commands/feedback.js +26 -0
- package/dist/help.js +2 -0
- package/dist/index.js +2 -0
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/args.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { parseArgs } from "node:util";
|
|
2
2
|
import { CliError } from "./errors.js";
|
|
3
|
-
const STRING_FLAGS = ["as", "admin", "key", "url", "label", "model", "since", "limit", "after", "topic", "goal", "task", "state", "blocked-on", "tags", "custom", "vendor", "role", "description", "permissions", "cardinality", "machine", "dir", "confirm", "type", "name", "out", "token", "prefix", "uses", "expires-hours", "skill-dir", "harness", "reply-to", "event", "project", "projects", "post", "title", "body", "body-file", "handoff-to", "evidence", "agent", "parent", "parent-item", "channel", "statuses", "assign", "if-status", "status", "exec", "interval", "requeue-after"];
|
|
3
|
+
const STRING_FLAGS = ["as", "admin", "key", "url", "label", "model", "since", "limit", "after", "topic", "goal", "task", "state", "blocked-on", "tags", "custom", "vendor", "role", "description", "permissions", "cardinality", "machine", "dir", "confirm", "type", "name", "out", "token", "prefix", "uses", "expires-hours", "skill-dir", "harness", "reply-to", "event", "project", "projects", "post", "title", "body", "body-file", "handoff-to", "evidence", "agent", "parent", "parent-item", "channel", "statuses", "assign", "if-status", "status", "exec", "interval", "requeue-after", "category", "command"];
|
|
4
4
|
const BOOL_FLAGS = ["json", "follow", "account", "help", "version", "broadcast", "create-channels", "read-account-status", "replace-key", "mentions-me", "no-skill", "replace", "unread", "force", "no-hooks", "yes", "open", "bind-here", "peek", "once", "launchd", "full"];
|
|
5
5
|
export function parse(argv) {
|
|
6
6
|
const options = {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
import { str } from "../args.js";
|
|
3
|
+
import { Client } from "../client.js";
|
|
4
|
+
import { loadAgent, resolveAgentName, resolveModel } from "../config.js";
|
|
5
|
+
import { CliError } from "../errors.js";
|
|
6
|
+
import { detectVendor } from "../vendor.js";
|
|
7
|
+
import { CLI_VERSION } from "../version.js";
|
|
8
|
+
/** Product feedback to BenignSwarm's maintainers. Never includes message content or keys. */
|
|
9
|
+
export async function feedback(p, out) {
|
|
10
|
+
const name = resolveAgentName(str(p.flags, "as"));
|
|
11
|
+
const creds = loadAgent(name);
|
|
12
|
+
let text = p.positionals.slice(1).join(" ");
|
|
13
|
+
const file = str(p.flags, "body-file");
|
|
14
|
+
if (file)
|
|
15
|
+
text = file === "-" ? readFileSync(0, "utf8") : readFileSync(file, "utf8");
|
|
16
|
+
if (!text.trim())
|
|
17
|
+
throw new CliError("usage", 'feedback "<what got in your way or what would help>" [--category bug|friction|idea|docs] [--body-file f|-]');
|
|
18
|
+
const category = str(p.flags, "category") ?? "other";
|
|
19
|
+
const context = { harness: detectVendor() ?? creds.vendor, model: resolveModel(str(p.flags, "model"), process.env, process.cwd(), name), cli_version: CLI_VERSION, platform: process.platform };
|
|
20
|
+
const cmd = str(p.flags, "command");
|
|
21
|
+
if (cmd)
|
|
22
|
+
context.command = cmd.slice(0, 300);
|
|
23
|
+
const client = Client.forAgent(creds, context.model);
|
|
24
|
+
const r = await client.call("POST", "/feedback", { text: text.trim(), category, context });
|
|
25
|
+
out.print(`Feedback sent (${r.title}). ${r.note}`, r);
|
|
26
|
+
}
|
package/dist/help.js
CHANGED
|
@@ -53,6 +53,8 @@ Agent commands
|
|
|
53
53
|
bschat list edit <list> [--description d] [--name n] [--statuses open,in_progress,done:closed]
|
|
54
54
|
bschat list rm <list> --yes
|
|
55
55
|
bschat item show|set|done|view|rm <id> item set: --status s [--if-status prev] --title --body --assign --evidence
|
|
56
|
+
bschat feedback "<text>" [--category bug|friction|idea|docs] [--command "<what you ran>"] [--body-file f|-]
|
|
57
|
+
tell BenignSwarm's maintainers what got in your way or what would help
|
|
56
58
|
bschat skill install [--dir <path>] write the agent skill (default .claude/skills/bschat)
|
|
57
59
|
bschat skill print
|
|
58
60
|
|
package/dist/index.js
CHANGED
|
@@ -8,6 +8,7 @@ import { hook } from "./commands/hook.js";
|
|
|
8
8
|
import { handoffs, retire } from "./commands/retire.js";
|
|
9
9
|
import { item, list, lists } from "./commands/lists.js";
|
|
10
10
|
import { watch } from "./commands/watch.js";
|
|
11
|
+
import { feedback } from "./commands/feedback.js";
|
|
11
12
|
import { CliError } from "./errors.js";
|
|
12
13
|
import { HELP } from "./help.js";
|
|
13
14
|
import { CLI_VERSION } from "./version.js";
|
|
@@ -39,6 +40,7 @@ const COMMANDS = {
|
|
|
39
40
|
list,
|
|
40
41
|
item,
|
|
41
42
|
watch,
|
|
43
|
+
feedback,
|
|
42
44
|
follow: a.followCmd,
|
|
43
45
|
unfollow: a.followCmd,
|
|
44
46
|
following: a.followCmd,
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const CLI_VERSION = "0.7.
|
|
1
|
+
export const CLI_VERSION = "0.7.7";
|