@ory/argus 1.5.2 → 1.5.3
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/agent-auth.d.ts +6 -2
- package/dist/agent-auth.js +17 -2
- package/dist/build-info.json +4 -4
- package/package.json +1 -1
package/dist/agent-auth.d.ts
CHANGED
|
@@ -401,6 +401,8 @@ export interface EnsureAgentIdentityOptions {
|
|
|
401
401
|
* What prompted this resolution, recorded on the `agent.auth` activity event. Absent for
|
|
402
402
|
* the session-start gate; `read_credential` when the tool gate resolved the
|
|
403
403
|
* identity because it needed a credential to authenticate a permission read.
|
|
404
|
+
* A triggered resolution that cleanly loads a stored credential records no
|
|
405
|
+
* activity; only its failures and warnings do.
|
|
404
406
|
*/
|
|
405
407
|
trigger?: string;
|
|
406
408
|
}
|
|
@@ -408,8 +410,10 @@ export interface EnsureAgentIdentityOptions {
|
|
|
408
410
|
* Resolve the agent's credentials and attach them to the client.
|
|
409
411
|
*
|
|
410
412
|
* Always returns the resolved credentials; never throws and never blocks.
|
|
411
|
-
* Emits
|
|
412
|
-
*
|
|
413
|
+
* Emits one `agent.auth` activity event so the audit trail records whether the
|
|
414
|
+
* agent identity was available for the session. A `trigger`ed (tool-path)
|
|
415
|
+
* resolution emits it only when the credential is missing or resolved with
|
|
416
|
+
* warnings; a clean reload of the stored credential is logged at debug level.
|
|
413
417
|
*/
|
|
414
418
|
export declare function ensureAgentIdentity(client: OryAgentClient, options?: EnsureAgentIdentityOptions): Promise<AgentCredentials>;
|
|
415
419
|
/**
|
package/dist/agent-auth.js
CHANGED
|
@@ -1288,8 +1288,10 @@ async function fetchClientCredentialsToken(args) {
|
|
|
1288
1288
|
* Resolve the agent's credentials and attach them to the client.
|
|
1289
1289
|
*
|
|
1290
1290
|
* Always returns the resolved credentials; never throws and never blocks.
|
|
1291
|
-
* Emits
|
|
1292
|
-
*
|
|
1291
|
+
* Emits one `agent.auth` activity event so the audit trail records whether the
|
|
1292
|
+
* agent identity was available for the session. A `trigger`ed (tool-path)
|
|
1293
|
+
* resolution emits it only when the credential is missing or resolved with
|
|
1294
|
+
* warnings; a clean reload of the stored credential is logged at debug level.
|
|
1293
1295
|
*/
|
|
1294
1296
|
async function ensureAgentIdentity(client, options = {}) {
|
|
1295
1297
|
const sessionId = options.sessionId ?? client.sessionId;
|
|
@@ -1425,6 +1427,19 @@ async function ensureAgentIdentity(client, options = {}) {
|
|
|
1425
1427
|
// resolver match" should not clear it. With nothing set, the read path falls
|
|
1426
1428
|
// back to the rehydrated user token (see `buildApis`).
|
|
1427
1429
|
const sessionKey = sessionId?.trim() || config_js_1.SESSIONLESS_KEY;
|
|
1430
|
+
// Subprocess harnesses start a fresh process for every hook, so a tool-path
|
|
1431
|
+
// resolution that merely reloads the stored credential would otherwise record
|
|
1432
|
+
// one `agent.auth` per tool call. Only the session-start gate, a failure, or a
|
|
1433
|
+
// partial resolution is an authentication outcome worth auditing.
|
|
1434
|
+
if (options.trigger && creds.kind !== "none" && !creds.warnings?.length) {
|
|
1435
|
+
client.logger.debug("agent.auth.loaded", {
|
|
1436
|
+
kind: creds.kind,
|
|
1437
|
+
sessionKey,
|
|
1438
|
+
trigger: options.trigger,
|
|
1439
|
+
...(creds.subject ? { subject: creds.subject } : {}),
|
|
1440
|
+
});
|
|
1441
|
+
return creds;
|
|
1442
|
+
}
|
|
1428
1443
|
client.logger.activity("agent.auth", creds.kind === "none" ? "skipped" : "ok", {
|
|
1429
1444
|
attributes: {
|
|
1430
1445
|
kind: creds.kind,
|
package/dist/build-info.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"repo": "ory-agent-plugins",
|
|
3
|
-
"commit": "
|
|
4
|
-
"commitShort": "
|
|
3
|
+
"commit": "6d5a4dd670531925d1a0807d25406ccc4db24bf5",
|
|
4
|
+
"commitShort": "6d5a4dd6",
|
|
5
5
|
"branch": "main",
|
|
6
|
-
"commitDate": "2026-10-
|
|
6
|
+
"commitDate": "2026-10-22T14:21:25-07:00",
|
|
7
7
|
"dirty": false,
|
|
8
|
-
"builtAt": "2026-10-
|
|
8
|
+
"builtAt": "2026-10-22T21:25:21.096Z"
|
|
9
9
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ory/argus",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.3",
|
|
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",
|