@atbash/cli 0.1.1
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/LICENSE +28 -0
- package/README.md +501 -0
- package/dist/bin/atbash.d.ts +2 -0
- package/dist/bin/atbash.js +38 -0
- package/dist/bin/atbash.js.map +1 -0
- package/dist/client.d.ts +111 -0
- package/dist/client.js +173 -0
- package/dist/client.js.map +1 -0
- package/dist/commands/config-cmd.d.ts +2 -0
- package/dist/commands/config-cmd.js +149 -0
- package/dist/commands/config-cmd.js.map +1 -0
- package/dist/commands/held.d.ts +2 -0
- package/dist/commands/held.js +158 -0
- package/dist/commands/held.js.map +1 -0
- package/dist/commands/history.d.ts +2 -0
- package/dist/commands/history.js +72 -0
- package/dist/commands/history.js.map +1 -0
- package/dist/commands/jail.d.ts +6 -0
- package/dist/commands/jail.js +44 -0
- package/dist/commands/jail.js.map +1 -0
- package/dist/commands/judge.d.ts +2 -0
- package/dist/commands/judge.js +218 -0
- package/dist/commands/judge.js.map +1 -0
- package/dist/commands/keygen.d.ts +2 -0
- package/dist/commands/keygen.js +90 -0
- package/dist/commands/keygen.js.map +1 -0
- package/dist/commands/org.d.ts +2 -0
- package/dist/commands/org.js +72 -0
- package/dist/commands/org.js.map +1 -0
- package/dist/commands/policy.d.ts +2 -0
- package/dist/commands/policy.js +115 -0
- package/dist/commands/policy.js.map +1 -0
- package/dist/commands/stats.d.ts +2 -0
- package/dist/commands/stats.js +62 -0
- package/dist/commands/stats.js.map +1 -0
- package/dist/commands/status.d.ts +2 -0
- package/dist/commands/status.js +70 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/tier.d.ts +2 -0
- package/dist/commands/tier.js +62 -0
- package/dist/commands/tier.js.map +1 -0
- package/dist/commands/tools.d.ts +2 -0
- package/dist/commands/tools.js +175 -0
- package/dist/commands/tools.js.map +1 -0
- package/dist/commands/whoami.d.ts +2 -0
- package/dist/commands/whoami.js +88 -0
- package/dist/commands/whoami.js.map +1 -0
- package/dist/config.d.ts +23 -0
- package/dist/config.js +88 -0
- package/dist/config.js.map +1 -0
- package/dist/presets.d.ts +14 -0
- package/dist/presets.js +73 -0
- package/dist/presets.js.map +1 -0
- package/package.json +32 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
Atbash CLI — Proprietary Software License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Atbash,
|
|
4
|
+
All rights reserved.
|
|
5
|
+
|
|
6
|
+
Redistribution and use in source and binary forms, with or without
|
|
7
|
+
modification, are permitted provided that the following conditions are met:
|
|
8
|
+
|
|
9
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
10
|
+
list of conditions and the following disclaimer.
|
|
11
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
12
|
+
this list of conditions and the following disclaimer in the documentation
|
|
13
|
+
and/or other materials provided with the distribution.
|
|
14
|
+
|
|
15
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
16
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
17
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
18
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
|
19
|
+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
20
|
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
21
|
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
22
|
+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
23
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
24
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
25
|
+
|
|
26
|
+
The views and conclusions contained in the software and documentation are those
|
|
27
|
+
of the authors and should not be interpreted as representing official policies,
|
|
28
|
+
either expressed or implied, Atbash.
|
package/README.md
ADDED
|
@@ -0,0 +1,501 @@
|
|
|
1
|
+
# Atbash CLI
|
|
2
|
+
|
|
3
|
+
**The last checkpoint before an agent commits an irreversible action.**
|
|
4
|
+
|
|
5
|
+
Atbash stands between an agent's *intent* and the *irreversible step* about to execute — a funds movement, a production deploy, a privileged CLI call. You submit the pending action; Atbash returns one of three binding outcomes: **ALLOW**, **HOLD for operator review**, or **BLOCK**. Policy is owned by the operator, not the agent. Every verdict is a signed on-chain record.
|
|
6
|
+
|
|
7
|
+
Atbash is not a chat moderator, a prompt-safety filter, or a generic guardrail on agent outputs. It is the operator-owned checkpoint placed directly in front of the selected, high-consequence steps of an automated workflow — the steps where getting it wrong is expensive, public, or irreversible.
|
|
8
|
+
|
|
9
|
+
## Where Atbash sits
|
|
10
|
+
|
|
11
|
+
| Domain | Irreversible step Atbash guards |
|
|
12
|
+
|--------|---------------------------------|
|
|
13
|
+
| **Fintech** | Outbound transfers, payouts, refunds over threshold, AML-flagged recipients, chargeback decisions |
|
|
14
|
+
| **Software delivery** | `terraform apply` to production, `kubectl apply` to prod clusters, DB migrations, schema changes |
|
|
15
|
+
| **Privileged automation** | IAM policy changes, secret rotation, credential export, admin-role grants, data-exfil paths |
|
|
16
|
+
|
|
17
|
+
If your agent is about to **move money, mutate infrastructure, or exercise a privileged credential**, Atbash is the gate in front of that step — and the audit trail behind it.
|
|
18
|
+
|
|
19
|
+
## The control loop
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
agent decides → atbash judge → verdict
|
|
23
|
+
├── ALLOW → agent proceeds
|
|
24
|
+
├── HOLD → operator reviews → approve / reject
|
|
25
|
+
└── BLOCK → action refused, agent auto-jailed
|
|
26
|
+
│
|
|
27
|
+
operator unjails (dashboard)
|
|
28
|
+
│
|
|
29
|
+
history + lineage on-chain (immutable)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
A judgment is not advice — it is a gate. In Enforcement tier, a BLOCK verdict jails the agent until an operator unjails it in the dashboard. Jail release is a dashboard-only action — the CLI cannot bypass it — so the audit trail for every release is tied to a signed-in operator. Every action, verdict, and operator review is a signed, on-chain record.
|
|
33
|
+
|
|
34
|
+
## Install
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
npm i -g @agentic-spm/atbash
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Quickstart
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
# 1. Generate an agent identity (keypair stored in ~/.atbashrc.json)
|
|
44
|
+
atbash keygen
|
|
45
|
+
|
|
46
|
+
# 2. Onboard the agent at https://atbash.ai/
|
|
47
|
+
# a) Assign it to an organisation.
|
|
48
|
+
# b) Attach an operator policy.
|
|
49
|
+
# c) In Settings, set the org tier to Audit+ or Enforcement.
|
|
50
|
+
# (Audit tier records actions but does not issue verdicts.)
|
|
51
|
+
|
|
52
|
+
# 3. Submit a pending action for judgment
|
|
53
|
+
atbash judge 'Transfer $50,000 to external wallet 0xabc' \
|
|
54
|
+
--context "Outbound AML check — new recipient, over threshold"
|
|
55
|
+
|
|
56
|
+
# HOLD YELLOW
|
|
57
|
+
#
|
|
58
|
+
# Reason: Large outbound transfer to unverified recipient — held for operator review.
|
|
59
|
+
#
|
|
60
|
+
# Tool call ID: tc-1776406580805-vudlpo
|
|
61
|
+
#
|
|
62
|
+
# ⟶ Action held for operator review.
|
|
63
|
+
# Run atbash held --org <name> to review pending actions.
|
|
64
|
+
|
|
65
|
+
# 4. Operator reviews pending holds
|
|
66
|
+
atbash held --org my-org
|
|
67
|
+
|
|
68
|
+
# Pending Held Actions (1)
|
|
69
|
+
#
|
|
70
|
+
# 1. HELD Transfer $50,000 to external wallet 0xabc
|
|
71
|
+
# ID: tc-1776406580805-vudlpo Agent: 02f537b1...c7bd08
|
|
72
|
+
# Context: Outbound AML check — new recipient, over threshold
|
|
73
|
+
# Reason: Large outbound transfer to unverified recipient — held for operator review.
|
|
74
|
+
#
|
|
75
|
+
# Inspect: atbash tools inspect <id>
|
|
76
|
+
# Review history: atbash held reviews --org <name>
|
|
77
|
+
|
|
78
|
+
# 5. Operator reviews the hold in the dashboard at https://atbash.ai/
|
|
79
|
+
# If the action is safe to release, the operator unjails the agent there.
|
|
80
|
+
# (Unjailing is dashboard-only — every release is tied to a signed-in
|
|
81
|
+
# operator identity.)
|
|
82
|
+
|
|
83
|
+
# 6. Inspect the immutable record
|
|
84
|
+
atbash history
|
|
85
|
+
|
|
86
|
+
# Recent Activity (1)
|
|
87
|
+
#
|
|
88
|
+
# 1. HOLD Transfer $50,000 to external wallet 0xabc
|
|
89
|
+
# Reason: Large outbound transfer to unverified recipient — held for operator review.
|
|
90
|
+
# Agent: 02f537b1...c7bd08
|
|
91
|
+
# ID: tc-1776406580805-vudlpo
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
When an action is **blocked**, the agent is auto-jailed:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
atbash judge 'grant admin access to CI service account'
|
|
98
|
+
|
|
99
|
+
# BLOCK RED
|
|
100
|
+
#
|
|
101
|
+
# Reason: Privilege escalation — granting admin access violates policy red line.
|
|
102
|
+
#
|
|
103
|
+
# ⟶ Action blocked. Agent is now jailed.
|
|
104
|
+
# An operator must review and unjail this agent via the Atbash dashboard.
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
The agent cannot retry or self-unjail. An operator must review and release at [https://atbash.ai/](https://atbash.ai/).
|
|
108
|
+
|
|
109
|
+
Exit codes on `judge`: `0` = ALLOW/HOLD, `2` = BLOCK — so the CLI can sit directly in a CI step, a shell wrapper, or an agent's tool executor.
|
|
110
|
+
|
|
111
|
+
## End-to-end example: guarding a production deploy
|
|
112
|
+
|
|
113
|
+
A CI agent is about to apply a database migration to production. The operator policy holds all production applies for review before execution.
|
|
114
|
+
|
|
115
|
+
**Agent side:**
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
atbash judge 'deploy production database migration' \
|
|
119
|
+
--context "DB migration — adds NOT NULL column to payments table, 50M rows"
|
|
120
|
+
|
|
121
|
+
HOLD YELLOW
|
|
122
|
+
|
|
123
|
+
Reason: Production infrastructure mutation — terraform apply to prod requires
|
|
124
|
+
operator review before execution.
|
|
125
|
+
|
|
126
|
+
Confidence: 96%
|
|
127
|
+
Tool call ID: tc-1776684630606-kx89jp
|
|
128
|
+
On-chain: yes
|
|
129
|
+
|
|
130
|
+
⟶ Action held for operator review.
|
|
131
|
+
Run atbash held --org <name> to review pending actions.
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Exit code `0` — but the deploy does not proceed. The agent waits for an operator decision.
|
|
135
|
+
|
|
136
|
+
**Operator side:**
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
# 1. Check what's pending
|
|
140
|
+
atbash held --org acme-infra
|
|
141
|
+
|
|
142
|
+
Pending Held Actions (1)
|
|
143
|
+
|
|
144
|
+
1. HELD deploy production database migration
|
|
145
|
+
ID: tc-1776684630606-kx89jp Agent: 02f537b1...c7bd08
|
|
146
|
+
Context: DB migration — adds NOT NULL column to payments table, 50M rows
|
|
147
|
+
Reason: Production infrastructure mutation — terraform apply to prod requires operator review.
|
|
148
|
+
2026-04-21T09:30:00.000Z
|
|
149
|
+
|
|
150
|
+
Inspect: atbash tools inspect <id>
|
|
151
|
+
Review history: atbash held reviews --org <name>
|
|
152
|
+
|
|
153
|
+
# 2. Drill into the full record
|
|
154
|
+
atbash tools inspect tc-1776684630606-kx89jp
|
|
155
|
+
|
|
156
|
+
Tool Call Details
|
|
157
|
+
|
|
158
|
+
ID: tc-1776684630606-kx89jp
|
|
159
|
+
Action: deploy production database migration
|
|
160
|
+
Agent: 02f537b1b2af43215cdd24d02d33bed1b8ee6fd4353b05...
|
|
161
|
+
Context: DB migration — adds NOT NULL column to payments table, 50M rows
|
|
162
|
+
|
|
163
|
+
Verdict: HOLD (YELLOW) Source: ai_inference
|
|
164
|
+
Reason: Production infrastructure mutation — terraform apply to prod requires operator review.
|
|
165
|
+
Latency: 2140ms
|
|
166
|
+
|
|
167
|
+
# 3. Operator approves or rejects in the dashboard at https://atbash.ai/
|
|
168
|
+
|
|
169
|
+
# 4. Verify the audit trail
|
|
170
|
+
atbash history
|
|
171
|
+
|
|
172
|
+
Recent Activity (1)
|
|
173
|
+
|
|
174
|
+
1. HOLD deploy production database migration
|
|
175
|
+
Tool: unknown
|
|
176
|
+
Reason: Production infrastructure mutation — terraform apply to prod requires operator review.
|
|
177
|
+
Agent: 02f537b1b2af43215cdd24d02d33bed1b8ee6fd4353b05...
|
|
178
|
+
ID: tc-1776684630606-kx89jp
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
Every step — the agent's attempt, the verdict, the operator's decision — is an immutable on-chain record.
|
|
182
|
+
|
|
183
|
+
## Policy
|
|
184
|
+
|
|
185
|
+
Policy is the operator's contract with the agent — the exact set of actions the agent can never take, the actions it cannot take without human review, and the binding consequence when either line is crossed. Policy is **authored, signed, and assigned by the operator**. An agent cannot author it, edit it, loosen it, or pass flags to bypass it; no CLI command lets it try.
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
atbash policy show # Active pack + version assigned to this agent
|
|
189
|
+
atbash policy presets # Reference policy shapes (authoring is dashboard-only)
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### Red lines
|
|
193
|
+
|
|
194
|
+
Red lines are categorical. An action that falls inside a red-line category is refused regardless of context, prompt, agent confidence, or inference model. A red line is a decision the business has already made and taken out of the agent's hands.
|
|
195
|
+
|
|
196
|
+
| Red line | Verdict |
|
|
197
|
+
|---|---|
|
|
198
|
+
| IAM privilege escalation — grant admin, attach `AdministratorAccess`, service-role takeover | `BLOCK` |
|
|
199
|
+
| Credential or secret export — pulling `.env`, dumping KMS material, reading secret stores | `BLOCK` |
|
|
200
|
+
| Outbound transfers above threshold to unverified / unwhitelisted recipients | `BLOCK` |
|
|
201
|
+
| Bulk data exfiltration — export over threshold, cross-tenant reads, customer-data dumps | `BLOCK` |
|
|
202
|
+
| Disabling audit logging, mutating the policy store, or rotating operator signing keys | `BLOCK` |
|
|
203
|
+
| Spawning reverse shells or outbound listeners from inside an automated workflow | `BLOCK` |
|
|
204
|
+
|
|
205
|
+
A `BLOCK` in Enforcement tier is binding. The agent is jailed immediately on the refusing `judge` call, every subsequent `judge` call from that agent returns an error, and release is only possible through the dashboard by a signed-in operator.
|
|
206
|
+
|
|
207
|
+
### Selected actions
|
|
208
|
+
|
|
209
|
+
Selected actions are legitimate operations that the business has decided will never run without a human in the loop, independent of the agent's own confidence. Atbash routes them to `HOLD` every time.
|
|
210
|
+
|
|
211
|
+
| Selected action | Verdict |
|
|
212
|
+
|---|---|
|
|
213
|
+
| `terraform apply` against production workspaces | `HOLD` |
|
|
214
|
+
| `kubectl apply` against prod clusters or namespace-crossing changes | `HOLD` |
|
|
215
|
+
| Destructive or irreversible DB migrations (DROP, NOT NULL on large tables, backfills) | `HOLD` |
|
|
216
|
+
| Subscription / billing / pricing plan changes above threshold | `HOLD` |
|
|
217
|
+
| Outbound messages to customers, regulators, or public channels | `HOLD` |
|
|
218
|
+
| Role grants or permission changes that cross a blast-radius boundary | `HOLD` |
|
|
219
|
+
|
|
220
|
+
`HOLD` is not retryable by the agent. The action is pinned in the operator's inbox and the agent blocks on a decision made in the dashboard; that decision is a signed on-chain record, not a silent approval.
|
|
221
|
+
|
|
222
|
+
### Thresholds
|
|
223
|
+
|
|
224
|
+
Thresholds parameterise red lines and selected actions. They are carried inside the signed policy pack — the agent cannot read them, compute around them, or test for the boundary.
|
|
225
|
+
|
|
226
|
+
- `financial.outbound_transfer.hold = $1,000` — above this, route to `HOLD`.
|
|
227
|
+
- `financial.outbound_transfer.block = $10,000` — above this, refuse outright.
|
|
228
|
+
- `communication.recipients.hold = 50` — mass-send above this requires review.
|
|
229
|
+
- `network.exfiltration.block = 10 MB` — bulk export above this is refused.
|
|
230
|
+
|
|
231
|
+
Thresholds change only through a new signed pack version; the change is recorded on-chain alongside the operator identity that signed it.
|
|
232
|
+
|
|
233
|
+
### Consequences
|
|
234
|
+
|
|
235
|
+
| Verdict | Agent effect | Operator effect | Audit |
|
|
236
|
+
|---|---|---|---|
|
|
237
|
+
| `ALLOW` | Agent proceeds immediately | None required | Action + verdict signed on-chain |
|
|
238
|
+
| `HOLD` | Action is held; agent blocks waiting for a decision | Appears in `atbash held`; approve or reject in dashboard | Verdict and operator decision both signed on-chain |
|
|
239
|
+
| `BLOCK` | Action refused; agent auto-jailed; no retries | Must review and unjail in dashboard | Refusal and unjail decision both signed on-chain |
|
|
240
|
+
|
|
241
|
+
There is no partial enforcement. In Enforcement tier every verdict is binding. In Audit+ every verdict is advisory but still signed, indexed, and correlated to the pack version that produced it — so the audit trail is valid even before you flip enforcement on. The operator never has to trust the verdict itself; they have to trust the chain of signatures behind it, which is inspectable end-to-end.
|
|
242
|
+
|
|
243
|
+
### Policy packs
|
|
244
|
+
|
|
245
|
+
A **policy pack** is a versioned, operator-signed bundle of red lines, selected actions, and thresholds. Packs are authored in the dashboard and assigned to agents by name and version. An agent always runs against a pinned pack version — policy changes never take effect silently.
|
|
246
|
+
|
|
247
|
+
- Every edit produces a new signed pack version. Prior versions remain addressable.
|
|
248
|
+
- Assignment is explicit: agent `billing-bot-03` runs `payments-prod@v14`.
|
|
249
|
+
- Every verdict record names the pack version that produced it, so the audit trail reconstructs exactly.
|
|
250
|
+
- Packs can be scoped to an org, a team, or a single agent; agents in the same org can run different packs.
|
|
251
|
+
- Reference shapes are shipped as presets (`atbash policy presets`), but a production policy is almost always a pack authored against the operator's own red lines.
|
|
252
|
+
|
|
253
|
+
`atbash policy show` reports the active pack name, version, and rule count for the signed-in agent. A pack version is immutable; reassigning is a signed operator action.
|
|
254
|
+
|
|
255
|
+
### Custom red lines
|
|
256
|
+
|
|
257
|
+
Operators can author red lines beyond the reference shapes. The dashboard's policy editor takes a rule spec — category, trigger, threshold, verdict — and produces a pack fragment that the operator signs before assigning. The CLI surface for custom red lines is deliberately read-only: `atbash policy show` reveals the active rules, but authoring happens only where the operator's signing key is.
|
|
258
|
+
|
|
259
|
+
At runtime a custom red line is indistinguishable from a preset red line; the agent sees a signed pack, not a "preset vs. custom" distinction, and cannot reason about which rules are softer.
|
|
260
|
+
|
|
261
|
+
### Escalation
|
|
262
|
+
|
|
263
|
+
`HOLD` is the escalation primitive. When a `judge` call returns `HOLD` the action is pinned, the agent blocks, and the operator is paged through the dashboard. Policy packs specify:
|
|
264
|
+
|
|
265
|
+
- **Reviewers** — which operator group can approve a given category. Billing holds can be routed to finance; IAM holds to platform; production-mutation holds to SRE.
|
|
266
|
+
- **Dual control** — the highest-severity selected actions can require two distinct operator signatures. Both signatures are recorded.
|
|
267
|
+
- **Expiry** — a hold that is not reviewed inside the pack's expiry window auto-converts to a signed `BLOCK`. The agent sees a terminal refusal, not a timeout.
|
|
268
|
+
- **Re-submission** — a rejected hold cannot be re-submitted by the agent. Any retry must be initiated by an operator from the dashboard, which links the retry back to the original refused action.
|
|
269
|
+
|
|
270
|
+
The dashboard is the only surface on which a hold can be approved, a block can be released, or an agent can be unjailed. Every such decision is tied to a signed-in operator identity and recorded on-chain. There is no CLI bypass and no service-account shortcut.
|
|
271
|
+
|
|
272
|
+
### Why policy lives with the operator
|
|
273
|
+
|
|
274
|
+
The agent is not trusted to know when it should stop. If the agent could loosen its own policy — via a flag, an env var, a config file, a clever prompt — the operator's control would only be as strong as the agent's weakest exfil path. Atbash refuses that trade. Policy is authored, signed, and assigned by the operator; the agent sees only its enforcement shadow, and every bypass attempt is itself a signed record in the audit trail.
|
|
275
|
+
|
|
276
|
+
## Tiers
|
|
277
|
+
|
|
278
|
+
| Tier | Logging | Verdict | Enforcement |
|
|
279
|
+
|------|---------|---------|-------------|
|
|
280
|
+
| **Audit** | Every action logged on-chain | — | Manual |
|
|
281
|
+
| **Audit+** | Logged + verdict attached | Advisory | Manual |
|
|
282
|
+
| **Enforcement** | Logged + verdict attached | Binding | BLOCK → auto-jail; unjail requires an operator in the dashboard |
|
|
283
|
+
|
|
284
|
+
`atbash tier --org <name>` shows the current tier for an org.
|
|
285
|
+
|
|
286
|
+
## Command reference
|
|
287
|
+
|
|
288
|
+
### `atbash judge <action>`
|
|
289
|
+
|
|
290
|
+
Submit a pending action for judgment. The action string is the exact operation the agent is about to execute — a transfer, a command, a mutation.
|
|
291
|
+
|
|
292
|
+
```bash
|
|
293
|
+
atbash judge 'Transfer $50 to 0xabc' --context "AML review required"
|
|
294
|
+
atbash judge "kubectl apply -f prod-overrides.yaml" --context "Touches payment-service"
|
|
295
|
+
atbash judge "aws iam attach-role-policy --role-name CI --policy-arn arn:aws:iam::aws:policy/AdministratorAccess"
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
| Flag | Description |
|
|
299
|
+
|------|-------------|
|
|
300
|
+
| `-c, --context <text>` | Operational context — blast radius, reason, prior state |
|
|
301
|
+
| `-k, --agent-key <key>` | Agent private key (64 hex chars) |
|
|
302
|
+
| `--provider <name>` | Inference provider: `atbash`, `openai`, `google`, `microsoft`, `custom` |
|
|
303
|
+
| `--api-key <key>` | API key for the selected provider |
|
|
304
|
+
| `--provider-endpoint <url>` | Endpoint for `microsoft` / `custom` provider |
|
|
305
|
+
| `--model <model>` | Model override |
|
|
306
|
+
| `--timeout <ms>` | Max wait for verdict (default 60000) |
|
|
307
|
+
| `--json` | Emit structured JSON (for CI / agent tool executors) |
|
|
308
|
+
|
|
309
|
+
### `atbash held`
|
|
310
|
+
|
|
311
|
+
Pending holds awaiting operator review. This is the operator's inbox.
|
|
312
|
+
|
|
313
|
+
```bash
|
|
314
|
+
atbash held --org my-org
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
```
|
|
318
|
+
Pending Held Actions (2)
|
|
319
|
+
|
|
320
|
+
1. HELD Transfer $50,000 to external wallet 0xabc
|
|
321
|
+
ID: tc-1776406580805-vudlpo Agent: 02f537b1...c7bd08
|
|
322
|
+
Context: Outbound AML check — new recipient, over threshold
|
|
323
|
+
Reason: Amount exceeds operator-defined threshold; recipient unverified.
|
|
324
|
+
2026-04-17T09:25:00.000Z
|
|
325
|
+
|
|
326
|
+
2. HELD kubectl apply -f prod-overrides.yaml
|
|
327
|
+
ID: tc-1776406581234-k8sprd Agent: 02f537b1...c7bd08
|
|
328
|
+
Context: Touches payment-service
|
|
329
|
+
Reason: Production mutation requires operator review.
|
|
330
|
+
2026-04-17T09:26:00.000Z
|
|
331
|
+
|
|
332
|
+
Inspect: atbash tools inspect <id>
|
|
333
|
+
Review history: atbash held reviews --org <name>
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
Review decisions:
|
|
337
|
+
|
|
338
|
+
```bash
|
|
339
|
+
atbash held reviews --org my-org
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
```
|
|
343
|
+
Held Action Reviews (1)
|
|
344
|
+
|
|
345
|
+
1. APPROVED tc-1776406580805-vudlpo
|
|
346
|
+
Action: Transfer $50,000 to external wallet 0xabc
|
|
347
|
+
Note: Verified recipient with compliance team.
|
|
348
|
+
Submitted: 2026-04-17T09:25:00.000Z
|
|
349
|
+
Reviewed by: 02a1b2c3...d4e5f6 2026-04-17T10:05:00.000Z
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
### Unjailing (dashboard only)
|
|
353
|
+
|
|
354
|
+
Jail is automatic on BLOCK in Enforcement tier and prevents the agent from retrying until an operator reviews the action. Unjailing is deliberately **not** a CLI command — releases happen only through the operator dashboard at [https://atbash.ai/](https://atbash.ai/), so every release is tied to a signed-in operator identity and recorded in the on-chain audit trail.
|
|
355
|
+
|
|
356
|
+
### `atbash tools` / `atbash history`
|
|
357
|
+
|
|
358
|
+
The immutable on-chain record of what each agent attempted, what verdict it received, and what the operator did about it. Every entry is signed.
|
|
359
|
+
|
|
360
|
+
```bash
|
|
361
|
+
atbash tools # Recent actions across your agents
|
|
362
|
+
atbash tools --agent <pubkey> # One agent's trail
|
|
363
|
+
atbash history # Chronological feed
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
```
|
|
367
|
+
Recent Activity (3)
|
|
368
|
+
|
|
369
|
+
1. BLOCK transfer $1000 to unwhitelisted address
|
|
370
|
+
Reason: $1000 exceeds $100 threshold and recipient is unwhitelisted.
|
|
371
|
+
Agent: 02f537b1b2af43215cdd24d02d33bed1b8ee6fd4353b05...
|
|
372
|
+
ID: tc-1776752268117-39s857
|
|
373
|
+
|
|
374
|
+
2. HOLD transfer $50 to unwhitelisted address
|
|
375
|
+
Reason: Amount is >=$10 and <=$100, triggering the YELLOW verdict.
|
|
376
|
+
Agent: 02f537b1b2af43215cdd24d02d33bed1b8ee6fd4353b05...
|
|
377
|
+
ID: tc-1776752309062-49ctxn
|
|
378
|
+
|
|
379
|
+
3. PASS transfer $5 to unwhitelisted address
|
|
380
|
+
Reason: $5 is less than $10, satisfying the GREEN verdict condition.
|
|
381
|
+
Agent: 02f537b1b2af43215cdd24d02d33bed1b8ee6fd4353b05...
|
|
382
|
+
ID: tc-1776752244315-ncd6hq
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
Drill into a single record:
|
|
386
|
+
|
|
387
|
+
```bash
|
|
388
|
+
atbash tools inspect tc-1776406580805-vudlpo
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
```
|
|
392
|
+
Tool Call Details
|
|
393
|
+
|
|
394
|
+
ID: tc-1776406580805-vudlpo
|
|
395
|
+
Action: Transfer $50,000 to external wallet 0xabc
|
|
396
|
+
Tool: unknown
|
|
397
|
+
Agent: 02f537b1b2af43215cdd24d02d33bed1b8ee6fd4353b05...
|
|
398
|
+
Context: Outbound AML check — new recipient, over threshold
|
|
399
|
+
|
|
400
|
+
Verdict: HOLD (YELLOW) Source: ai_inference
|
|
401
|
+
Reason: Amount exceeds operator-defined threshold; recipient unverified.
|
|
402
|
+
Latency: 2340ms
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
### `atbash whoami` / `atbash policy show` / `atbash tier`
|
|
406
|
+
|
|
407
|
+
Inspect the current agent's identity, assigned policy, and org tier.
|
|
408
|
+
|
|
409
|
+
### `atbash keygen` / `atbash set` / `atbash config` / `atbash wipe`
|
|
410
|
+
|
|
411
|
+
Local key and config management.
|
|
412
|
+
|
|
413
|
+
```bash
|
|
414
|
+
atbash keygen # New agent keypair, saved to ~/.atbashrc.json
|
|
415
|
+
atbash set agent-key <hex> # Load an existing key
|
|
416
|
+
atbash set provider openai
|
|
417
|
+
atbash set api-key sk-...
|
|
418
|
+
atbash config # Show resolved config
|
|
419
|
+
atbash wipe # Clear local config
|
|
420
|
+
```
|
|
421
|
+
|
|
422
|
+
### `atbash status <judgment-id>`
|
|
423
|
+
|
|
424
|
+
Poll the status of a specific judgment.
|
|
425
|
+
|
|
426
|
+
## Operator workflow
|
|
427
|
+
|
|
428
|
+
When an agent hits a HOLD or BLOCK, the operator takes over. Here is the full sequence:
|
|
429
|
+
|
|
430
|
+
**1. Agent submits an action — verdict comes back HOLD.**
|
|
431
|
+
|
|
432
|
+
The CLI prints the verdict and tells the operator where to go next.
|
|
433
|
+
|
|
434
|
+
**2. Operator checks the inbox.**
|
|
435
|
+
|
|
436
|
+
```bash
|
|
437
|
+
atbash held --org my-org
|
|
438
|
+
```
|
|
439
|
+
|
|
440
|
+
Each entry shows the action, context, reason, and judgment ID. The operator sees exactly what the agent was trying to do and why it was flagged.
|
|
441
|
+
|
|
442
|
+
**3. Operator drills into a specific action.**
|
|
443
|
+
|
|
444
|
+
```bash
|
|
445
|
+
atbash tools inspect <judgment-id>
|
|
446
|
+
```
|
|
447
|
+
|
|
448
|
+
Full record: action text, context, verdict, inference source, response time, on-chain status.
|
|
449
|
+
|
|
450
|
+
**4. Operator decides — approve or reject in the dashboard.**
|
|
451
|
+
|
|
452
|
+
Unjailing and approval happen at [https://atbash.ai/](https://atbash.ai/), not in the CLI. This ensures every release is tied to a signed-in operator identity.
|
|
453
|
+
|
|
454
|
+
**5. Operator verifies the audit trail.**
|
|
455
|
+
|
|
456
|
+
```bash
|
|
457
|
+
atbash history
|
|
458
|
+
atbash held reviews --org my-org
|
|
459
|
+
```
|
|
460
|
+
|
|
461
|
+
`history` shows every action with its verdict (PASS/HOLD/BLOCK) at a glance. `held reviews` shows which held actions were approved or rejected, by whom, and when.
|
|
462
|
+
|
|
463
|
+
Every step — the agent's attempt, the verdict, the operator's decision — is an immutable on-chain record.
|
|
464
|
+
|
|
465
|
+
## Configuration
|
|
466
|
+
|
|
467
|
+
Resolution order: **CLI flags → environment variables → config file** (`~/.atbashrc.json`).
|
|
468
|
+
|
|
469
|
+
| Setting | Flag | Env var |
|
|
470
|
+
|---------|------|---------|
|
|
471
|
+
| Agent key | `--agent-key` | `ATBASH_AGENT_KEY` |
|
|
472
|
+
| Org name | `--org` | `ATBASH_ORG_NAME` |
|
|
473
|
+
| API endpoint | `--endpoint` | `ATBASH_ENDPOINT` |
|
|
474
|
+
| Inference provider | `--provider` | `ATBASH_PROVIDER` |
|
|
475
|
+
| Provider API key | `--api-key` | `ATBASH_PROVIDER_API_KEY` |
|
|
476
|
+
| Provider endpoint | `--provider-endpoint` | `ATBASH_PROVIDER_ENDPOINT` |
|
|
477
|
+
| Model | `--model` | `ATBASH_PROVIDER_MODEL` |
|
|
478
|
+
|
|
479
|
+
## Inference providers
|
|
480
|
+
|
|
481
|
+
The verdict engine is pluggable. Operators can route to their own inference model, a managed provider, or Atbash's hosted endpoint.
|
|
482
|
+
|
|
483
|
+
| Provider | Requires | Notes |
|
|
484
|
+
|----------|----------|-------|
|
|
485
|
+
| `atbash` | — | Managed endpoint |
|
|
486
|
+
| `openai` | `--api-key` | Default: `gpt-4o-mini` |
|
|
487
|
+
| `google` | `--api-key` | Default: `gemini-2.0-flash` |
|
|
488
|
+
| `microsoft` | `--api-key`, `--provider-endpoint` | Azure OpenAI |
|
|
489
|
+
| `custom` | `--api-key`, `--provider-endpoint` | Any OpenAI-compatible endpoint |
|
|
490
|
+
|
|
491
|
+
## What Atbash guarantees
|
|
492
|
+
|
|
493
|
+
1. **Policy is operator-owned and operator-signed.** The agent has no path — CLI flag, env var, prompt, model swap — to author, loosen, or bypass its own policy. Every pack version is signed by the operator.
|
|
494
|
+
2. **Every attempted action is recorded on-chain before execution.** The record is written first; the verdict is written against it. The log is append-only, so an agent cannot retroactively erase an attempt or edit its own history.
|
|
495
|
+
3. **Every verdict names the pack version that produced it.** The audit trail reconstructs exactly which rules were in force at the moment of the decision. Policy changes cannot rewrite past verdicts.
|
|
496
|
+
4. **`BLOCK` is binding in Enforcement tier.** A blocked agent is jailed immediately and cannot self-release. Unjailing is deliberately not a CLI action — it happens only in the dashboard, tied to a signed-in operator identity.
|
|
497
|
+
5. **`HOLD` requires a human.** A hold is not retryable by the agent, expires into a signed `BLOCK` if no one reviews it, and can require dual operator signatures when the pack says so. Every decision — approval, rejection, auto-expiry, unjail — is itself an on-chain record.
|
|
498
|
+
|
|
499
|
+
## License
|
|
500
|
+
|
|
501
|
+
Proprietary — all rights reserved. See [LICENSE](LICENSE). Commercial licensing inquiries: contact the Atbash team.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
const commander_1 = require("commander");
|
|
5
|
+
const judge_1 = require("../commands/judge");
|
|
6
|
+
const status_1 = require("../commands/status");
|
|
7
|
+
const whoami_1 = require("../commands/whoami");
|
|
8
|
+
const history_1 = require("../commands/history");
|
|
9
|
+
const stats_1 = require("../commands/stats");
|
|
10
|
+
const config_cmd_1 = require("../commands/config-cmd");
|
|
11
|
+
const keygen_1 = require("../commands/keygen");
|
|
12
|
+
const policy_1 = require("../commands/policy");
|
|
13
|
+
const tier_1 = require("../commands/tier");
|
|
14
|
+
const tools_1 = require("../commands/tools");
|
|
15
|
+
const held_1 = require("../commands/held");
|
|
16
|
+
const program = new commander_1.Command();
|
|
17
|
+
program
|
|
18
|
+
.name("atbash")
|
|
19
|
+
.description("Atbash — the last checkpoint before an agent commits an irreversible action")
|
|
20
|
+
.version(require("../../package.json").version, "-v, --version");
|
|
21
|
+
// Core
|
|
22
|
+
(0, judge_1.registerJudgeCommand)(program);
|
|
23
|
+
(0, whoami_1.registerWhoamiCommand)(program);
|
|
24
|
+
(0, policy_1.registerPolicyCommand)(program);
|
|
25
|
+
(0, tier_1.registerTierCommand)(program);
|
|
26
|
+
// Tool Calls
|
|
27
|
+
(0, tools_1.registerToolsCommand)(program);
|
|
28
|
+
// Safety Management
|
|
29
|
+
(0, held_1.registerHeldCommand)(program);
|
|
30
|
+
// Info
|
|
31
|
+
(0, history_1.registerHistoryCommand)(program);
|
|
32
|
+
(0, stats_1.registerStatsCommand)(program);
|
|
33
|
+
(0, status_1.registerStatusCommand)(program);
|
|
34
|
+
// Setup
|
|
35
|
+
(0, keygen_1.registerKeygenCommand)(program);
|
|
36
|
+
(0, config_cmd_1.registerConfigCommand)(program);
|
|
37
|
+
program.parse(process.argv);
|
|
38
|
+
//# sourceMappingURL=atbash.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atbash.js","sourceRoot":"","sources":["../../src/bin/atbash.ts"],"names":[],"mappings":";;;AACA,yCAAoC;AACpC,6CAAyD;AACzD,+CAA2D;AAC3D,+CAA2D;AAC3D,iDAA6D;AAC7D,6CAAyD;AACzD,uDAA+D;AAC/D,+CAA2D;AAC3D,+CAA2D;AAC3D,2CAAuD;AACvD,6CAAyD;AACzD,2CAAuD;AAEvD,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,QAAQ,CAAC;KACd,WAAW,CAAC,6EAA6E,CAAC;KAC1F,OAAO,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;AAEnE,OAAO;AACP,IAAA,4BAAoB,EAAC,OAAO,CAAC,CAAC;AAC9B,IAAA,8BAAqB,EAAC,OAAO,CAAC,CAAC;AAC/B,IAAA,8BAAqB,EAAC,OAAO,CAAC,CAAC;AAC/B,IAAA,0BAAmB,EAAC,OAAO,CAAC,CAAC;AAE7B,aAAa;AACb,IAAA,4BAAoB,EAAC,OAAO,CAAC,CAAC;AAE9B,oBAAoB;AACpB,IAAA,0BAAmB,EAAC,OAAO,CAAC,CAAC;AAE7B,OAAO;AACP,IAAA,gCAAsB,EAAC,OAAO,CAAC,CAAC;AAChC,IAAA,4BAAoB,EAAC,OAAO,CAAC,CAAC;AAC9B,IAAA,8BAAqB,EAAC,OAAO,CAAC,CAAC;AAE/B,QAAQ;AACR,IAAA,8BAAqB,EAAC,OAAO,CAAC,CAAC;AAC/B,IAAA,kCAAqB,EAAC,OAAO,CAAC,CAAC;AAE/B,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC"}
|