@nullsquare/agent-authority 0.4.5 → 0.4.6
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 +245 -300
- package/ROADMAP.md +128 -105
- package/benchmarks/task-utility.mjs +130 -0
- package/docs/npm-release.md +13 -9
- package/docs/product-proof.md +185 -0
- package/examples/task-first-github.js +102 -0
- package/package.json +7 -4
- package/src/task.js +238 -0
package/README.md
CHANGED
|
@@ -6,64 +6,29 @@
|
|
|
6
6
|
|
|
7
7
|
### Give your agent a task, not your account.
|
|
8
8
|
|
|
9
|
-
**Agent Authority
|
|
9
|
+
**Agent Authority is a small execution layer that lets an agent use existing account permissions only for the task the user actually gave it.**
|
|
10
10
|
|
|
11
|
-
[Task
|
|
11
|
+
[Task-first API](#task-first-api) · [Product proof gate](docs/product-proof.md) · [Task Leases](docs/task-leases.md) · [Durability](docs/durable-task-leases.md) · [Evidence](docs/evidence.md) · [Transport invariance](docs/transport-invariance.md) · [Roadmap](ROADMAP.md)
|
|
12
12
|
|
|
13
|
-
> **Status: public pre-alpha / v0.4.
|
|
13
|
+
> **Status: public pre-alpha / v0.4.5 Developer Preview on npm.** The `main` branch may contain unreleased work for the next preview. Agent Authority is not production-ready yet.
|
|
14
14
|
|
|
15
15
|
</div>
|
|
16
16
|
|
|
17
|
-
##
|
|
18
|
-
|
|
19
|
-
Requires Node.js 20+.
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
npm install @nullsquare/agent-authority
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## The problem
|
|
26
|
-
|
|
27
|
-
AI agents increasingly receive broad provider permissions so they can complete narrow human tasks.
|
|
17
|
+
## Why this exists
|
|
28
18
|
|
|
29
|
-
A user
|
|
19
|
+
A user gives an agent a narrow task:
|
|
30
20
|
|
|
31
|
-
> **Handle
|
|
21
|
+
> **Handle this customer email.**
|
|
32
22
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
```text
|
|
36
|
-
Gmail -> read one thread
|
|
37
|
-
|
|
|
38
|
-
v
|
|
39
|
-
discover sender
|
|
40
|
-
|
|
|
41
|
-
v
|
|
42
|
-
Calendar -> create one meeting with that sender
|
|
43
|
-
|
|
|
44
|
-
v
|
|
45
|
-
Gmail -> reply in the originating thread
|
|
46
|
-
```
|
|
23
|
+
But the connected account may give the application broad standing permission to read every email, create meetings with anyone, update any CRM record, or send mail to anyone.
|
|
47
24
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
Traditional authorization answers:
|
|
25
|
+
OAuth and IAM answer:
|
|
51
26
|
|
|
52
27
|
> Can this application use Calendar?
|
|
53
28
|
|
|
54
|
-
Agent Authority asks
|
|
55
|
-
|
|
56
|
-
> **Is this exact effect justified by the task the human authorized?**
|
|
57
|
-
|
|
58
|
-
## Task-bounded autonomy
|
|
29
|
+
Agent Authority asks immediately before the effect:
|
|
59
30
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
```text
|
|
63
|
-
broad standing permissions
|
|
64
|
-
OR
|
|
65
|
-
approve every tool call
|
|
66
|
-
```
|
|
31
|
+
> **Is this exact Calendar action justified by the task the user authorized?**
|
|
67
32
|
|
|
68
33
|
The target is:
|
|
69
34
|
|
|
@@ -73,355 +38,335 @@ one meaningful task approval
|
|
|
73
38
|
v
|
|
74
39
|
temporary bounded authority
|
|
75
40
|
|
|
|
76
|
-
+-->
|
|
77
|
-
+-->
|
|
78
|
-
+-->
|
|
41
|
+
+--> useful task actions proceed normally
|
|
42
|
+
+--> authority may follow resources discovered through authorized work
|
|
43
|
+
+--> unrelated resources require step-up
|
|
79
44
|
|
|
|
80
45
|
v
|
|
81
|
-
task completes -> authority disappears
|
|
46
|
+
task completes -> task authority disappears
|
|
82
47
|
```
|
|
83
48
|
|
|
84
49
|
The provider credential may continue to exist. The **task authority does not**.
|
|
85
50
|
|
|
86
|
-
##
|
|
51
|
+
## Install
|
|
87
52
|
|
|
88
|
-
|
|
53
|
+
Requires Node.js 20+.
|
|
89
54
|
|
|
90
|
-
|
|
55
|
+
```bash
|
|
56
|
+
npm install @nullsquare/agent-authority
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Task-first API
|
|
60
|
+
|
|
61
|
+
The preferred developer surface is intentionally small:
|
|
91
62
|
|
|
92
63
|
```text
|
|
93
|
-
|
|
94
|
-
|
|
|
95
|
-
v
|
|
96
|
-
authority root
|
|
97
|
-
Gmail thread #91
|
|
98
|
-
|
|
|
99
|
-
authorized read
|
|
100
|
-
|
|
|
101
|
-
+--> ALLOW receipt
|
|
102
|
-
+--> exact output hash evidence
|
|
103
|
-
|
|
|
104
|
-
v
|
|
105
|
-
reviewed adapter extractor
|
|
106
|
-
|
|
|
107
|
-
v
|
|
108
|
-
derived fact
|
|
109
|
-
customer@example.com
|
|
110
|
-
|
|
|
111
|
-
v
|
|
112
|
-
exact binding
|
|
113
|
-
Calendar attendee must equal that sender
|
|
64
|
+
Task -> Effect -> Authority
|
|
114
65
|
```
|
|
115
66
|
|
|
116
|
-
|
|
67
|
+
```js
|
|
68
|
+
import { createTask } from '@nullsquare/agent-authority/task';
|
|
69
|
+
|
|
70
|
+
const task = createTask({
|
|
71
|
+
principal: 'user:me',
|
|
72
|
+
agent: 'agent:assistant',
|
|
73
|
+
request: 'Find issue #42 and leave one comment only on that issue',
|
|
74
|
+
|
|
75
|
+
permissions: {
|
|
76
|
+
github: {
|
|
77
|
+
allow: ['issue.list', 'issue.comment'],
|
|
78
|
+
deny: ['issue.close', 'repo.delete'],
|
|
79
|
+
constraints: { repository: ['acme/app'] }
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
|
|
83
|
+
authority: {
|
|
84
|
+
repository: {
|
|
85
|
+
kind: 'github.repository',
|
|
86
|
+
value: 'acme/app'
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
|
|
90
|
+
bindings: [
|
|
91
|
+
{
|
|
92
|
+
service: 'github',
|
|
93
|
+
action: 'issue.list',
|
|
94
|
+
field: 'repository',
|
|
95
|
+
authority: 'repository'
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
});
|
|
117
99
|
|
|
118
|
-
|
|
100
|
+
const discovery = await task.run({
|
|
101
|
+
service: 'github',
|
|
102
|
+
action: 'issue.list',
|
|
103
|
+
context: { repository: 'acme/app' }
|
|
104
|
+
}, () => github.listIssues());
|
|
105
|
+
|
|
106
|
+
const issue = task.authorityFrom(discovery, {
|
|
107
|
+
name: 'issue',
|
|
108
|
+
kind: 'github.issue.number',
|
|
109
|
+
from: 'repository',
|
|
110
|
+
extractor: selectedIssueExtractor
|
|
111
|
+
});
|
|
119
112
|
|
|
120
|
-
|
|
113
|
+
task.bind({
|
|
114
|
+
service: 'github',
|
|
115
|
+
action: 'issue.comment',
|
|
116
|
+
field: 'issue_number',
|
|
117
|
+
authority: 'issue'
|
|
118
|
+
});
|
|
121
119
|
|
|
122
|
-
|
|
120
|
+
await task.run({
|
|
121
|
+
service: 'github',
|
|
122
|
+
action: 'issue.comment',
|
|
123
|
+
context: {
|
|
124
|
+
repository: 'acme/app',
|
|
125
|
+
issue_number: issue.value,
|
|
126
|
+
body: 'Handled.'
|
|
127
|
+
}
|
|
128
|
+
}, () => github.comment(issue.value, 'Handled.'));
|
|
129
|
+
```
|
|
123
130
|
|
|
124
|
-
|
|
131
|
+
If the agent changes `issue_number` to an unrelated issue, the callback does not run. Agent Authority returns an authority-delta step-up that can be explained to a human:
|
|
125
132
|
|
|
126
|
-
```
|
|
127
|
-
|
|
133
|
+
```js
|
|
134
|
+
try {
|
|
135
|
+
await task.run(unrelatedRequest, effect);
|
|
136
|
+
} catch (error) {
|
|
137
|
+
console.log(task.explain(error).summary);
|
|
138
|
+
}
|
|
128
139
|
```
|
|
129
140
|
|
|
130
|
-
|
|
141
|
+
Example output:
|
|
131
142
|
|
|
132
|
-
|
|
143
|
+
```text
|
|
144
|
+
The task established authority for 42 but this action requested 7.
|
|
145
|
+
```
|
|
133
146
|
|
|
134
|
-
|
|
147
|
+
The task-first API is a facade over the existing Mission, Task Lease, execution-evidence and guard primitives. It does not weaken or replace them.
|
|
135
148
|
|
|
136
|
-
## Run the
|
|
149
|
+
## Run the product demo
|
|
137
150
|
|
|
138
|
-
|
|
151
|
+
From a checkout:
|
|
139
152
|
|
|
140
153
|
```bash
|
|
141
|
-
git clone https://github.com/Null-Square/agent-authority.git
|
|
142
|
-
cd agent-authority
|
|
143
154
|
npm install
|
|
144
|
-
npm
|
|
145
|
-
npm run demo:task-lease
|
|
155
|
+
npm run demo:task
|
|
146
156
|
```
|
|
147
157
|
|
|
148
|
-
The demo performs
|
|
158
|
+
The self-contained GitHub-shaped demo performs:
|
|
149
159
|
|
|
150
160
|
```text
|
|
151
|
-
1.
|
|
152
|
-
2.
|
|
153
|
-
3.
|
|
154
|
-
4.
|
|
155
|
-
5.
|
|
156
|
-
6. DENY subsequent actions
|
|
161
|
+
1. authorized issue discovery
|
|
162
|
+
2. exact guarded result becomes downstream authority
|
|
163
|
+
3. comment on the discovered issue succeeds
|
|
164
|
+
4. comment on an unrelated issue requires step-up
|
|
165
|
+
5. blocked attempt executes zero provider callbacks
|
|
157
166
|
```
|
|
158
167
|
|
|
159
|
-
The
|
|
160
|
-
|
|
161
|
-
The repository also includes a real Gmail → Calendar validation path and a reusable Google provider adapter. The strict path binds the derived sender to the exact guarded output before it becomes authority. See [Live Gmail → Calendar validation](docs/live-google-validation.md) and [Executable Evidence](docs/evidence.md).
|
|
168
|
+
The callback bodies are intentionally replaceable with the SDK/provider calls an application already uses.
|
|
162
169
|
|
|
163
|
-
|
|
170
|
+
## Utility benchmark
|
|
164
171
|
|
|
165
|
-
|
|
172
|
+
Security is necessary but not sufficient. Agent Authority also tracks whether normal agent work still succeeds without approval fatigue.
|
|
166
173
|
|
|
167
|
-
|
|
174
|
+
```bash
|
|
175
|
+
npm run benchmark:task
|
|
176
|
+
```
|
|
168
177
|
|
|
169
|
-
|
|
170
|
-
import { AuthorityRuntime } from '@nullsquare/agent-authority';
|
|
171
|
-
import { createTaskLease } from '@nullsquare/agent-authority/task-lease';
|
|
172
|
-
import { createTaskLeaseGuard } from '@nullsquare/agent-authority/guard';
|
|
173
|
-
import { gmailThreadSenderAuthorityExtractor } from '@nullsquare/agent-authority/providers/google';
|
|
174
|
-
|
|
175
|
-
const lease = createTaskLease({
|
|
176
|
-
mission,
|
|
177
|
-
request: 'Handle the demo request in thread:demo-91',
|
|
178
|
-
roots: [
|
|
179
|
-
{ fact_id: 'fact:thread', kind: 'gmail.thread', value: 'thread:demo-91' }
|
|
180
|
-
],
|
|
181
|
-
bindings: [
|
|
182
|
-
{
|
|
183
|
-
service: 'calendar',
|
|
184
|
-
action: 'event.create',
|
|
185
|
-
context_field: 'attendee_email',
|
|
186
|
-
fact_id: 'fact:sender-email'
|
|
187
|
-
}
|
|
188
|
-
]
|
|
189
|
-
});
|
|
178
|
+
The first deterministic fixture measures:
|
|
190
179
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
180
|
+
- normal task completion rate;
|
|
181
|
+
- false approval rate;
|
|
182
|
+
- true authority-delta step-up rate;
|
|
183
|
+
- unauthorized effect rate;
|
|
184
|
+
- provider effects required for completed tasks.
|
|
195
185
|
|
|
196
|
-
|
|
197
|
-
service: 'gmail',
|
|
198
|
-
action: 'thread.read',
|
|
199
|
-
context: { thread_id: 'thread:demo-91' }
|
|
200
|
-
}, () => gmail.readThread('thread:demo-91'));
|
|
201
|
-
|
|
202
|
-
const senderFact = lease.deriveFromEvidence({
|
|
203
|
-
fact_id: 'fact:sender-email',
|
|
204
|
-
kind: 'email.address',
|
|
205
|
-
from: ['fact:thread'],
|
|
206
|
-
receipt: read.receipt,
|
|
207
|
-
evidence: read.evidence,
|
|
208
|
-
output: read.output,
|
|
209
|
-
extractor: gmailThreadSenderAuthorityExtractor
|
|
210
|
-
});
|
|
186
|
+
Its current regression target is:
|
|
211
187
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
188
|
+
```text
|
|
189
|
+
normal task completion rate = 100%
|
|
190
|
+
false approval rate = 0%
|
|
191
|
+
true authority-delta step-up rate = 100%
|
|
192
|
+
unauthorized effect rate = 0%
|
|
217
193
|
```
|
|
218
194
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
The older `derive()` API remains available as the explicitly **host-trusted compatibility path**.
|
|
195
|
+
This is a deterministic product regression fixture, **not a real-world benchmark**. Real provider and harness workloads should replace or supplement it as adoption grows.
|
|
222
196
|
|
|
223
|
-
|
|
197
|
+
See [Product proof gate](docs/product-proof.md).
|
|
224
198
|
|
|
225
|
-
##
|
|
199
|
+
## The differentiated mechanism
|
|
226
200
|
|
|
227
|
-
|
|
201
|
+
Many task resources are unknown when the user gives the instruction. They are discovered during execution.
|
|
228
202
|
|
|
229
|
-
|
|
203
|
+
Agent Authority lets authority follow those resources only when the value comes from already-authorized work:
|
|
230
204
|
|
|
231
205
|
```text
|
|
232
|
-
|
|
206
|
+
human-approved task
|
|
207
|
+
|
|
|
208
|
+
v
|
|
209
|
+
authority root
|
|
210
|
+
repository = acme/app
|
|
211
|
+
|
|
|
212
|
+
authorized issue discovery
|
|
213
|
+
|
|
|
214
|
+
+--> ALLOW receipt
|
|
215
|
+
+--> exact output evidence
|
|
216
|
+
|
|
|
217
|
+
reviewed extractor
|
|
218
|
+
|
|
|
219
|
+
v
|
|
220
|
+
derived authority
|
|
221
|
+
issue = 42
|
|
222
|
+
|
|
|
223
|
+
v
|
|
224
|
+
later effect may bind issue_number == 42
|
|
233
225
|
```
|
|
234
226
|
|
|
235
|
-
|
|
227
|
+
A request for issue `42` can proceed.
|
|
228
|
+
|
|
229
|
+
A request for issue `7` does not inherit the same authority simply because the underlying GitHub credential can access it.
|
|
236
230
|
|
|
237
|
-
|
|
231
|
+
That is the core contribution we are testing:
|
|
232
|
+
|
|
233
|
+
> **Authority may follow the task's proven execution path without becoming ambient account authority.**
|
|
234
|
+
|
|
235
|
+
## Core invariant
|
|
238
236
|
|
|
239
237
|
```text
|
|
240
|
-
|
|
238
|
+
Task Lease authority <= Mission authority
|
|
241
239
|
```
|
|
242
240
|
|
|
243
|
-
|
|
241
|
+
The Mission remains the ceiling. Task authority may stay the same or shrink as work crosses tools, transports and durable state. It must never silently grow.
|
|
242
|
+
|
|
243
|
+
## Existing stack, not a replacement stack
|
|
244
244
|
|
|
245
|
-
|
|
245
|
+
Agent Authority is not trying to replace OAuth, IAM, MCP, gateways or agent frameworks.
|
|
246
246
|
|
|
247
247
|
```text
|
|
248
|
-
agent
|
|
248
|
+
agent reasoning
|
|
249
|
+
|
|
|
250
|
+
v
|
|
251
|
+
Agent Authority
|
|
252
|
+
|
|
|
253
|
+
v
|
|
254
|
+
existing SDK / MCP / gateway / OAuth / provider
|
|
249
255
|
```
|
|
250
256
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
v0.4.4 demonstrates the **same Task Lease and authority fact across all three paths in-process**, plus the configured Vercel AI SDK `ToolLoopAgent` protected-tool path. M4 is complete at this execution-boundary level. A malicious host that deliberately exposes a separate unguarded tool or credential remains outside Agent Authority's security boundary.
|
|
254
|
-
|
|
255
|
-
## What is implemented
|
|
256
|
-
|
|
257
|
-
### Task authority
|
|
258
|
-
|
|
259
|
-
- mission validation and deterministic `ALLOW / DENY / REQUIRE_APPROVAL`
|
|
260
|
-
- explicit deny precedence
|
|
261
|
-
- resource/context constraints
|
|
262
|
-
- expiry and cumulative budgets
|
|
263
|
-
- delegation attenuation
|
|
264
|
-
- durable mission revocation
|
|
265
|
-
- Task Lease prototype
|
|
266
|
-
- explicit authority roots
|
|
267
|
-
- same-lease provenance-bound derived facts
|
|
268
|
-
- execution evidence binding an allowed receipt, request and exact output hash
|
|
269
|
-
- strict `deriveFromEvidence()` path where the caller cannot provide the authority value
|
|
270
|
-
- reviewed Gmail sender authority extractor bound to `gmail:thread.read`
|
|
271
|
-
- reviewed GitHub selected-issue-number extractor bound to marker-scoped `github:issue.list`
|
|
272
|
-
- shared Google/GitHub authority-extractor conformance suite
|
|
273
|
-
- legacy host-trusted `derive()` compatibility path
|
|
274
|
-
- required parent lineage and extraction selector
|
|
275
|
-
- exact context-field bindings
|
|
276
|
-
- authority-delta step-up signal
|
|
277
|
-
- immediate task completion/expiry enforcement
|
|
278
|
-
- Task Lease IDs/hashes in decision receipts
|
|
279
|
-
|
|
280
|
-
### Enforcement
|
|
281
|
-
|
|
282
|
-
- protocol-neutral `guard.run()` wrapper
|
|
283
|
-
- blocked side effects never invoke their callback
|
|
284
|
-
- successful guarded effects return separate execution evidence
|
|
285
|
-
- Task-Lease-aware MCP gateway/proxy evaluation
|
|
286
|
-
- Task-Lease-aware brokered execution via `ExecutingAuthorityRuntime.executeTaskLease()`
|
|
287
|
-
- brokered execution evidence bound to Task-Lease receipts
|
|
288
|
-
- SDK/MCP/broker transport-invariance conformance test
|
|
289
|
-
- real Vercel AI SDK `ToolLoopAgent` protected-tool harness proof
|
|
290
|
-
- unmapped executable AI SDK tools fail closed before their effect executes
|
|
291
|
-
- one-time human approvals bound to exact request
|
|
292
|
-
- mutation idempotency
|
|
293
|
-
- conservative uncertain-state handling
|
|
294
|
-
- signed harness action grants
|
|
295
|
-
- MCP v2 read-only gateway/proxy
|
|
296
|
-
|
|
297
|
-
### Credentials and runtime
|
|
298
|
-
|
|
299
|
-
- persistent connection metadata
|
|
300
|
-
- AES-256-GCM local encrypted secret store
|
|
301
|
-
- safe reconnect cleanup
|
|
302
|
-
- GitHub brokered execution without returning the token to the agent
|
|
303
|
-
- GitHub REST mappings for repository access plus evidence-derived `issue.list` / `issue.comment`
|
|
304
|
-
- Google REST provider mappings for Gmail thread reads and Calendar event mutations
|
|
305
|
-
- short-lived signed local agent-instance tokens
|
|
306
|
-
- local CLI/daemon
|
|
307
|
-
|
|
308
|
-
### Engineering quality
|
|
309
|
-
|
|
310
|
-
- adversarial authorization tests
|
|
311
|
-
- execution-evidence substitution, tampering, replay, cross-lease and selector tests
|
|
312
|
-
- the same provider-derived-authority conformance attacks against Google and GitHub
|
|
313
|
-
- cross-transport invariance test for direct SDK, MCP and brokered execution
|
|
314
|
-
- real AI SDK agent-loop tests for unauthorized, unmapped and completed-lease tool calls with zero underlying effects
|
|
315
|
-
- Node 20 and Node 22 CI
|
|
316
|
-
- coverage run
|
|
317
|
-
- package checks
|
|
318
|
-
- clean-consumer npm registry verification
|
|
319
|
-
- live GitHub read and evidence-derived mutation proofs
|
|
320
|
-
- CodeQL
|
|
321
|
-
|
|
322
|
-
## What is different from OAuth, IAM and MCP authorization?
|
|
323
|
-
|
|
324
|
-
Agent Authority is **not trying to replace them**.
|
|
325
|
-
|
|
326
|
-
OAuth/IAM answer who or what may access a provider and with which standing scopes. MCP authorization protects an MCP transport. Agent Authority operates at a different boundary:
|
|
257
|
+
Three execution modes already share the same Task Lease semantics:
|
|
327
258
|
|
|
328
259
|
```text
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
temporary task authority
|
|
333
|
-
|
|
|
334
|
-
v
|
|
335
|
-
exact agent-originated effect
|
|
336
|
-
|
|
|
337
|
-
+--> existing OAuth / IAM / MCP / SDK / CLI
|
|
260
|
+
in-process guard
|
|
261
|
+
MCP gateway
|
|
262
|
+
brokered provider execution
|
|
338
263
|
```
|
|
339
264
|
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
The contribution we are testing is operational: **make task-scoped, provenance-aware least privilege usable inside ordinary agent stacks.**
|
|
265
|
+
A real Vercel AI SDK `ToolLoopAgent` integration also exercises the protected-tool boundary. See [Transport invariance](docs/transport-invariance.md).
|
|
343
266
|
|
|
344
|
-
##
|
|
267
|
+
## Durability
|
|
345
268
|
|
|
346
|
-
|
|
269
|
+
For local workflows that must survive process restarts, pass a `JsonFileTaskLeaseStore` to the same task-first API:
|
|
347
270
|
|
|
348
|
-
|
|
271
|
+
```js
|
|
272
|
+
import { JsonFileTaskLeaseStore } from '@nullsquare/agent-authority/storage';
|
|
273
|
+
import { createTask } from '@nullsquare/agent-authority/task';
|
|
349
274
|
|
|
350
|
-
|
|
275
|
+
const store = new JsonFileTaskLeaseStore({
|
|
276
|
+
dir: config.paths.task_leases,
|
|
277
|
+
keyPath: config.paths.master_key
|
|
278
|
+
});
|
|
351
279
|
|
|
352
|
-
|
|
280
|
+
const task = createTask({
|
|
281
|
+
...taskDefinition,
|
|
282
|
+
store
|
|
283
|
+
});
|
|
284
|
+
```
|
|
353
285
|
|
|
354
|
-
|
|
286
|
+
The task facade then uses the durable Task Lease session internally. Normal task calls do not change.
|
|
355
287
|
|
|
356
|
-
|
|
288
|
+
Durable state currently provides authenticated local recovery, exact Mission binding, atomic whole-state replacement, per-lease local locking, stale-writer compare-and-swap protection, durable completion/expiry, and refresh before authority evaluation.
|
|
357
289
|
|
|
358
|
-
|
|
290
|
+
See [Durable Task Leases](docs/durable-task-leases.md).
|
|
359
291
|
|
|
360
|
-
|
|
292
|
+
## What is already proven
|
|
361
293
|
|
|
362
|
-
|
|
294
|
+
- deterministic allow / deny / require-approval decisions;
|
|
295
|
+
- explicit deny precedence and Mission ceiling;
|
|
296
|
+
- execution evidence bound to exact guarded output;
|
|
297
|
+
- strict evidence-derived authority where callers do not provide the derived value;
|
|
298
|
+
- reviewed Google Gmail-sender and GitHub selected-issue extractors;
|
|
299
|
+
- shared two-provider adversarial conformance tests;
|
|
300
|
+
- live GitHub read and evidence-derived comment mutation proofs;
|
|
301
|
+
- connected Gmail -> Calendar smoke proof;
|
|
302
|
+
- direct SDK / MCP / broker transport invariance;
|
|
303
|
+
- real Vercel AI SDK protected-tool execution proof;
|
|
304
|
+
- authenticated durable Task Lease recovery;
|
|
305
|
+
- stale-writer/CAS and mission-alias protection;
|
|
306
|
+
- automatic durable Task Lease sessions;
|
|
307
|
+
- Node 20/22 CI, coverage, packed-consumer validation and CodeQL;
|
|
308
|
+
- independent npm registry consumer verification.
|
|
363
309
|
|
|
364
|
-
|
|
310
|
+
The lower-level evidence is documented under `docs/` and remains available for security review.
|
|
365
311
|
|
|
366
|
-
|
|
312
|
+
## Product direction
|
|
367
313
|
|
|
368
|
-
|
|
314
|
+
The next product risk is **not lack of another security subsystem**. It is adoption and useful autonomy.
|
|
369
315
|
|
|
370
|
-
|
|
316
|
+
Before deeper distributed/crypto infrastructure becomes a priority, Agent Authority should prove:
|
|
371
317
|
|
|
372
|
-
1.
|
|
373
|
-
2.
|
|
374
|
-
3.
|
|
375
|
-
4.
|
|
376
|
-
5.
|
|
377
|
-
6. **Task authority ends with the task.** Completion and expiry are independent from provider credential lifetime.
|
|
378
|
-
7. **Authority may shrink, never silently grow.** Delegation and transport changes must preserve non-amplification.
|
|
379
|
-
8. **The evaluated request must be the executed request.** Request hashes, grants and idempotency protect the boundary.
|
|
380
|
-
9. **Credentials stay out of model context where Agent Authority owns them.**
|
|
381
|
-
10. **Security gaps are documented, not marketed away.**
|
|
318
|
+
1. a new developer can get a meaningful workflow running in under 10 minutes;
|
|
319
|
+
2. coding, support/communications and operations/finance workflows all fit the task-first model;
|
|
320
|
+
3. normal task completion stays high without approval spam;
|
|
321
|
+
4. unrelated-resource effects still execute zero provider callbacks;
|
|
322
|
+
5. at least one external developer adopts the package without project-author assistance.
|
|
382
323
|
|
|
383
|
-
See [
|
|
324
|
+
See [Product proof gate](docs/product-proof.md) and [Roadmap](ROADMAP.md).
|
|
384
325
|
|
|
385
326
|
## Current limitations
|
|
386
327
|
|
|
387
328
|
This is still a validation implementation.
|
|
388
329
|
|
|
389
|
-
-
|
|
390
|
-
-
|
|
391
|
-
-
|
|
392
|
-
-
|
|
393
|
-
-
|
|
394
|
-
-
|
|
395
|
-
- Approved authority deltas are surfaced but not automatically applied
|
|
396
|
-
- GitHub token-stdin
|
|
397
|
-
-
|
|
398
|
-
|
|
330
|
+
- Durable persistence is a trusted-local-host reference backend, not distributed consensus or hostile-host containment.
|
|
331
|
+
- Another worker can still change durable state after an `ALLOW` decision and before asynchronous remote provider I/O begins. Remote effect + receipt + Task Lease state are not one distributed transaction.
|
|
332
|
+
- A crashed local worker may leave a per-lease lock requiring explicit recovery.
|
|
333
|
+
- Transport/harness proofs do not contain a malicious host that deliberately exposes a separate unguarded tool, shell, network path or credential.
|
|
334
|
+
- Provider outputs are evidence-bound inside the trusted Agent Authority runtime but are not provider-signed remote attestations.
|
|
335
|
+
- Source-data changes do not yet automatically invalidate already-derived authority.
|
|
336
|
+
- Approved authority deltas are surfaced but not automatically applied into a live durable task.
|
|
337
|
+
- GitHub token-stdin and the local encrypted vault are developer bridges, not final production OAuth/KMS UX.
|
|
338
|
+
- Remote authenticated deployment and production approval UX remain incomplete.
|
|
339
|
+
|
|
340
|
+
These are real limitations. They are not reasons to build every possible infrastructure layer before product adoption is proven.
|
|
399
341
|
|
|
400
|
-
|
|
342
|
+
## What we are deliberately not prioritizing now
|
|
401
343
|
|
|
402
|
-
|
|
344
|
+
Unless a real workflow proves otherwise:
|
|
403
345
|
|
|
404
|
-
- another agent harness
|
|
405
|
-
-
|
|
406
|
-
- an MCP replacement
|
|
407
|
-
- a connector marketplace
|
|
408
|
-
- a
|
|
409
|
-
-
|
|
346
|
+
- another agent harness;
|
|
347
|
+
- a new OAuth/identity/token protocol;
|
|
348
|
+
- an MCP replacement/control plane;
|
|
349
|
+
- a connector marketplace;
|
|
350
|
+
- a proprietary universal policy DSL;
|
|
351
|
+
- distributed Task Lease databases;
|
|
352
|
+
- provider-attestation protocol design;
|
|
353
|
+
- A2A implementation;
|
|
354
|
+
- dashboard-first enterprise product work.
|
|
410
355
|
|
|
411
356
|
## Contributing
|
|
412
357
|
|
|
413
|
-
The
|
|
358
|
+
The most valuable contribution answers:
|
|
414
359
|
|
|
415
|
-
> **Can this agent complete the intended task while being technically unable to use the same
|
|
360
|
+
> **Can this agent complete the intended task while being technically unable to use the same standing account authority for an unrelated effect?**
|
|
416
361
|
|
|
417
|
-
|
|
362
|
+
Especially useful:
|
|
418
363
|
|
|
419
|
-
-
|
|
420
|
-
- trustworthy operation -> resource
|
|
421
|
-
-
|
|
364
|
+
- real task-first workflows;
|
|
365
|
+
- trustworthy operation -> resource mappings;
|
|
366
|
+
- utility-regression cases that cause unnecessary approvals;
|
|
422
367
|
- derived-authority / provenance attacks;
|
|
423
|
-
-
|
|
424
|
-
-
|
|
368
|
+
- transport or multi-worker attacks;
|
|
369
|
+
- feedback from developers trying to integrate the package for the first time.
|
|
425
370
|
|
|
426
371
|
See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
427
372
|
|