@ory/argus 0.13.2 → 0.13.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.
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "repo": "ory-agent-plugins",
3
- "commit": "4961e2084b50f7c37a1c44c93735998394afe12d",
4
- "commitShort": "4961e20",
3
+ "commit": "c04784bfd67acdce0133aca0ebcd335e326b9251",
4
+ "commitShort": "c04784b",
5
5
  "branch": "main",
6
- "commitDate": "2026-07-14T13:13:40-07:00",
6
+ "commitDate": "2026-07-14T15:46:39-07:00",
7
7
  "dirty": false,
8
- "builtAt": "2026-07-14T20:17:46.098Z"
8
+ "builtAt": "2026-07-14T22:51:01.241Z"
9
9
  }
@@ -1091,13 +1091,39 @@ async function createProjectInteractive(runner, prompt, workspace, harness) {
1091
1091
  }
1092
1092
  /** JSON-Patch path (relative to the oauth2 service config) that toggles DCR. */
1093
1093
  const DCR_ENABLED_PATH = "/oidc/dynamic_client_registration/enabled";
1094
+ /**
1095
+ * Read the project's current DCR state via `ory get oauth2-config`.
1096
+ * Returns `true`/`false` when the value is known, or `null` when it can't be
1097
+ * determined (CLI error, unparseable output) so the caller falls open and
1098
+ * prompts anyway rather than assuming a state.
1099
+ */
1100
+ function dcrEnabled(runner, projectId) {
1101
+ const r = runner.exec([
1102
+ "get",
1103
+ "oauth2-config",
1104
+ "--project",
1105
+ projectId,
1106
+ "--format",
1107
+ "json",
1108
+ ]);
1109
+ if (r.status !== 0)
1110
+ return null;
1111
+ const config = parseObject(r.stdout);
1112
+ if (!config)
1113
+ return null;
1114
+ const enabled = config.oidc?.dynamic_client_registration?.enabled;
1115
+ return typeof enabled === "boolean" ? enabled : null;
1116
+ }
1094
1117
  /**
1095
1118
  * Enable OAuth2 Dynamic Client Registration on the project so the agent
1096
- * identity can self-register (RFC 7591) at runtime. Prompts first (default
1097
- * yes) since it changes project-wide config; best-effort and fail-open a
1098
- * decline or failure just prints the manual command and continues.
1119
+ * identity can self-register (RFC 7591) at runtime. First probes the project's
1120
+ * current DCR state and skips silently when it's already enabled. Otherwise
1121
+ * prompts (default yes) since it changes project-wide config; best-effort and
1122
+ * fail-open — a decline or failure just prints the manual command and continues.
1099
1123
  */
1100
1124
  async function maybeEnableDcr(runner, prompt, projectId) {
1125
+ if (dcrEnabled(runner, projectId) === true)
1126
+ return;
1101
1127
  ui.heading("Dynamic Client Registration");
1102
1128
  ui.info("The agent identity registers itself via OAuth2 Dynamic Client Registration");
1103
1129
  ui.hint("(DCR), which Ory Network projects disable by default.");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ory/argus",
3
- "version": "0.13.2",
3
+ "version": "0.13.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",