@nullsquare/agent-authority 0.4.6 → 0.4.7
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 +59 -3
- package/ROADMAP.md +20 -3
- package/docs/connected-execution-api.md +60 -0
- package/docs/connected-github.md +140 -0
- package/docs/npm-release.md +25 -9
- package/docs/product-proof.md +134 -8
- package/docs/quickstart.md +147 -0
- package/docs/release-v0.4.7.md +29 -0
- package/examples/live-github-derived-mutation.js +47 -54
- package/examples/quickstart-github-connected.mjs +77 -0
- package/examples/quickstart-github-live.mjs +84 -0
- package/examples/quickstart.mjs +101 -0
- package/examples/task-first-finance.js +223 -0
- package/examples/task-first-support.js +127 -0
- package/package.json +4 -2
- package/src/cli.js +3 -3
- package/src/connections.js +19 -4
- package/src/task.js +45 -4
package/README.md
CHANGED
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
|
|
9
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-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)
|
|
11
|
+
[Quickstart](docs/quickstart.md) · [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.6 Developer Preview on npm.** The task-first API is published as `@nullsquare/agent-authority/task`. Agent Authority is not production-ready yet.
|
|
14
14
|
|
|
15
15
|
</div>
|
|
16
16
|
|
|
@@ -56,6 +56,57 @@ Requires Node.js 20+.
|
|
|
56
56
|
npm install @nullsquare/agent-authority
|
|
57
57
|
```
|
|
58
58
|
|
|
59
|
+
## Fresh-install quickstart
|
|
60
|
+
|
|
61
|
+
You can see the task-authority model without a repository checkout, provider credential, OAuth setup, custom extractor, or Mission JSON.
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
mkdir agent-authority-quickstart
|
|
65
|
+
cd agent-authority-quickstart
|
|
66
|
+
npm init -y
|
|
67
|
+
npm install @nullsquare/agent-authority
|
|
68
|
+
curl -fsSL https://raw.githubusercontent.com/Null-Square/agent-authority/main/examples/quickstart.mjs -o quickstart.mjs
|
|
69
|
+
node quickstart.mjs
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Expected shape:
|
|
73
|
+
|
|
74
|
+
```text
|
|
75
|
+
ALLOW -> task discovered issue #42 and the exact comment effect ran
|
|
76
|
+
STEP-UP -> The task established authority for 42 but this action requested 7.
|
|
77
|
+
PASS -> useful task work ran; unrelated standing permission did not become task authority
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
The quickstart uses the real published `createTask()` API and reviewed GitHub authority extractor. Only the provider callback is a local provider-shaped fixture so the first run needs no account.
|
|
81
|
+
|
|
82
|
+
An automated blank-project gate independently installed `@nullsquare/agent-authority@0.4.6` from npm on Node 20 and ran this exact file successfully. That proves the current published package supports the documented path; it does **not** replace the still-open first-time-human under-10-minute adoption test.
|
|
83
|
+
|
|
84
|
+
### Next: make one real GitHub call, still with no credential
|
|
85
|
+
|
|
86
|
+
From the same blank project:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
curl -fsSL https://raw.githubusercontent.com/Null-Square/agent-authority/main/examples/quickstart-github-live.mjs -o quickstart-github-live.mjs
|
|
90
|
+
node quickstart-github-live.mjs
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Expected shape:
|
|
94
|
+
|
|
95
|
+
```text
|
|
96
|
+
Standing GitHub permission -> repo.read
|
|
97
|
+
Task authority -> Null-Square/agent-authority
|
|
98
|
+
GitHub mode -> public API; no credential required
|
|
99
|
+
ALLOW -> real GitHub returned Null-Square/agent-authority
|
|
100
|
+
STEP-UP -> The task established authority for "Null-Square/agent-authority" but this action requested "octocat/Hello-World".
|
|
101
|
+
PASS -> broader standing repo.read permission could not reach an unrelated repository for this task
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
This deliberately models the account/app capability as broader than the task. Mission-level `repo.read` can read repositories generally, while the Task authority root allows this task to reach only `Null-Square/agent-authority`. The first request makes one real public GitHub `fetch()`; the unrelated repository is stopped before a second network call.
|
|
105
|
+
|
|
106
|
+
A separate blank-project CI gate has passed this exact live path against npm `0.4.6`. Authenticated/private-repository onboarding remains separate follow-on work.
|
|
107
|
+
|
|
108
|
+
See [Fresh-install quickstart](docs/quickstart.md).
|
|
109
|
+
|
|
59
110
|
## Task-first API
|
|
60
111
|
|
|
61
112
|
The preferred developer surface is intentionally small:
|
|
@@ -304,6 +355,10 @@ See [Durable Task Leases](docs/durable-task-leases.md).
|
|
|
304
355
|
- authenticated durable Task Lease recovery;
|
|
305
356
|
- stale-writer/CAS and mission-alias protection;
|
|
306
357
|
- automatic durable Task Lease sessions;
|
|
358
|
+
- task-first public facade and deterministic utility regression gate;
|
|
359
|
+
- self-contained support/communications and operations/finance product proofs;
|
|
360
|
+
- blank-project fixture quickstart against the current npm package;
|
|
361
|
+
- blank-project real public GitHub onboarding with broader standing permission and narrower task authority;
|
|
307
362
|
- Node 20/22 CI, coverage, packed-consumer validation and CodeQL;
|
|
308
363
|
- independent npm registry consumer verification.
|
|
309
364
|
|
|
@@ -334,7 +389,8 @@ This is still a validation implementation.
|
|
|
334
389
|
- Provider outputs are evidence-bound inside the trusted Agent Authority runtime but are not provider-signed remote attestations.
|
|
335
390
|
- Source-data changes do not yet automatically invalidate already-derived authority.
|
|
336
391
|
- Approved authority deltas are surfaced but not automatically applied into a live durable task.
|
|
337
|
-
-
|
|
392
|
+
- Current Task Lease bindings are exact equality. The finance proof therefore steps up for a partial refund as well as an over-refund; a derived numeric ceiling remains an evidence-driven product question rather than a general policy language.
|
|
393
|
+
- Public GitHub onboarding is credential-free for read-only public repositories; authenticated/private-repository onboarding and production OAuth/KMS UX remain incomplete.
|
|
338
394
|
- Remote authenticated deployment and production approval UX remain incomplete.
|
|
339
395
|
|
|
340
396
|
These are real limitations. They are not reasons to build every possible infrastructure layer before product adoption is proven.
|
package/ROADMAP.md
CHANGED
|
@@ -37,12 +37,27 @@ The engine has enough depth to test whether developers actually want this layer.
|
|
|
37
37
|
- [x] same task-first calls can opt into durable local state by adding a store
|
|
38
38
|
- [x] self-contained GitHub-shaped task-first demo
|
|
39
39
|
- [x] deterministic utility regression benchmark
|
|
40
|
+
- [x] first live provider proof through task-first API: GitHub issue discovery -> exact issue comment
|
|
41
|
+
- [x] self-contained support/communications proof: Gmail thread -> exact Calendar attendee
|
|
42
|
+
- [x] self-contained operations/finance proof: ticket -> order -> payment -> exact full refund
|
|
43
|
+
- [x] automated blank-project quickstart against the current published npm package
|
|
44
|
+
- [x] blank-project real-provider quickstart: broad standing `repo.read` -> one task-authorized public GitHub repository
|
|
40
45
|
- [ ] coding workflow: issue -> branch -> files -> PR, with merge/deploy outside authority
|
|
41
|
-
- [ ] support/communications
|
|
42
|
-
- [ ]
|
|
46
|
+
- [ ] support/communications expansion: customer -> meeting + reply/CRM, or live task-first Google Actions proof
|
|
47
|
+
- [ ] bounded finance refund: derived payment amount can authorize a smaller refund without authorizing an over-refund
|
|
43
48
|
- [ ] first-time developer can complete a meaningful integration in under 10 minutes
|
|
44
49
|
- [ ] at least one external developer adopts the package without project-author assistance
|
|
45
50
|
|
|
51
|
+
The live GitHub task-first proof selected issue #9 through the reviewed provider mapping, established that issue through `task.authorityFrom()`, executed exactly one real comment mutation, blocked unrelated issue #1 with `authority_delta_required`, surfaced the established-vs-requested explanation, denied the same issue after task completion, and observed `reads=1` / `task_mutations=1` before cleanup.
|
|
52
|
+
|
|
53
|
+
The support/communications proof uses the same task-first API across Gmail and Calendar: one authorized `thread_id` establishes one canonical `sender_email` through the reviewed Google extractor; only that attendee can be used for the task-bound Calendar event, while another thread or attendee executes zero provider-shaped callbacks. The example mirrors the real Google adapter contract but does not replace the still-open public Google Actions evidence gate.
|
|
54
|
+
|
|
55
|
+
The operations/finance proof keeps one evidence-derived chain from support ticket -> order -> payment -> exact refund. The exact payment ID, amount in minor units, and currency are all bound before the refund callback can execute. Unrelated payment, over-refund, wrong currency, partial refund under the current equality model, and post-completion refund all execute zero additional refund callbacks. This proof exposed a deliberate product gap: current bindings are exact equality, so a legitimate partial refund also steps up. Do not add a general expression language; add a narrow derived numeric ceiling only when real workflow/adoption evidence shows partial refunds are required.
|
|
56
|
+
|
|
57
|
+
The fixture fresh-install quickstart is independently exercised from a blank Node 20 project against the latest public npm package. The passing proof installed `@nullsquare/agent-authority@0.4.6`, did not install the optional AI SDK, allowed the exact issue #42 effect, stepped up unrelated issue #7, and observed no unrelated callback. This is automated compatibility evidence, not a substitute for the still-open first-time-human under-10-minute test.
|
|
58
|
+
|
|
59
|
+
The live fresh-install quickstart goes one step further from another blank Node 20 project: Mission-level `github:repo.read` remains broader than the task, Task authority binds that action to `Null-Square/agent-authority`, one real public GitHub API call succeeds, and `octocat/Hello-World` produces `authority_delta_required` before a second `fetch()` can run. No credential is required for the default public-repository path. Authenticated/private-repository onboarding remains separate follow-on work.
|
|
60
|
+
|
|
46
61
|
Current utility regression metrics:
|
|
47
62
|
|
|
48
63
|
```text
|
|
@@ -152,8 +167,10 @@ Changing transport or configured harness execution path does not expand task aut
|
|
|
152
167
|
|
|
153
168
|
Prioritize only the UX needed by successful P0 workflows.
|
|
154
169
|
|
|
170
|
+
- [x] credential-free fresh-install quickstart validated against the current public npm package
|
|
171
|
+
- [x] one low-friction real provider onboarding path: public GitHub read from a blank npm project
|
|
172
|
+
- [ ] authenticated/private-provider onboarding path
|
|
155
173
|
- [ ] compact approval UI showing the exact authority delta
|
|
156
|
-
- [ ] one low-friction real provider onboarding path
|
|
157
174
|
- [ ] automatic short-lived agent session bootstrap where needed
|
|
158
175
|
- [ ] framework integration starter focused on task-first API
|
|
159
176
|
- [ ] external-developer quickstart feedback loop
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Task-owned vs broker-owned execution
|
|
2
|
+
|
|
3
|
+
The task-first facade supports two effect ownership modes with the same Task Lease semantics.
|
|
4
|
+
|
|
5
|
+
## Application-owned effect
|
|
6
|
+
|
|
7
|
+
Use `task.run(request, callback)` when the application already owns the SDK or provider call:
|
|
8
|
+
|
|
9
|
+
```js
|
|
10
|
+
const result = await task.run(request, () => existingSdkCall());
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
The callback runs only after the Task Lease returns ALLOW. The task receives execution evidence for the exact callback output.
|
|
14
|
+
|
|
15
|
+
## Agent Authority connected-provider effect
|
|
16
|
+
|
|
17
|
+
Use `task.execute(request)` when the provider credential and provider adapter should stay behind Agent Authority's broker boundary:
|
|
18
|
+
|
|
19
|
+
```js
|
|
20
|
+
const result = await task.execute(request);
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
This requires the task to be created with an `ExecutingAuthorityRuntime`, such as the runtime produced by the local `createRuntimeEnvironment()` helper.
|
|
24
|
+
|
|
25
|
+
The connected path performs:
|
|
26
|
+
|
|
27
|
+
```text
|
|
28
|
+
Task Lease evaluation
|
|
29
|
+
|
|
|
30
|
+
+--> DENY / STEP-UP -> stop before provider readiness or credential resolution
|
|
31
|
+
|
|
|
32
|
+
v
|
|
33
|
+
connected-provider readiness
|
|
34
|
+
|
|
|
35
|
+
v
|
|
36
|
+
credential broker resolves secret internally
|
|
37
|
+
|
|
|
38
|
+
v
|
|
39
|
+
provider adapter executes
|
|
40
|
+
|
|
|
41
|
+
v
|
|
42
|
+
sanitized output + ALLOW receipt + execution evidence
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
`task.execute()` converts broker runtime `deny` and `require_approval` results into the same `AuthorityDeniedError` and `AuthorityApprovalRequiredError` classes used by `task.run()`.
|
|
46
|
+
|
|
47
|
+
Successful connected execution can therefore feed directly into `task.authorityFrom()` when a reviewed provider extractor exists.
|
|
48
|
+
|
|
49
|
+
## Credential boundary
|
|
50
|
+
|
|
51
|
+
The provider credential belongs to the broker/runtime, not the task request. It should not be copied into:
|
|
52
|
+
|
|
53
|
+
- Mission or Task Lease authority facts;
|
|
54
|
+
- model/tool arguments;
|
|
55
|
+
- action receipts;
|
|
56
|
+
- execution evidence;
|
|
57
|
+
- provider-normalized output;
|
|
58
|
+
- public connection listings.
|
|
59
|
+
|
|
60
|
+
The local runtime's encrypted file vault is a developer/trusted-host reference implementation. Production applications should use an appropriate secret manager/KMS and provider-native credential lifecycle.
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
# Connected GitHub quickstart
|
|
2
|
+
|
|
3
|
+
This path is for a developer who has already understood the credential-free quickstart and now wants Agent Authority to execute through an authenticated GitHub connection.
|
|
4
|
+
|
|
5
|
+
The product boundary is:
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
GitHub token
|
|
9
|
+
|
|
|
10
|
+
v
|
|
11
|
+
Agent Authority encrypted local vault
|
|
12
|
+
|
|
|
13
|
+
v
|
|
14
|
+
CredentialBroker
|
|
15
|
+
|
|
|
16
|
+
v
|
|
17
|
+
GitHub provider adapter
|
|
18
|
+
|
|
|
19
|
+
v
|
|
20
|
+
task.execute(request)
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
The token is not placed in the task request, Mission, Task Lease, receipt, execution evidence, or public connection listing.
|
|
24
|
+
|
|
25
|
+
## 1. Create a project
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
mkdir agent-authority-connected
|
|
29
|
+
cd agent-authority-connected
|
|
30
|
+
npm init -y
|
|
31
|
+
npm install @nullsquare/agent-authority
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Requires Node.js 20+.
|
|
35
|
+
|
|
36
|
+
## 2. Initialize the local Agent Authority home
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
npx agent-authority setup
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
By default this creates `~/.agent-authority`. Provider secrets are stored in the local encrypted vault, whose files are restricted to the local user. This is a trusted-local-host developer reference backend, not a hostile-host or production KMS boundary.
|
|
43
|
+
|
|
44
|
+
## 3. Connect GitHub without putting the token on the command line
|
|
45
|
+
|
|
46
|
+
Use a GitHub token that has only the provider permissions your application actually needs.
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
printf %s "$GITHUB_TOKEN" | npx agent-authority connect github --token-stdin
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
The CLI verifies ordinary user/PAT credentials against GitHub before storing them. The token is accepted only on stdin and is written into the encrypted Agent Authority vault rather than task/model context.
|
|
53
|
+
|
|
54
|
+
For CI installation tokens that do not support the `/user` verification endpoint, `--no-verify` is available for an already-trusted token source:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
printf %s "$GITHUB_TOKEN" | npx agent-authority connect github --token-stdin --no-verify
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Do not use `--no-verify` merely to bypass a failed or unknown credential.
|
|
61
|
+
|
|
62
|
+
GitHub recommends fine-grained personal access tokens with minimum repository/permission scope for user-scoped access, and GitHub Apps for long-lived organization integrations. Agent Authority does not replace those provider-side controls; it adds a narrower task boundary on top of them.
|
|
63
|
+
|
|
64
|
+
## 4. Run the connected task
|
|
65
|
+
|
|
66
|
+
Copy `examples/quickstart-github-connected.mjs` into the project, or run the repository example from a checkout.
|
|
67
|
+
|
|
68
|
+
The relevant application surface is intentionally small:
|
|
69
|
+
|
|
70
|
+
```js
|
|
71
|
+
import { createTask } from '@nullsquare/agent-authority/task';
|
|
72
|
+
import { createRuntimeEnvironment } from '@nullsquare/agent-authority/runtime-env';
|
|
73
|
+
|
|
74
|
+
const env = createRuntimeEnvironment();
|
|
75
|
+
|
|
76
|
+
const task = createTask({
|
|
77
|
+
principal: env.config.principal_id,
|
|
78
|
+
agent: 'agent:assistant',
|
|
79
|
+
request: 'Inspect only acme/private',
|
|
80
|
+
permissions: {
|
|
81
|
+
github: {
|
|
82
|
+
allow: ['repo.read'],
|
|
83
|
+
constraints: {}
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
authority: {
|
|
87
|
+
repository: { kind: 'github.repository', value: 'acme/private' }
|
|
88
|
+
},
|
|
89
|
+
bindings: [
|
|
90
|
+
{ service: 'github', action: 'repo.read', field: 'repository', authority: 'repository' }
|
|
91
|
+
],
|
|
92
|
+
runtime: env.runtime
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
const result = await task.execute({
|
|
96
|
+
service: 'github',
|
|
97
|
+
action: 'repo.read',
|
|
98
|
+
context: { repository: 'acme/private' }
|
|
99
|
+
});
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Use `task.run(request, callback)` when your application owns the provider SDK call. Use `task.execute(request)` when Agent Authority's connected provider runtime should own credential resolution and provider execution.
|
|
103
|
+
|
|
104
|
+
## Standing permission vs task authority
|
|
105
|
+
|
|
106
|
+
The example deliberately leaves Mission-level `github:repo.read` broad while binding the Task Lease to one repository:
|
|
107
|
+
|
|
108
|
+
```text
|
|
109
|
+
connected GitHub account can read repositories
|
|
110
|
+
|
|
|
111
|
+
v
|
|
112
|
+
Mission permits github:repo.read
|
|
113
|
+
|
|
|
114
|
+
v
|
|
115
|
+
Task authority = acme/private
|
|
116
|
+
|
|
|
117
|
+
+--> acme/private -> ALLOW -> provider executes
|
|
118
|
+
|
|
|
119
|
+
+--> acme/other -> STEP-UP -> provider does not execute
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
That is the product value: provider/IAM permission can remain broader than the exact task without becoming ambient agent authority.
|
|
123
|
+
|
|
124
|
+
## Multiple GitHub accounts
|
|
125
|
+
|
|
126
|
+
If there is exactly one active GitHub connection for the principal, requests that omit `account_id` resolve that sole connection. If multiple active GitHub accounts exist, Agent Authority does not guess: set `request.account_id` explicitly. Ambiguity fails closed.
|
|
127
|
+
|
|
128
|
+
## Automated proof
|
|
129
|
+
|
|
130
|
+
`.github/workflows/verify-connected-github.yml` installs the packed package into a blank Node 20 project, initializes a fresh Agent Authority home, connects the workflow's GitHub installation token through stdin, and runs the connected task against the live GitHub API.
|
|
131
|
+
|
|
132
|
+
The gate also checks that:
|
|
133
|
+
|
|
134
|
+
- the public connection listing does not contain `credential_ref` or the token;
|
|
135
|
+
- the raw token does not appear in plaintext under `AGENT_AUTHORITY_HOME`;
|
|
136
|
+
- an encrypted vault file is created;
|
|
137
|
+
- the unrelated repository is stopped by the Task Lease before connected provider execution;
|
|
138
|
+
- ordinary test/coverage/CodeQL/live-provider gates remain separate and must still pass.
|
|
139
|
+
|
|
140
|
+
The automated workflow uses the repository's GitHub Actions installation token on the current repository. That proves the authenticated brokered execution path; it does **not** claim public CI access to an unrelated private repository. A user-supplied fine-grained PAT or GitHub App token can use the same path for repositories that credential is permitted to access.
|
package/docs/npm-release.md
CHANGED
|
@@ -4,7 +4,7 @@ The public package name is `@nullsquare/agent-authority`.
|
|
|
4
4
|
|
|
5
5
|
Before any publication:
|
|
6
6
|
|
|
7
|
-
1. the release commit must pass CI, CodeQL, live GitHub validation, current AI SDK integration validation, and packed-consumer validation;
|
|
7
|
+
1. the release commit must pass CI, CodeQL, live GitHub validation, current AI SDK integration validation, task-first utility/demo gates, and packed-consumer validation;
|
|
8
8
|
2. `npm pack` must contain the documented public exports;
|
|
9
9
|
3. a fresh Node.js 20 consumer must install the tarball and run the current public behavior smoke test;
|
|
10
10
|
4. the optional AI SDK integration must import without making `ai` a production dependency;
|
|
@@ -13,30 +13,46 @@ Before any publication:
|
|
|
13
13
|
After publication, verify from a fresh project with:
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
npm install @nullsquare/agent-authority@0.4.
|
|
16
|
+
npm install @nullsquare/agent-authority@0.4.6
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
Then run the same consumer smoke flow through the registry-installed package. Registry verification is part of the release gate; a successful `npm publish` command alone is not sufficient.
|
|
20
20
|
|
|
21
|
-
The repository includes `.github/workflows/verify-npm-registry.yml`, which verifies registry visibility, a clean Node.js 20 install, and
|
|
21
|
+
The repository includes `.github/workflows/verify-npm-registry.yml`, which verifies registry visibility, a clean Node.js 20 install, and current public behavior from the registry artifact.
|
|
22
22
|
|
|
23
|
+
For v0.4.6 the consumer exercises:
|
|
24
|
+
|
|
25
|
+
- `createTask()` from `@nullsquare/agent-authority/task`;
|
|
26
|
+
- explicit task permissions and named authority roots;
|
|
27
|
+
- task-first allow / `authority_delta_required` behavior;
|
|
28
|
+
- `task.explain()` for established-vs-requested authority deltas;
|
|
29
|
+
- durable local-state opt-in through `JsonFileTaskLeaseStore` without changing normal task calls;
|
|
23
30
|
- execution evidence and the reviewed Google/GitHub authority extractors;
|
|
24
31
|
- `ExecutingAuthorityRuntime.executeTaskLease()` and `MissionMcpGateway` transport surfaces;
|
|
25
|
-
- `JsonFileTaskLeaseStore`
|
|
26
|
-
- `DurableTaskLeaseSession` and `createDurableTaskLeaseSession()` from `@nullsquare/agent-authority/durable-task-lease`;
|
|
27
|
-
- durable allow / `authority_delta_required` / completion behavior;
|
|
32
|
+
- `JsonFileTaskLeaseStore`, `DurableTaskLeaseSession`, and the lower-level Task Lease APIs;
|
|
28
33
|
- the requirement that the optional `ai` package is not installed as a production dependency.
|
|
29
34
|
|
|
30
|
-
This makes the registry artifact verification cover the
|
|
35
|
+
This makes the registry artifact verification cover the product-facing task-first API and the lower-level durability/evidence/transport surfaces it composes, rather than checking export names alone.
|
|
36
|
+
|
|
37
|
+
The v0.4.6 independent registry verification passed after publication: npm visibility succeeded and the fresh Node.js 20 registry-installed consumer executed the current task-first + durable behavior smoke successfully.
|
|
38
|
+
|
|
39
|
+
The deterministic task utility fixture is also part of the source-release gate. It currently requires:
|
|
40
|
+
|
|
41
|
+
```text
|
|
42
|
+
normal task completion rate = 100%
|
|
43
|
+
false approval rate = 0%
|
|
44
|
+
true authority-delta step-up rate = 100%
|
|
45
|
+
unauthorized effect rate = 0%
|
|
46
|
+
```
|
|
31
47
|
|
|
32
|
-
|
|
48
|
+
This fixture is a regression gate, not a real-world performance benchmark.
|
|
33
49
|
|
|
34
50
|
## npm vs GitHub release surfaces
|
|
35
51
|
|
|
36
52
|
Publishing to the public npm registry does not automatically create either a GitHub Release or a GitHub Packages entry.
|
|
37
53
|
|
|
38
54
|
- **npm registry** — `npm publish --access public` publishes `@nullsquare/agent-authority` to `registry.npmjs.org` / npmjs.com. This is the package users install with `npm install`.
|
|
39
|
-
- **GitHub Releases** — a separate GitHub object, normally backed by a Git tag such as `v0.4.
|
|
55
|
+
- **GitHub Releases** — a separate GitHub object, normally backed by a Git tag such as `v0.4.6`. A release must be created explicitly or by release automation.
|
|
40
56
|
- **GitHub Packages** — a separate package registry. It only appears when the package is published to GitHub's npm registry (`npm.pkg.github.com`); publishing to npmjs.com does not populate it.
|
|
41
57
|
|
|
42
58
|
Agent Authority currently uses npmjs.com as its public package registry. Therefore an empty GitHub **Packages** section is expected unless the project intentionally adopts dual publication. A GitHub **Release** is still useful for source-release discoverability and should track published versions, but it is independent from npm publication.
|
package/docs/product-proof.md
CHANGED
|
@@ -71,13 +71,137 @@ Do not prioritize another deep authorization subsystem until the following are d
|
|
|
71
71
|
|
|
72
72
|
- [ ] a new developer can run a meaningful task-first example in under 10 minutes;
|
|
73
73
|
- [ ] at least three real workflow examples exist: coding, support/communications, and operations/finance;
|
|
74
|
-
- [
|
|
75
|
-
- [
|
|
76
|
-
- [
|
|
77
|
-
- [
|
|
78
|
-
- [
|
|
74
|
+
- [x] the same task-first API works in-memory and with durable local state;
|
|
75
|
+
- [x] useful-task completion stays high under the deterministic product benchmark;
|
|
76
|
+
- [x] normal fixture task actions do not trigger unnecessary approvals;
|
|
77
|
+
- [x] unrelated-resource effects execute zero provider callbacks in the deterministic fixture, live GitHub proof, support/communications proof, and operations/finance proof;
|
|
78
|
+
- [x] approval/step-up output explains the established authority and requested delta clearly;
|
|
79
79
|
- [ ] at least one external developer uses the package without project-author assistance.
|
|
80
80
|
|
|
81
|
+
The checked utility items are evidence about the current deterministic fixtures and live GitHub proof, not a claim that arbitrary real-world agent workloads have already met the same rates.
|
|
82
|
+
|
|
83
|
+
## First live provider product proof
|
|
84
|
+
|
|
85
|
+
The existing GitHub Actions mutation validation now runs through the public task-first API rather than hand-assembling Mission + Task Lease + Guard.
|
|
86
|
+
|
|
87
|
+
The live workflow uses:
|
|
88
|
+
|
|
89
|
+
```text
|
|
90
|
+
createTask()
|
|
91
|
+
|
|
|
92
|
+
v
|
|
93
|
+
task.run(issue.list)
|
|
94
|
+
|
|
|
95
|
+
v
|
|
96
|
+
task.authorityFrom(reviewed GitHub output)
|
|
97
|
+
|
|
|
98
|
+
v
|
|
99
|
+
issue #9 becomes downstream task authority
|
|
100
|
+
|
|
|
101
|
+
+--> task.run(issue.comment #9) -> real GitHub mutation
|
|
102
|
+
+--> task.run(issue.comment #1) -> STEP-UP, zero provider mutation
|
|
103
|
+
|
|
|
104
|
+
v
|
|
105
|
+
task.complete()
|
|
106
|
+
|
|
|
107
|
+
v
|
|
108
|
+
issue.comment #9 -> DENY, zero provider mutation
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Passing CI evidence from the live run:
|
|
112
|
+
|
|
113
|
+
- repository root: `Null-Square/agent-authority`;
|
|
114
|
+
- reviewed fixture selection: issue `#9`;
|
|
115
|
+
- `task.authorityFrom()` established issue `#9` as downstream authority;
|
|
116
|
+
- exactly one real GitHub comment mutation executed;
|
|
117
|
+
- unrelated issue `#1` produced `authority_delta_required` before provider mutation;
|
|
118
|
+
- `task.explain()` reported established authority `9` vs requested value `1`;
|
|
119
|
+
- the same issue was denied after `task.complete()`;
|
|
120
|
+
- provider calls before cleanup: `reads=1`, `task_mutations=1`;
|
|
121
|
+
- the temporary validation comment was deleted outside the authority proof.
|
|
122
|
+
|
|
123
|
+
This establishes a real-provider product proof for the facade, but it is **not yet** the full coding-agent product workflow. Branch creation, file edits and PR creation still need to be chained under task-derived authority while merge/deploy remain outside the task.
|
|
124
|
+
|
|
125
|
+
## Cross-provider support/communications proof
|
|
126
|
+
|
|
127
|
+
`examples/task-first-support.js` exercises the same public facade across two service boundaries using the exact field names and normalized sender shape used by the Google adapter:
|
|
128
|
+
|
|
129
|
+
```text
|
|
130
|
+
Task: handle one customer email and schedule the requested meeting
|
|
131
|
+
|
|
132
|
+
origin thread authority
|
|
133
|
+
|
|
|
134
|
+
v
|
|
135
|
+
task.run(gmail:thread.read)
|
|
136
|
+
|
|
|
137
|
+
v
|
|
138
|
+
reviewed Gmail sender extractor
|
|
139
|
+
|
|
|
140
|
+
v
|
|
141
|
+
customer@example.com
|
|
142
|
+
|
|
|
143
|
+
v
|
|
144
|
+
task.bind(calendar:event.create.attendee_email)
|
|
145
|
+
|
|
|
146
|
+
+--> exact customer meeting -> ALLOW
|
|
147
|
+
+--> unrelated attendee -> STEP-UP, zero Calendar callbacks
|
|
148
|
+
|
|
|
149
|
+
v
|
|
150
|
+
task.complete() -> same meeting authority no longer usable
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
The task also binds the Gmail `thread_id` and Calendar `calendar_id` to explicit task-entry roots. A different Gmail thread is stopped before its callback runs.
|
|
154
|
+
|
|
155
|
+
The example and `test/task-product-support.test.js` run on Node 20 and Node 22 CI. The support proof demonstrates that the task-first model crosses Gmail -> Calendar without a second authorization abstraction.
|
|
156
|
+
|
|
157
|
+
This is intentionally a **self-contained product proof**. It mirrors the real Google provider contract but does not close the separate public Google Actions evidence gate; that gate still requires repository OAuth secrets.
|
|
158
|
+
|
|
159
|
+
## Operations / finance lineage proof
|
|
160
|
+
|
|
161
|
+
`examples/task-first-finance.js` exercises a longer evidence-derived authority chain without adding another provider, policy DSL, or numeric relation language:
|
|
162
|
+
|
|
163
|
+
```text
|
|
164
|
+
Task: resolve one support ticket by refunding only its payment
|
|
165
|
+
|
|
166
|
+
ticket:481
|
|
167
|
+
|
|
|
168
|
+
v
|
|
169
|
+
task.run(helpdesk:ticket.read)
|
|
170
|
+
|
|
|
171
|
+
v
|
|
172
|
+
order:991
|
|
173
|
+
|
|
|
174
|
+
v
|
|
175
|
+
task.run(orders:order.read)
|
|
176
|
+
|
|
|
177
|
+
v
|
|
178
|
+
payment:abc123
|
|
179
|
+
|
|
|
180
|
+
v
|
|
181
|
+
task.run(payments:payment.read)
|
|
182
|
+
|
|
|
183
|
+
+--> amount = 12500 minor units
|
|
184
|
+
+--> currency = USD
|
|
185
|
+
|
|
|
186
|
+
v
|
|
187
|
+
task.bind(refund payment_id + amount + currency)
|
|
188
|
+
|
|
|
189
|
+
+--> exact full refund -> ALLOW
|
|
190
|
+
+--> another payment -> STEP-UP, zero refund callbacks
|
|
191
|
+
+--> over-refund -> STEP-UP, zero refund callbacks
|
|
192
|
+
+--> wrong currency -> STEP-UP, zero refund callbacks
|
|
193
|
+
+--> partial refund -> STEP-UP under current exact binding model
|
|
194
|
+
|
|
|
195
|
+
v
|
|
196
|
+
task.complete() -> same refund authority no longer usable
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
The task cannot read an arbitrary order before the ticket establishes the order fact: the unresolved binding fails closed before the order callback runs. The same pattern continues through payment and refund.
|
|
200
|
+
|
|
201
|
+
The example and `test/task-product-finance.test.js` run on Node 20 and Node 22 CI. On the passing fixture, provider-shaped callbacks are exactly one ticket read, one order read, one payment read and one refund.
|
|
202
|
+
|
|
203
|
+
This proof intentionally exposes a **product limitation rather than hiding it behind new policy machinery**: Task Lease bindings currently require exact equality. Therefore the payment amount `12500` can authorize an exact `12500` refund, but a legitimate partial refund such as `5000` also produces `authority_delta_required`. A future narrow `requested amount <= evidence-derived payment amount` relation may be justified if real provider/adoption evidence shows partial refunds are needed. Until then, the repository should keep this limitation visible instead of adding a general expression language speculatively.
|
|
204
|
+
|
|
81
205
|
## Utility metrics
|
|
82
206
|
|
|
83
207
|
Security tests remain required, but product work should additionally track:
|
|
@@ -102,7 +226,7 @@ true authority-delta step-up rate = 100%
|
|
|
102
226
|
unauthorized effect rate = 0%
|
|
103
227
|
```
|
|
104
228
|
|
|
105
|
-
Real provider/harness benchmarks should replace or supplement
|
|
229
|
+
The current fixture run contains 40 normal tasks and 10 unrelated-resource attempts. Real provider/harness benchmarks should replace or supplement it as the product matures.
|
|
106
230
|
|
|
107
231
|
## Three product proofs
|
|
108
232
|
|
|
@@ -120,6 +244,8 @@ repository -> issue -> task branch -> changed files -> pull request
|
|
|
120
244
|
|
|
121
245
|
Unrelated repositories, issues, merge and deploy remain outside the task.
|
|
122
246
|
|
|
247
|
+
The live issue-discovery -> exact-issue-comment proof is the first slice of this direction; it does not complete the branch/files/PR lineage yet.
|
|
248
|
+
|
|
123
249
|
### Support / communications agent
|
|
124
250
|
|
|
125
251
|
Task:
|
|
@@ -132,7 +258,7 @@ Desired authority lineage:
|
|
|
132
258
|
email thread -> customer -> meeting / CRM record / reply target
|
|
133
259
|
```
|
|
134
260
|
|
|
135
|
-
The
|
|
261
|
+
The self-contained Gmail-thread -> exact Calendar-attendee slice is now established. The next value proof should connect the same customer authority to another useful downstream action (for example reply/CRM) or rerun the task-first flow with the real Google Actions fixture once repository OAuth secrets are available.
|
|
136
262
|
|
|
137
263
|
### Operations / finance agent
|
|
138
264
|
|
|
@@ -146,7 +272,7 @@ Desired authority lineage:
|
|
|
146
272
|
ticket -> customer -> order -> payment -> refund <= original payment
|
|
147
273
|
```
|
|
148
274
|
|
|
149
|
-
|
|
275
|
+
The self-contained ticket -> order -> payment -> **exact full refund** lineage is now established. The remaining product question is narrower than the original workflow: whether partial refunds are important enough to justify one evidence-derived numeric ceiling relation. Current exact bindings intentionally step up for a smaller amount rather than guessing that relation into the core.
|
|
150
276
|
|
|
151
277
|
## Freeze list
|
|
152
278
|
|