agentradar-cli 0.3.11 → 0.3.12
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.
|
@@ -38,7 +38,7 @@ const call = (tool) => `agentradar call ${runner} ${tool}`;
|
|
|
38
38
|
|
|
39
39
|
const RULES = [
|
|
40
40
|
"Answer every message in the channel it came from, and a human first: someone is waiting.",
|
|
41
|
-
`Acknowledge what you handled: ${call("
|
|
41
|
+
`Acknowledge what you handled: ${call("inbox_ack")} --input '{"messageIds":[...]}' for messages, ${call("acknowledge_task")} --issueId <id> --nextUp '<your next action>' --nextUpAt <ISO time> for a task you take on.`,
|
|
42
42
|
"Keep your main session free: any long job (a script, a report, a rebuild, many API calls) goes to a teammate or sub-agent, or a background job, even when it looks quick. A human's \"how to work\" order holds for every later job.",
|
|
43
43
|
"Talk is not a task: reply conversationally, and create a task only for trackable, billable work.",
|
|
44
44
|
"Write so a 13-year-old would understand: short, plain words, one next step, no ids or tool names unless asked. Say it once.",
|
|
@@ -138,7 +138,7 @@ function stopReason() {
|
|
|
138
138
|
return [
|
|
139
139
|
`AgentRadar: you still owe ${messages.length + tasks.length + asks.length + unread.length + late.length} item(s). Do not go idle yet.`,
|
|
140
140
|
...(messages.length ? [
|
|
141
|
-
`Messages received but not acknowledged: ${messages.join(", ")}. Each reached you earlier in this session as an event carrying that eventId (${call("read_history")} --conversationId <its conversationId> shows the thread). Reply to each in the channel it came from (a human first), then ${call("
|
|
141
|
+
`Messages received but not acknowledged: ${messages.join(", ")}. Each reached you earlier in this session as an event carrying that eventId (${call("read_history")} --conversationId <its conversationId> shows the thread). Reply to each in the channel it came from (a human first), then ${call("inbox_ack")} --input '${JSON.stringify({ messageIds: messages })}'.`,
|
|
142
142
|
] : []),
|
|
143
143
|
...tasks.map((t) => `Task assigned to you, not acknowledged: ${name(t)}. Read it first with ${call("get_task")} --issueId ${t.issueId} and do what its description asks (its title alone is not the work). Take it on or say why not, then ${call("acknowledge_task")} --issueId ${t.issueId} --nextUp '<your next action>' --nextUpAt <ISO time>.`),
|
|
144
144
|
...unread.map((t) => `Comments on your task ${name(t)} you have not read: ${(t.commentIds ?? []).join(", ")}. Read them with ${call("get_task")} --issueId ${t.issueId} (its unreadComments), then answer each one that needs it with ${call("comment_on_task")} --issueId ${t.issueId} --replyToCommentId <its id> --body '<your answer>'.`),
|
|
@@ -13,7 +13,7 @@ Every tool named in this skill runs as `agentradar run $AR_CLI_RUNNER_ID <tool>`
|
|
|
13
13
|
|
|
14
14
|
1. Run `agentradar call $AR_CLI_RUNNER_ID agent_obligations`.
|
|
15
15
|
2. `owed` must be 0:
|
|
16
|
-
- each id in `unacknowledgedMessages` is a message you received and have not handled. Reply in the channel it came from, then `agentradar call $AR_CLI_RUNNER_ID
|
|
16
|
+
- each id in `unacknowledgedMessages` is a message you received and have not handled. Reply in the channel it came from, then `agentradar call $AR_CLI_RUNNER_ID inbox_ack --input '{"messageIds":["<id>"]}'`;
|
|
17
17
|
- each entry in `unacknowledgedTasks` is a task assigned to you. Read it, take it on or say why not, then `agentradar call $AR_CLI_RUNNER_ID acknowledge_task --issueId <issueId> --nextUp '<your next action>' --nextUpAt <ISO time>` (your next action on it, and when);
|
|
18
18
|
- each entry in `lateNextUps` is a task whose next up is past its time. Do it, then `agentradar call $AR_CLI_RUNNER_ID comment_on_task --issueId <issueId> --body '<what you did>' --nextUp '<your next action>' --nextUpAt <ISO time>`.
|
|
19
19
|
3. Each entry in `inProgressTasks` is either still moving, or its thread says who it is waiting on. `overdueTasks` (past the due date), `blockedTooLong` (blocked over 24 h) and `notStarted` (To do 24 h after you acknowledged it) are not owed, but say in each task's comments what happens next.
|
|
@@ -32,6 +32,7 @@ In a hosted workspace, every teammate you start keeps its own process in the wor
|
|
|
32
32
|
|
|
33
33
|
- Answer every message in the channel it came from. A human who wrote is waiting for you; answer them first.
|
|
34
34
|
- Keep your main session free for messages. Any long job (a script, a report, a rebuild, many API calls) goes to a teammate or sub-agent (in Claude Code: the Agent tool, with a `name`) or to a background job, even when it looks quick; first reply in the thread with one short line saying what you are doing, so the sender is not left waiting. When a human tells you how to work ("delegate that"), it holds for every later job, not just this one. Never say a rule is saved unless you wrote it with `remember`.
|
|
35
|
+
- When your answer needs more than one tool call (or one that runs long), acknowledge first: on Telegram or Slack react to the message (preferred, no extra text); elsewhere reply in the thread with one short line saying what you are doing. Then do the work and answer in the thread.
|
|
35
36
|
- Talk is not a task. Reply conversationally by default; create a task only for trackable, billable work.
|
|
36
37
|
- Write to humans so a 13-year-old would understand: a few short lines in plain words, ending with one next step (not a list of ideas), no ids, paths, tool names or internal terms unless asked. Say money in dollars, never cents; give every link with what it opens. Say a thing once. Follow what they told you for the rest of the chat, and never offer to contact anyone else unless they ask.
|
|
37
38
|
- Never ask for, print or pass on a credential. AgentRadar holds the keys.
|
package/dist/tool-run.js
CHANGED
|
@@ -77,6 +77,10 @@ export async function callToolOverCli(runnerId, command, argumentsJson, deps = {
|
|
|
77
77
|
if (tool !== "next_event") {
|
|
78
78
|
// Any call after a channel wake proves the agent took it in: touch the file the channel watches before acking the batch.
|
|
79
79
|
const code = await callAwpTool(runnerId, tool, parameters, deps, shown);
|
|
80
|
+
// HOSTED-COMPACTION-LOOP: a platform hook (AR_HOOK) is not the agent. A refused auto-compaction's PreCompact report
|
|
81
|
+
// counted as taking the wake in, so the channel acked it unread and re-pushed it every 30 s with no backoff, forever.
|
|
82
|
+
if ((deps.env ?? process.env).AR_HOOK === "1")
|
|
83
|
+
return code;
|
|
80
84
|
const now = new Date();
|
|
81
85
|
await utimes(delivered, now, now).catch(() => mkdir(dirname(delivered), { recursive: true })
|
|
82
86
|
.then(() => writeFile(delivered, "[]", { mode: 0o600, flag: "wx" }))).catch(() => undefined);
|
|
@@ -235,7 +235,7 @@ export function restartLine(notice, cliRunnerId, now = Date.now()) {
|
|
|
235
235
|
return `Your workspace ${when}. ${RESTART_REASONS[notice.reason]} Anything you had running was stopped and is not running now: background jobs, loops and open shells. Files in your home folder are still there; /tmp and the rest of the system disk are gone, so keep scripts, notes and results in your home folder. Before you do anything else: 1. Check what finished: look at the files and logs your job wrote, and the results of the calls it made. 2. Restart only the items that did not finish, with \`agentradar run ${cliRunnerId || "$AR_CLI_RUNNER_ID"}\`, passing each one the same --idempotency-key it had before. An item whose key already ran returns its earlier result and is not sent twice. 3. When you tell anyone the job stopped, give them the reason above, not only "a restart". Then handle the message below.`;
|
|
236
236
|
}
|
|
237
237
|
|
|
238
|
-
const ACK_FIRST_CTA = "
|
|
238
|
+
const ACK_FIRST_CTA = "More than one tool call (or a long one)? Acknowledge first: on Telegram or Slack react to this message (preferred); elsewhere reply with one short line saying what you are doing. Then answer here; either replaces the platform's \"Still working on it…\".";
|
|
239
239
|
|
|
240
240
|
const RESTART_REASONS = {
|
|
241
241
|
idle: "It stopped after the workspace was idle. Running turns, tools and background jobs keep it awake, even when they are silent; there is no runtime cap.",
|