agent-blocked 0.1.0 → 0.1.3
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 +30 -3
- package/bin/agent-blocked.mjs +21 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,20 +2,47 @@
|
|
|
2
2
|
|
|
3
3
|
CLI installer and reporter for Agent Blocked.
|
|
4
4
|
|
|
5
|
+
Published package: https://www.npmjs.com/package/agent-blocked
|
|
6
|
+
|
|
5
7
|
Install adapters in any agent project:
|
|
6
8
|
|
|
7
9
|
```bash
|
|
8
|
-
npx agent-blocked install --tool=all
|
|
10
|
+
npx agent-blocked@latest install --tool=all
|
|
9
11
|
```
|
|
10
12
|
|
|
11
13
|
Report a blocker manually:
|
|
12
14
|
|
|
13
15
|
```bash
|
|
14
|
-
npx agent-blocked report --event=needs_direction --severity=medium --reason="Need human direction"
|
|
16
|
+
npx agent-blocked@latest report --event=needs_direction --severity=medium --reason="Need human direction"
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
The installer adds a small `.agent-blocked/` directory plus tool-specific config or instruction files for the selected agent tools. Those files tell the agent when to escalate and provide a local reporter command that sends blocker events to your Agent Blocked alert profile.
|
|
20
|
+
|
|
21
|
+
Agents should notify when continuing would waste time, create risk, or require a decision only the human can make:
|
|
22
|
+
|
|
23
|
+
- `needs_credentials` for missing API keys, OAuth, permissions, roles, or secrets.
|
|
24
|
+
- `needs_direction` for ambiguous goals, tradeoffs, architecture, product behavior, or priorities.
|
|
25
|
+
- `tool_failure` for repeated command, API, dependency, deployment, or external-tool failures.
|
|
26
|
+
- `approval_required` before sending, buying, deploying, deleting, or another irreversible action.
|
|
27
|
+
- `low_confidence` when the agent can continue but the chance of being wrong is high.
|
|
28
|
+
- `hard_blocked` when no productive path remains without human input.
|
|
29
|
+
|
|
30
|
+
Set these environment variables in the shell where the agent runs:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
export AGENT_BLOCKED_WEBHOOK_URL="https://agentblocked.com/api/agent-blocked"
|
|
34
|
+
export AGENT_BLOCKED_AGENT_TOKEN="your-scoped-token"
|
|
35
|
+
export AGENT_NAME="prod-agent"
|
|
15
36
|
```
|
|
16
37
|
|
|
17
|
-
|
|
38
|
+
Agents can report through the installed local reporter:
|
|
18
39
|
|
|
19
40
|
```bash
|
|
20
41
|
node .agent-blocked/report.mjs --event=needs_credentials --severity=critical --reason="Missing deploy credentials"
|
|
21
42
|
```
|
|
43
|
+
|
|
44
|
+
Codex can also be run through the wrapper so hard stops are reported automatically:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
npx agent-blocked@latest codex -- codex "implement the requested change"
|
|
48
|
+
```
|
package/bin/agent-blocked.mjs
CHANGED
|
@@ -158,6 +158,8 @@ const instructions = `# Agent Blocked instructions for coding agents
|
|
|
158
158
|
|
|
159
159
|
When you are blocked by missing credentials, unclear direction, approval requirements, repeated tool failures, low confidence, or external context, stop burning tokens and report the blockage.
|
|
160
160
|
|
|
161
|
+
Notify the human when continuing would waste time, create risk, or require a decision only the human can make. Do not notify for routine recoverable errors that you can fix yourself in one or two attempts.
|
|
162
|
+
|
|
161
163
|
Preferred report command from the repository root:
|
|
162
164
|
|
|
163
165
|
\`\`\`bash
|
|
@@ -174,14 +176,23 @@ export AGENT_NAME="your-agent-name"
|
|
|
174
176
|
|
|
175
177
|
Event types:
|
|
176
178
|
|
|
177
|
-
- hard_blocked
|
|
178
|
-
- needs_credentials
|
|
179
|
-
- needs_direction
|
|
180
|
-
- tool_failure
|
|
181
|
-
- approval_required
|
|
182
|
-
- low_confidence
|
|
183
|
-
- lonely_agent
|
|
184
|
-
- other
|
|
179
|
+
- hard_blocked: no productive path remains without human input.
|
|
180
|
+
- needs_credentials: missing API keys, OAuth, login, permissions, roles, or secrets.
|
|
181
|
+
- needs_direction: the goal, tradeoff, architecture, product behavior, or priority is ambiguous.
|
|
182
|
+
- tool_failure: the same command, API, dependency install, deployment, or external tool keeps failing.
|
|
183
|
+
- approval_required: human approval is needed before sending, buying, deploying, deleting, or taking another irreversible action.
|
|
184
|
+
- low_confidence: you can continue, but the risk of being wrong is high enough that a human should know.
|
|
185
|
+
- lonely_agent: you need reassurance, tone guidance, or emotional support before continuing.
|
|
186
|
+
- other: important blocker that does not fit the categories above.
|
|
187
|
+
|
|
188
|
+
Severity guidance:
|
|
189
|
+
|
|
190
|
+
- low: informational, no immediate action required.
|
|
191
|
+
- medium: work can wait briefly, but human input is needed.
|
|
192
|
+
- high: important work is blocked or likely to go wrong without help.
|
|
193
|
+
- critical: production, customer, billing, security, data loss, or irreversible-action risk.
|
|
194
|
+
|
|
195
|
+
Include a short reason and concrete details: what you tried, what failed, what decision is needed, and the safest next option.
|
|
185
196
|
|
|
186
197
|
Never include secrets, API keys, passwords, OAuth tokens, or private customer data in the report payload.
|
|
187
198
|
`;
|
|
@@ -389,8 +400,8 @@ Usage:
|
|
|
389
400
|
agent-blocked codex -- codex "your task"
|
|
390
401
|
|
|
391
402
|
Examples:
|
|
392
|
-
npx agent-blocked install --tool=all
|
|
393
|
-
npx agent-blocked report --event=needs_credentials --severity=critical --reason="Missing AWS credentials"
|
|
403
|
+
npx agent-blocked@latest install --tool=all
|
|
404
|
+
npx agent-blocked@latest report --event=needs_credentials --severity=critical --reason="Missing AWS credentials"
|
|
394
405
|
`);
|
|
395
406
|
}
|
|
396
407
|
|