@ory/argus 1.0.1 → 1.2.0
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/assets/skills/ory-build-agent/SKILL.md +5 -4
- package/assets/skills/ory-temporal-worker/SKILL.md +9 -9
- package/assets/skills/permissions-onboarding/SKILL.md +66 -142
- package/dist/adapters.js +1 -1
- package/dist/auth.d.ts +4 -0
- package/dist/auth.js +4 -0
- package/dist/bash-parser.js +13 -1
- package/dist/build-info.json +4 -4
- package/dist/cli.js +1 -1
- package/dist/contract-suite.js +5 -2
- package/dist/local/manager.js +1 -1
- package/dist/local/seed.d.ts +1 -1
- package/dist/local/seed.js +4 -62
- package/dist/opl.d.ts +11 -18
- package/dist/opl.js +23 -37
- package/dist/permissions-cli.d.ts +2 -2
- package/dist/permissions-cli.js +15 -32
- package/dist/permissions.d.ts +7 -10
- package/dist/permissions.js +16 -28
- package/dist/post-install.d.ts +1 -1
- package/dist/post-install.js +2 -2
- package/dist/setup.js +1 -1
- package/dist/status-cli.d.ts +1 -1
- package/dist/status-cli.js +12 -12
- package/dist/status-data.d.ts +8 -5
- package/dist/status-data.js +12 -11
- package/package.json +1 -1
package/dist/status-data.js
CHANGED
|
@@ -50,7 +50,6 @@ exports.collectStatusReport = collectStatusReport;
|
|
|
50
50
|
*/
|
|
51
51
|
const config_js_1 = require("./config.js");
|
|
52
52
|
const permission_mode_js_1 = require("./permission-mode.js");
|
|
53
|
-
const permissions_js_1 = require("./permissions.js");
|
|
54
53
|
const auth_store_js_1 = require("./auth-store.js");
|
|
55
54
|
const agent_auth_js_1 = require("./agent-auth.js");
|
|
56
55
|
const subject_js_1 = require("./subject.js");
|
|
@@ -69,14 +68,13 @@ function resolveNamespace() {
|
|
|
69
68
|
}
|
|
70
69
|
/**
|
|
71
70
|
* Probe the harness's built-in tool catalog against Ory, returning how many
|
|
72
|
-
* tools the resolved user subject is allowed /
|
|
71
|
+
* tools the resolved user subject is allowed / blocked / errored on, plus the
|
|
73
72
|
* live permission mode and the subject that was checked. Returns undefined when
|
|
74
73
|
* a probe can't run (no project URL, empty catalog, no user identity). Never
|
|
75
74
|
* throws.
|
|
76
75
|
*
|
|
77
|
-
* Checks
|
|
78
|
-
*
|
|
79
|
-
* block is reported as denied here too, exactly as a tool call would be.
|
|
76
|
+
* Checks use the same default-allow `use` permit as the runtime gate. A false
|
|
77
|
+
* result therefore means an explicit block, not missing grant coverage.
|
|
80
78
|
*/
|
|
81
79
|
async function probePermissionsCoverage(harness) {
|
|
82
80
|
const resolved = (0, config_js_1.resolveConfig)();
|
|
@@ -106,10 +104,11 @@ async function probePermissionsCoverage(harness) {
|
|
|
106
104
|
additionalSubjects: agentSubject ? [{ scope: "agent", subject: agentSubject }] : [],
|
|
107
105
|
});
|
|
108
106
|
const namespace = resolveNamespace();
|
|
109
|
-
const relation =
|
|
107
|
+
const relation = opl_js_1.PERMIT_USE;
|
|
110
108
|
const result = {
|
|
111
109
|
total: catalog.length,
|
|
112
110
|
allowed: 0,
|
|
111
|
+
blocked: 0,
|
|
113
112
|
denied: 0,
|
|
114
113
|
errored: 0,
|
|
115
114
|
mode: live.mode,
|
|
@@ -124,8 +123,10 @@ async function probePermissionsCoverage(harness) {
|
|
|
124
123
|
});
|
|
125
124
|
if (probe.allowed)
|
|
126
125
|
result.allowed++;
|
|
127
|
-
else
|
|
126
|
+
else {
|
|
127
|
+
result.blocked++;
|
|
128
128
|
result.denied++;
|
|
129
|
+
}
|
|
129
130
|
}
|
|
130
131
|
catch (err) {
|
|
131
132
|
const ory = err;
|
|
@@ -274,14 +275,14 @@ async function collectPermissions(harness) {
|
|
|
274
275
|
return { ...base, coverageStatus: "no_user" };
|
|
275
276
|
// The probe read the mode live; prefer it over the cached config value.
|
|
276
277
|
const withMode = { ...base, mode: coverage.mode, modeSource: coverage.modeSource };
|
|
277
|
-
if (coverage.errored > 0 && coverage.allowed === 0 && coverage.
|
|
278
|
+
if (coverage.errored > 0 && coverage.allowed === 0 && coverage.blocked === 0) {
|
|
278
279
|
return { ...withMode, coverageStatus: "probe_failed", coverage };
|
|
279
280
|
}
|
|
280
281
|
const status = coverage.allowed === coverage.total
|
|
281
|
-
? "
|
|
282
|
+
? "fully_allowed"
|
|
282
283
|
: coverage.allowed === 0
|
|
283
|
-
? "
|
|
284
|
-
: "
|
|
284
|
+
? "fully_blocked"
|
|
285
|
+
: "partially_blocked";
|
|
285
286
|
return { ...withMode, coverageStatus: status, coverage };
|
|
286
287
|
}
|
|
287
288
|
function isUserTokenUsable() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ory/argus",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Ory Argus: the core API for building authentication, authorization, and audit into AI agent harness plugins, extensions, and custom integrations",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://ory.com",
|