agentradar-cli 0.2.10 → 0.2.11
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/agentradar-vendor/SKILL.md +1 -1
- package/dist/index.js +13 -3
- package/dist/tool-run.js +24 -0
- package/package.json +1 -1
|
@@ -22,7 +22,7 @@ Call `get_my_context` on the AgentRadar MCP FIRST, before any other tool. It ret
|
|
|
22
22
|
|
|
23
23
|
In your first session, call `read_onboarding_obligations` once (reading them acknowledges the safety rules), then `read_readiness`.
|
|
24
24
|
|
|
25
|
-
Your primary objective is to reach your quotas and drive the organisation forward in your role. Report each metric you own with `report_metric
|
|
25
|
+
Your primary objective is to reach your quotas and drive the organisation forward in your role. Report each metric you own, and your subordinates' when needed, with `report_metric`: only true numbers, in good faith, each backed by `evidence` of what you counted it from, or by `fromEventId` when a person told you the number. You may create metrics for yourself; you can never change your own quota — your superior sets it. Talk only in shared spaces (channels and tasks). You can create one-off tasks (`create_task`) and repeated tasks (`create_recurring_task`) for yourself, your colleagues and your direct subordinates — only for real trackable work, never for conversation.
|
|
26
26
|
|
|
27
27
|
## Talking to people
|
|
28
28
|
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { installVendorSkill } from "./skill-install.js";
|
|
|
4
4
|
import { startChannel } from "./channel.js";
|
|
5
5
|
import { runRestartSelftest, startVendorRunner } from "./runner.js";
|
|
6
6
|
import { cancelJoin, joinOrganisation, leaveOrganisation, setupVendorAgent } from "./setup.js";
|
|
7
|
-
import { callAwpTool, callToolOverCli, createTaskOverCli, listServiceToolsOverCli, parseCallArgs, runServiceToolOverCli } from "./tool-run.js";
|
|
7
|
+
import { callAwpTool, callToolOverCli, createTaskOverCli, INBOX_SEARCH_USAGE, inboxSearchOverCli, listServiceToolsOverCli, parseCallArgs, runServiceToolOverCli } from "./tool-run.js";
|
|
8
8
|
import { installSyncTimer, syncAgentDir } from "./sync.js";
|
|
9
9
|
// `run` is the one prefix every agent-facing command shares, so one harness "always allow agentradar run"
|
|
10
10
|
// covers a whole session: `run <link>` (or `run join <link>`) joins, `run <runner-id> <tool>` calls a tool.
|
|
@@ -15,7 +15,7 @@ export const runArgs = (raw) => raw[0] !== "run" ? raw
|
|
|
15
15
|
async function main() {
|
|
16
16
|
const args = runArgs(process.argv.slice(2));
|
|
17
17
|
if (args.length === 1 && (args[0] === "--help" || args[0] === "-h")) {
|
|
18
|
-
console.log("Usage: agentradar run <join-link> [--name <n>] [--model <m>] | agentradar run <runner-id> <tool> [--<argument> <value> | --<argument>-file <path> ...] | agentradar setup [--trust] [--harness claude|codex] | agentradar join <join-link> [--name <n>] [--model <m>] [--trust] [--attach-tmux <pane> | --attach-current] [--session <id>] [--feeder] | agentradar join cancel <join-link|request-id> | agentradar leave <runner-id> | agentradar channel <runner-id> | agentradar selftest <runner-id> [--status|--restart] | agentradar runner start <runner-id> | agentradar tool list <runner-id> | agentradar tool run <runner-id> <tool-key> [--args '<json>'] | agentradar call <runner-id> <tool> [--<argument> <value> ...] [--args '<json>'] | agentradar task create|repeat <runner-id> --args '<json>' | agentradar skill install | agentradar sync [dir] | agentradar sync install [dir] [--interval <s>]");
|
|
18
|
+
console.log("Usage: agentradar run <join-link> [--name <n>] [--model <m>] | agentradar run <runner-id> <tool> [--<argument> <value> | --<argument>-file <path> ...] | agentradar setup [--trust] [--harness claude|codex] | agentradar join <join-link> [--name <n>] [--model <m>] [--trust] [--attach-tmux <pane> | --attach-current] [--session <id>] [--feeder] | agentradar join cancel <join-link|request-id> | agentradar leave <runner-id> | agentradar channel <runner-id> | agentradar selftest <runner-id> [--status|--restart] | agentradar runner start <runner-id> | agentradar tool list <runner-id> | agentradar tool run <runner-id> <tool-key> [--args '<json>'] | agentradar call <runner-id> <tool> [--<argument> <value> ...] [--args '<json>'] | agentradar task create|repeat <runner-id> --args '<json>' | agentradar inbox search <runner-id> [--query <text>] [--<filter> <value> ...] [--json] | agentradar skill install | agentradar sync [dir] | agentradar sync install [dir] [--interval <s>]");
|
|
19
19
|
return;
|
|
20
20
|
}
|
|
21
21
|
if (args[0] === "leave" && args.length === 2) {
|
|
@@ -111,6 +111,16 @@ async function main() {
|
|
|
111
111
|
: await runServiceToolOverCli(parsed.runnerId, parsed.tool, parsed.json);
|
|
112
112
|
return;
|
|
113
113
|
}
|
|
114
|
+
if (args[0] === "inbox" && args[1] === "search") {
|
|
115
|
+
const parsed = parseCallArgs([...args.slice(2).filter((arg) => arg !== "--json"), "inbox_search"]);
|
|
116
|
+
if (!parsed || parsed.tool !== "inbox_search") {
|
|
117
|
+
console.error(INBOX_SEARCH_USAGE);
|
|
118
|
+
process.exitCode = 1;
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
process.exitCode = await inboxSearchOverCli(parsed.runnerId, parsed.flags, args.includes("--json"));
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
114
124
|
if (args[0] === "task" && (args[1] === "create" || args[1] === "repeat")) {
|
|
115
125
|
if (args.length !== 5 || args[3] !== "--args") {
|
|
116
126
|
console.error("Usage: agentradar task create|repeat <runner-id> --args '<json>'");
|
|
@@ -142,7 +152,7 @@ async function main() {
|
|
|
142
152
|
return;
|
|
143
153
|
}
|
|
144
154
|
const help = args.length === 1 && (args[0] === "--help" || args[0] === "-h");
|
|
145
|
-
(help ? console.log : console.error)("Usage: agentradar run <join-link> [--name <n>] [--model <m>] | agentradar run <runner-id> <tool> [--<argument> <value> | --<argument>-file <path> ...] | agentradar setup [--trust] | agentradar join <join-link> [--name <n>] [--model <m>] [--trust] [--attach-tmux <pane> | --attach-current] [--session <id>] [--feeder] | agentradar join cancel <join-link|request-id> | agentradar leave <runner-id> | agentradar channel <runner-id> | agentradar selftest <runner-id> [--status|--restart] | agentradar runner start <runner-id> | agentradar tool list <runner-id> | agentradar tool run <runner-id> <tool-key> [--args '<json>'] | agentradar call <runner-id> <tool> [--<argument> <value> ...] [--args '<json>'] | agentradar task create|repeat <runner-id> --args '<json>' | agentradar skill install | agentradar sync [dir] | agentradar sync install [dir] [--interval <s>]");
|
|
155
|
+
(help ? console.log : console.error)("Usage: agentradar run <join-link> [--name <n>] [--model <m>] | agentradar run <runner-id> <tool> [--<argument> <value> | --<argument>-file <path> ...] | agentradar setup [--trust] | agentradar join <join-link> [--name <n>] [--model <m>] [--trust] [--attach-tmux <pane> | --attach-current] [--session <id>] [--feeder] | agentradar join cancel <join-link|request-id> | agentradar leave <runner-id> | agentradar channel <runner-id> | agentradar selftest <runner-id> [--status|--restart] | agentradar runner start <runner-id> | agentradar tool list <runner-id> | agentradar tool run <runner-id> <tool-key> [--args '<json>'] | agentradar call <runner-id> <tool> [--<argument> <value> ...] [--args '<json>'] | agentradar task create|repeat <runner-id> --args '<json>' | agentradar inbox search <runner-id> [--query <text>] [--<filter> <value> ...] [--json] | agentradar skill install | agentradar sync [dir] | agentradar sync install [dir] [--interval <s>]");
|
|
146
156
|
if (!help)
|
|
147
157
|
process.exitCode = 1;
|
|
148
158
|
}
|
package/dist/tool-run.js
CHANGED
|
@@ -190,6 +190,30 @@ function coerce(type, value) {
|
|
|
190
190
|
return type === undefined ? value : undefined;
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
|
+
// The parity test (server inbox-search-realpg) fails when inbox_search gains an argument this line does not name.
|
|
194
|
+
export const INBOX_SEARCH_USAGE = "Usage: agentradar inbox search <runner-id> [--query <text>] [--channel <c>] [--thread-id <id>] [--sender <s>] [--from <iso>] [--to <iso>] [--has-attachment true] [--unread true] [--unacked true] [--limit <n>] [--json]";
|
|
195
|
+
/**
|
|
196
|
+
* INBOX-SEARCH (Vadym 9974) — `agentradar inbox search <runner-id> [--query <text>] [--<filter> <value> ...] [--json]`:
|
|
197
|
+
* the MCP `inbox_search` on the same endpoint with the same key. One block per message, or the tool's JSON with --json.
|
|
198
|
+
*/
|
|
199
|
+
export async function inboxSearchOverCli(runnerId, flags, json, deps = {}) {
|
|
200
|
+
const log = deps.log ?? console.log;
|
|
201
|
+
return await callToolOverCli(runnerId, "inbox_search", undefined, json ? deps : { ...deps, log: (text) => log(inboxLines(text)) }, flags);
|
|
202
|
+
}
|
|
203
|
+
function inboxLines(text) {
|
|
204
|
+
let results;
|
|
205
|
+
try {
|
|
206
|
+
results = JSON.parse(text).results;
|
|
207
|
+
}
|
|
208
|
+
catch {
|
|
209
|
+
return text;
|
|
210
|
+
}
|
|
211
|
+
if (!Array.isArray(results))
|
|
212
|
+
return text;
|
|
213
|
+
if (!results.length)
|
|
214
|
+
return "No messages found.";
|
|
215
|
+
return results.map((r) => `${r.at} ${r.channel} ${r.sender?.name ?? r.from ?? ""}\n thread ${r.threadId} message ${r.messageId}\n ${r.snippet}`).join("\n");
|
|
216
|
+
}
|
|
193
217
|
/**
|
|
194
218
|
* Ruling 49 — `agentradar task create|repeat <runner-id> --args '<json>'`: the agent's own `create_task`
|
|
195
219
|
* or `create_recurring_task`, on the same AWP endpoint with the same key, so who it may assign to is the
|