openclaw-zero-agency 0.2.5 → 1.0.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/dist/index.js +10 -3
- package/dist/tools.js +7 -2
- package/openclaw.plugin.json +45 -8
- package/package.json +2 -2
- package/LICENSE +0 -21
- package/README.md +0 -38
package/dist/index.js
CHANGED
|
@@ -120,7 +120,7 @@ export default definePluginEntry({
|
|
|
120
120
|
const ttl = cfg.receiptTtlMs ?? 900000;
|
|
121
121
|
api.registerTool({
|
|
122
122
|
name: "zero_agency_route",
|
|
123
|
-
description: "Find the capability pack governing a domain task. Call before acting on security review, release verification or incident triage.
|
|
123
|
+
description: "Find the capability pack governing a domain task. Call before acting on security review, release verification or incident triage. Returns the governing pack and logs the routing decision.",
|
|
124
124
|
parameters: Type.Object({
|
|
125
125
|
task: Type.String({ description: "The task or question, in natural language." }),
|
|
126
126
|
limit: Type.Optional(Type.Integer({ minimum: 1, maximum: 5 })),
|
|
@@ -138,11 +138,18 @@ export default definePluginEntry({
|
|
|
138
138
|
const reg = await loadRegistry(registryPath);
|
|
139
139
|
candidates = (reg.capabilities ?? [])
|
|
140
140
|
.map((c) => ({ c, ...score(c, q) }))
|
|
141
|
-
.filter((x) => x.score > 0)
|
|
141
|
+
.filter((x) => x.score > 0 && (x.c.status ?? 'draft') === 'live')
|
|
142
142
|
.sort((a, b) => b.score - a.score)
|
|
143
143
|
.slice(0, params.limit ?? 3)
|
|
144
144
|
.map((x) => ({ id: x.c.id, pack: x.c.pack, score: Number(x.score.toFixed(2)), triggers: x.hits }));
|
|
145
|
-
|
|
145
|
+
const drafts = (reg.capabilities ?? [])
|
|
146
|
+
.filter((c) => (c.status ?? 'draft') !== 'live')
|
|
147
|
+
.filter((c) => score(c, q).score > 0);
|
|
148
|
+
note = candidates.length
|
|
149
|
+
? `load ${candidates[0].pack} before acting`
|
|
150
|
+
: drafts.length
|
|
151
|
+
? `no live capability matched; ${drafts.length} draft pack(s) matched but are unpublished: ${drafts.map((c) => c.id).join(", ")}`
|
|
152
|
+
: "no capability matched; if this action is consequential, stop and ask";
|
|
146
153
|
}
|
|
147
154
|
catch (e) {
|
|
148
155
|
note = `registry unavailable: ${e?.message ?? "unknown"}`;
|
package/dist/tools.js
CHANGED
|
@@ -87,13 +87,18 @@ export default defineToolPlugin({
|
|
|
87
87
|
const reg = await loadRegistry(config.registryPath);
|
|
88
88
|
candidates = (reg.capabilities ?? [])
|
|
89
89
|
.map((c) => ({ c, ...score(c, q) }))
|
|
90
|
-
.filter((x) => x.score > 0)
|
|
90
|
+
.filter((x) => x.score > 0 && (x.c.status ?? 'draft') === 'live')
|
|
91
91
|
.sort((a, b) => b.score - a.score)
|
|
92
92
|
.slice(0, limit)
|
|
93
93
|
.map((x) => ({ id: x.c.id, pack: x.c.pack, score: Number(x.score.toFixed(2)), triggers: x.hits }));
|
|
94
|
+
const drafts = (reg.capabilities ?? [])
|
|
95
|
+
.filter((c) => (c.status ?? 'draft') !== 'live')
|
|
96
|
+
.filter((c) => score(c, q).score > 0);
|
|
94
97
|
note = candidates.length
|
|
95
98
|
? `load ${candidates[0].pack} before acting`
|
|
96
|
-
:
|
|
99
|
+
: drafts.length
|
|
100
|
+
? `no live capability matched; ${drafts.length} draft pack(s) matched but are unpublished: ${drafts.map((c) => c.id).join(", ")}`
|
|
101
|
+
: "no capability matched; if this action is consequential, stop and ask";
|
|
97
102
|
}
|
|
98
103
|
catch (e) {
|
|
99
104
|
note = `registry unavailable: ${e?.message ?? "unknown"}`;
|
package/openclaw.plugin.json
CHANGED
|
@@ -2,18 +2,55 @@
|
|
|
2
2
|
"id": "zero-agency",
|
|
3
3
|
"name": "Zero Agency",
|
|
4
4
|
"description": "Capability routing with a receipt gate. Packs inform judgement; they never confer authority.",
|
|
5
|
-
"activation": {
|
|
6
|
-
|
|
5
|
+
"activation": {
|
|
6
|
+
"onStartup": true
|
|
7
|
+
},
|
|
8
|
+
"contracts": {
|
|
9
|
+
"tools": [
|
|
10
|
+
"zero_agency_route",
|
|
11
|
+
"zero_agency_status"
|
|
12
|
+
]
|
|
13
|
+
},
|
|
7
14
|
"configSchema": {
|
|
8
15
|
"type": "object",
|
|
9
16
|
"additionalProperties": false,
|
|
10
|
-
"required": [
|
|
17
|
+
"required": [
|
|
18
|
+
"registryPath"
|
|
19
|
+
],
|
|
11
20
|
"properties": {
|
|
12
|
-
"registryPath": {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"
|
|
21
|
+
"registryPath": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"description": "Absolute path to capabilities.json (read-only)."
|
|
24
|
+
},
|
|
25
|
+
"telemetryPath": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"description": "JSONL telemetry path."
|
|
28
|
+
},
|
|
29
|
+
"receiptTtlMs": {
|
|
30
|
+
"type": "integer",
|
|
31
|
+
"minimum": 1000,
|
|
32
|
+
"default": 900000
|
|
33
|
+
},
|
|
34
|
+
"gateMode": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"enum": [
|
|
37
|
+
"off",
|
|
38
|
+
"advisory",
|
|
39
|
+
"enforce"
|
|
40
|
+
],
|
|
41
|
+
"default": "off",
|
|
42
|
+
"description": "Receipt gate mode. EXPERIMENTAL: cross-context receipt correlation does not work in the current plugin host, so keep this off."
|
|
43
|
+
},
|
|
44
|
+
"consequentialTools": {
|
|
45
|
+
"type": "array",
|
|
46
|
+
"items": {
|
|
47
|
+
"type": "string"
|
|
48
|
+
},
|
|
49
|
+
"default": [
|
|
50
|
+
"exec",
|
|
51
|
+
"apply_patch"
|
|
52
|
+
]
|
|
53
|
+
}
|
|
17
54
|
}
|
|
18
55
|
}
|
|
19
56
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openclaw-zero-agency",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "Capability routing for OpenClaw agents: distilled packs, a compiled registry, and routing telemetry. Packs inform judgement; they never confer authority.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"license": "MIT",
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Apurva Sukant
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
package/README.md
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
# openclaw-zero-agency
|
|
2
|
-
|
|
3
|
-
Capability routing and a receipt gate for OpenClaw fleets.
|
|
4
|
-
|
|
5
|
-
**Packs inform judgement; they never confer authority.**
|
|
6
|
-
|
|
7
|
-
- `zero_agency_route` — match a task to a capability pack, issue a receipt
|
|
8
|
-
- `zero_agency_status` — registry version, capability count, gate mode
|
|
9
|
-
- `before_tool_call` gate — consequential tools require a receipt
|
|
10
|
-
|
|
11
|
-
## Install
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
openclaw plugins install openclaw-zero-agency
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
## Configure
|
|
18
|
-
|
|
19
|
-
```json
|
|
20
|
-
{
|
|
21
|
-
"plugins": {
|
|
22
|
-
"entries": {
|
|
23
|
-
"zero-agency": {
|
|
24
|
-
"config": {
|
|
25
|
-
"registryPath": "/opt/zero-agency/registry/capabilities.json",
|
|
26
|
-
"telemetryPath": "/var/log/zero-agency/events.jsonl",
|
|
27
|
-
"gateMode": "advisory",
|
|
28
|
-
"consequentialTools": ["exec", "apply_patch"]
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
`gateMode`: `off` | `advisory` (log only) | `enforce` (require approval, fail-closed).
|
|
37
|
-
|
|
38
|
-
Requires `openclaw >= 2026.10.1`.
|