@ory/argus 0.14.0 → 1.0.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.
Files changed (150) hide show
  1. package/README.md +31 -46
  2. package/assets/commands/temporal-up.md +1 -1
  3. package/assets/skills/auth-setup/SKILL.md +1 -1
  4. package/assets/skills/local-dev/SKILL.md +17 -7
  5. package/assets/skills/ory-build-agent/SKILL.md +39 -91
  6. package/assets/skills/ory-e2b-sandbox/SKILL.md +18 -17
  7. package/assets/skills/ory-temporal-worker/SKILL.md +31 -33
  8. package/assets/skills/permissions-onboarding/SKILL.md +131 -104
  9. package/dist/adapters.d.ts +88 -32
  10. package/dist/adapters.js +443 -164
  11. package/dist/agent-auth.d.ts +226 -67
  12. package/dist/agent-auth.js +951 -205
  13. package/dist/auth-store.d.ts +37 -2
  14. package/dist/auth-store.js +37 -3
  15. package/dist/auth.d.ts +33 -4
  16. package/dist/auth.js +163 -20
  17. package/dist/bash-parser.d.ts +98 -0
  18. package/dist/bash-parser.js +396 -0
  19. package/dist/branding.d.ts +77 -16
  20. package/dist/branding.js +93 -23
  21. package/dist/build-info.json +4 -4
  22. package/dist/cli-invocation.d.ts +1 -1
  23. package/dist/cli-invocation.js +2 -1
  24. package/dist/cli.d.ts +20 -29
  25. package/dist/cli.js +271 -239
  26. package/dist/client.d.ts +175 -138
  27. package/dist/client.js +672 -391
  28. package/dist/config.d.ts +217 -54
  29. package/dist/config.js +461 -42
  30. package/dist/context.d.ts +10 -0
  31. package/dist/context.js +21 -0
  32. package/dist/contract-suite.d.ts +3 -5
  33. package/dist/contract-suite.js +75 -47
  34. package/dist/denial.d.ts +36 -3
  35. package/dist/denial.js +79 -10
  36. package/dist/event-reporter.d.ts +77 -0
  37. package/dist/event-reporter.js +776 -0
  38. package/dist/external-registrations-main.d.ts +10 -0
  39. package/dist/external-registrations-main.js +38 -0
  40. package/dist/external-registrations.d.ts +79 -0
  41. package/dist/external-registrations.js +188 -0
  42. package/dist/help-cli.d.ts +39 -0
  43. package/dist/help-cli.js +55 -0
  44. package/dist/hook-timeout.d.ts +64 -0
  45. package/dist/hook-timeout.js +88 -0
  46. package/dist/index.d.ts +28 -23
  47. package/dist/index.js +173 -58
  48. package/dist/lifecycle.d.ts +3 -3
  49. package/dist/lifecycle.js +38 -6
  50. package/dist/local/cli.js +11 -6
  51. package/dist/local/configs.d.ts +74 -18
  52. package/dist/local/configs.js +291 -84
  53. package/dist/local/health.js +7 -7
  54. package/dist/local/index.d.ts +2 -2
  55. package/dist/local/index.js +24 -10
  56. package/dist/local/manager.d.ts +20 -1
  57. package/dist/local/manager.js +159 -36
  58. package/dist/local/ports.d.ts +158 -0
  59. package/dist/local/ports.js +443 -0
  60. package/dist/local/seed.d.ts +13 -5
  61. package/dist/local/seed.js +62 -38
  62. package/dist/logger.d.ts +54 -25
  63. package/dist/logger.js +329 -63
  64. package/dist/mcp.d.ts +2 -2
  65. package/dist/mcp.js +10 -5
  66. package/dist/mirror-bootstrap.d.ts +48 -0
  67. package/dist/mirror-bootstrap.js +254 -0
  68. package/dist/opl.d.ts +289 -0
  69. package/dist/opl.js +446 -0
  70. package/dist/permission-mode.d.ts +87 -0
  71. package/dist/permission-mode.js +307 -0
  72. package/dist/permissions-cli.d.ts +13 -49
  73. package/dist/permissions-cli.js +154 -348
  74. package/dist/permissions.d.ts +148 -38
  75. package/dist/permissions.js +591 -45
  76. package/dist/post-install.d.ts +33 -0
  77. package/dist/post-install.js +127 -0
  78. package/dist/read-credential.d.ts +65 -0
  79. package/dist/read-credential.js +86 -0
  80. package/dist/registry/cli.js +5 -2
  81. package/dist/registry/config.d.ts +0 -17
  82. package/dist/registry/config.js +0 -23
  83. package/dist/registry/index.d.ts +1 -1
  84. package/dist/registry/index.js +2 -2
  85. package/dist/registry/manager.d.ts +4 -21
  86. package/dist/registry/manager.js +21 -37
  87. package/dist/runtime-credential.d.ts +140 -0
  88. package/dist/runtime-credential.js +572 -0
  89. package/dist/runtime.d.ts +408 -0
  90. package/dist/runtime.js +748 -0
  91. package/dist/setup.d.ts +23 -47
  92. package/dist/setup.js +59 -116
  93. package/dist/skills.js +0 -7
  94. package/dist/status-cli.d.ts +27 -11
  95. package/dist/status-cli.js +121 -115
  96. package/dist/status-data.d.ts +116 -17
  97. package/dist/status-data.js +121 -38
  98. package/dist/subject.d.ts +126 -20
  99. package/dist/subject.js +215 -30
  100. package/dist/testing.d.ts +74 -38
  101. package/dist/testing.js +185 -68
  102. package/dist/tool-catalog.d.ts +53 -11
  103. package/dist/tool-catalog.js +164 -13
  104. package/dist/tool-metadata.d.ts +7 -6
  105. package/dist/tool-metadata.js +6 -5
  106. package/dist/types.d.ts +11 -1
  107. package/dist/uninstall.d.ts +71 -34
  108. package/dist/uninstall.js +217 -85
  109. package/dist/user-login.d.ts +9 -10
  110. package/dist/user-login.js +56 -75
  111. package/dist/watch-cli.d.ts +6 -0
  112. package/dist/watch-cli.js +217 -0
  113. package/package.json +4 -27
  114. package/assets/commands/dashboard.md +0 -34
  115. package/dist/dashboard-cli.d.ts +0 -8
  116. package/dist/dashboard-cli.js +0 -70
  117. package/dist/dev.d.ts +0 -103
  118. package/dist/dev.js +0 -583
  119. package/dist/interactive-setup.d.ts +0 -286
  120. package/dist/interactive-setup.js +0 -1734
  121. package/dist/local/jaeger-main.d.ts +0 -13
  122. package/dist/local/jaeger-main.js +0 -85
  123. package/dist/local/jaeger.d.ts +0 -50
  124. package/dist/local/jaeger.js +0 -162
  125. package/dist/otel/exporter.d.ts +0 -17
  126. package/dist/otel/exporter.js +0 -12
  127. package/dist/otel/index.d.ts +0 -2
  128. package/dist/otel/index.js +0 -8
  129. package/dist/otel/otlp.d.ts +0 -103
  130. package/dist/otel/otlp.js +0 -385
  131. package/dist/project-api-key.d.ts +0 -69
  132. package/dist/project-api-key.js +0 -147
  133. package/dist/setup-actions.d.ts +0 -232
  134. package/dist/setup-actions.js +0 -507
  135. package/dist/tracer.d.ts +0 -190
  136. package/dist/tracer.js +0 -481
  137. package/dist/watch-sandbox.d.ts +0 -9
  138. package/dist/watch-sandbox.js +0 -81
  139. package/dist/web/api.d.ts +0 -33
  140. package/dist/web/api.js +0 -294
  141. package/dist/web/launch.d.ts +0 -11
  142. package/dist/web/launch.js +0 -96
  143. package/dist/web/server.d.ts +0 -20
  144. package/dist/web/server.js +0 -233
  145. package/dist/web/types.d.ts +0 -65
  146. package/dist/web/types.js +0 -2
  147. package/dist/webapp/assets/index-Wucl4SZs.css +0 -1
  148. package/dist/webapp/assets/index-m-GtEdq0.js +0 -49
  149. package/dist/webapp/favicon.ico +0 -0
  150. package/dist/webapp/index.html +0 -15
package/dist/setup.d.ts CHANGED
@@ -28,32 +28,14 @@ export declare function readJsonFile(filePath: string): Record<string, unknown>;
28
28
  export declare function writeJsonFile(filePath: string, data: unknown): void;
29
29
  /**
30
30
  * Check if a hook command belongs to an Ory plugin.
31
- */
32
- export declare function isOryHookCommand(h: HookCommand, binName: string): boolean;
33
- /**
34
- * Resolve the hook command string for a plugin.
35
- * Tries require.resolve first, falls back to the global bin name.
36
- */
37
- export declare function resolveHookCommand(packageName: string, binName: string): string;
38
- /**
39
- * Pin an `npx` hook command to the local dev registry when the plugin is being
40
- * installed against it.
41
- *
42
- * A runtime hook of `npx -y -p @ory/<h>[@ver] <bin>` re-resolves the plugin on
43
- * every invocation. If the harness is launched by hand (not via
44
- * `pnpm dev:<harness>`, which sets `npm_config_registry`), that npx defaults to
45
- * npmjs.org and runs the last *published* release — so local changes never take
46
- * effect. When the install itself is running against the local Verdaccio
47
- * registry (detected via `npm_config_registry`, set by both `npx --registry
48
- * <local>` and the dev launcher), this stamps `--registry <local>
49
- * --min-release-age=0` into the hook so it resolves the freshly published dev
50
- * build regardless of how the harness is started.
51
31
  *
52
- * A no-op for production installs (npmjs / unset registry) and for non-`npx`
53
- * hook commands (e.g. a `node "<path>"` command already runs resolved local
54
- * code), so shipped hooks are never altered.
32
+ * The command written today is `node "<dataDir>/bin/ory-hook-<harness>.js"`, so
33
+ * the harness's own bin name no longer appears in it — matching goes through
34
+ * the shared runtime predicate, which also still recognizes the version-pinned
35
+ * `npx` commands earlier releases wrote so an install merge replaces them
36
+ * instead of running both.
55
37
  */
56
- export declare function pinHookToLocalRegistry(hookCommand: string): string;
38
+ export declare function isOryHookCommand(h: HookCommand, binName: string): boolean;
57
39
  /**
58
40
  * Build a matcher-based hook entry: `[{ matcher: "", hooks: [{ type: "command", command }] }]`
59
41
  */
@@ -78,27 +60,20 @@ export declare function mergeFlatHooks(existing: Record<string, unknown>, newHoo
78
60
  * Remove all Ory flat hooks from existing config.
79
61
  */
80
62
  export declare function removeFlatHooks(existing: Record<string, unknown>, binName: string): Record<string, unknown>;
81
- /**
82
- * Resolve the command + args needed to run the Ory MCP server.
83
- * Tries require.resolve first, falls back to the global bin name.
84
- */
85
- export declare function resolveMcpServerCommand(): {
86
- command: string;
87
- args: string[];
88
- };
89
63
  /**
90
64
  * Generate the mcpServers config object for the Ory MCP server.
65
+ *
66
+ * The command is always supplied by the caller: it is the MCP shim written when
67
+ * the runtime was resolved at install time. There is deliberately no fallback
68
+ * that re-resolves the package — a registration that resolves at *run* time is
69
+ * the thing this design removes.
91
70
  */
92
- export declare function mcpServerEntry(cmd?: {
71
+ export declare function mcpServerEntry(cmd: {
93
72
  command: string;
94
73
  args: string[];
95
74
  }): Record<string, unknown>;
96
- /**
97
- * Merge the Ory MCP server into an existing settings object's `mcpServers` key.
98
- * Pass an optional `cmd` to override the default resolution (useful when the
99
- * caller can resolve the mcp-server entry point more reliably than core can).
100
- */
101
- export declare function mergeMcpServer(existing: Record<string, unknown>, cmd?: {
75
+ /** Merge the Ory MCP server into an existing settings object's `mcpServers` key. */
76
+ export declare function mergeMcpServer(existing: Record<string, unknown>, cmd: {
102
77
  command: string;
103
78
  args: string[];
104
79
  }): Record<string, unknown>;
@@ -144,7 +119,7 @@ export type NextStepsRenderer = (opts: {
144
119
  export declare function beginDeferNextSteps(): void;
145
120
  /**
146
121
  * Print any captured next-steps output and stop deferring. `configured` tells
147
- * the renderer whether the wizard finished configuring Ory (so it can drop the
122
+ * the renderer whether the install finished configuring Ory (so it can drop the
148
123
  * manual setup steps, which would only contradict what's already saved).
149
124
  */
150
125
  export declare function emitDeferredNextSteps(configured?: boolean): void;
@@ -152,22 +127,23 @@ export declare function emitDeferredNextSteps(configured?: boolean): void;
152
127
  * Either run the next-steps printer now, or capture it for later when
153
128
  * deferral is active. Harness-specific next-steps printers (e.g. Codex's)
154
129
  * route through this so they participate in the same deferral. When run inline
155
- * (e.g. the standalone setup binary) no wizard configured anything, so the
130
+ * (e.g. the standalone setup binary) nothing configured a connection, so the
156
131
  * renderer is invoked with `configured: false`.
157
132
  */
158
133
  export declare function nextStepsSink(fn: NextStepsRenderer): void;
159
134
  /**
160
135
  * Print the "Next steps" text after successful setup. Deferred to the end of
161
- * an interactive install via {@link nextStepsSink} (see above). When the wizard
162
- * already connected Ory, prints a short launch summary instead of the manual
163
- * env-var setup steps.
136
+ * an install via {@link nextStepsSink} (see above). When the install already
137
+ * connected Ory, prints a short launch summary instead of the manual env-var
138
+ * setup steps.
164
139
  */
165
140
  export declare function printNextSteps(harnessName: string, uninstallCmd: string, opts?: NextStepsOpts): void;
166
141
  /**
167
142
  * Identity a harness passes to {@link printNextSteps} so the "you're all set"
168
- * message can emit copy-pasteable `status` / `watch` / `permissions` commands
169
- * and tailor itself to the mode the wizard actually configured (audit-only has
170
- * no enforcement step). Optional so older callers still get the short summary.
143
+ * message can emit copy-pasteable `status` / `permissions` commands
144
+ * and tailor itself to what the install configured (with Agent Security not
145
+ * connected there is no enforcement step to describe). Optional so older
146
+ * callers still get the short summary.
171
147
  */
172
148
  export interface NextStepsOpts {
173
149
  /** CLI bin name, e.g. `ory-claude` — used to render follow-up commands. */
package/dist/setup.js CHANGED
@@ -37,15 +37,12 @@ exports.parseSetupArgs = parseSetupArgs;
37
37
  exports.readJsonFile = readJsonFile;
38
38
  exports.writeJsonFile = writeJsonFile;
39
39
  exports.isOryHookCommand = isOryHookCommand;
40
- exports.resolveHookCommand = resolveHookCommand;
41
- exports.pinHookToLocalRegistry = pinHookToLocalRegistry;
42
40
  exports.matcherHookEntry = matcherHookEntry;
43
41
  exports.mergeMatcherHooks = mergeMatcherHooks;
44
42
  exports.removeMatcherHooks = removeMatcherHooks;
45
43
  exports.flatHookEntry = flatHookEntry;
46
44
  exports.mergeFlatHooks = mergeFlatHooks;
47
45
  exports.removeFlatHooks = removeFlatHooks;
48
- exports.resolveMcpServerCommand = resolveMcpServerCommand;
49
46
  exports.mcpServerEntry = mcpServerEntry;
50
47
  exports.mergeMcpServer = mergeMcpServer;
51
48
  exports.removeMcpServer = removeMcpServer;
@@ -61,7 +58,7 @@ const os = __importStar(require("node:os"));
61
58
  const path = __importStar(require("node:path"));
62
59
  const cli_invocation_js_1 = require("./cli-invocation.js");
63
60
  const config_js_1 = require("./config.js");
64
- const config_js_2 = require("./registry/config.js");
61
+ const runtime_js_1 = require("./runtime.js");
65
62
  const ui = __importStar(require("./ui.js"));
66
63
  // ─── Arg Parsing ───────────────────────────────────────────────────
67
64
  /**
@@ -121,56 +118,17 @@ function writeJsonFile(filePath, data) {
121
118
  // ─── Hook Command Utilities ────────────────────────────────────────
122
119
  /**
123
120
  * Check if a hook command belongs to an Ory plugin.
124
- */
125
- function isOryHookCommand(h, binName) {
126
- return h.command?.includes(binName) || h.command?.includes("ory-agent-plugins");
127
- }
128
- /**
129
- * Resolve the hook command string for a plugin.
130
- * Tries require.resolve first, falls back to the global bin name.
131
- */
132
- function resolveHookCommand(packageName, binName) {
133
- try {
134
- const binPath = require.resolve(packageName);
135
- // The package root resolves to the main entry (dist/index.js).
136
- // The hook script lives alongside it as dist/hook.js.
137
- const hookPath = path.resolve(path.dirname(binPath), "hook.js");
138
- return `node "${hookPath}"`;
139
- }
140
- catch {
141
- return binName;
142
- }
143
- }
144
- /**
145
- * Pin an `npx` hook command to the local dev registry when the plugin is being
146
- * installed against it.
147
- *
148
- * A runtime hook of `npx -y -p @ory/<h>[@ver] <bin>` re-resolves the plugin on
149
- * every invocation. If the harness is launched by hand (not via
150
- * `pnpm dev:<harness>`, which sets `npm_config_registry`), that npx defaults to
151
- * npmjs.org and runs the last *published* release — so local changes never take
152
- * effect. When the install itself is running against the local Verdaccio
153
- * registry (detected via `npm_config_registry`, set by both `npx --registry
154
- * <local>` and the dev launcher), this stamps `--registry <local>
155
- * --min-release-age=0` into the hook so it resolves the freshly published dev
156
- * build regardless of how the harness is started.
157
121
  *
158
- * A no-op for production installs (npmjs / unset registry) and for non-`npx`
159
- * hook commands (e.g. a `node "<path>"` command already runs resolved local
160
- * code), so shipped hooks are never altered.
122
+ * The command written today is `node "<dataDir>/bin/ory-hook-<harness>.js"`, so
123
+ * the harness's own bin name no longer appears in it — matching goes through
124
+ * the shared runtime predicate, which also still recognizes the version-pinned
125
+ * `npx` commands earlier releases wrote so an install merge replaces them
126
+ * instead of running both.
161
127
  */
162
- function pinHookToLocalRegistry(hookCommand) {
163
- const normalize = (u) => u.replace(/\/+$/, "");
164
- const active = process.env.npm_config_registry?.trim();
165
- if (!active || normalize(active) !== normalize(config_js_2.REGISTRY_URL))
166
- return hookCommand;
167
- const trimmed = hookCommand.trimStart();
168
- if (!/^npx(\s|$)/.test(trimmed))
169
- return hookCommand;
170
- if (trimmed.includes("--registry"))
171
- return hookCommand;
172
- // Insert the registry flags right after `npx` (and its optional `-y`).
173
- return hookCommand.replace(/^(\s*npx(?:\s+-y)?)(\s)/, `$1 --registry ${config_js_2.REGISTRY_URL} --min-release-age=0$2`);
128
+ function isOryHookCommand(h, binName) {
129
+ return ((0, runtime_js_1.isOryRuntimeCommand)(h.command) ||
130
+ h.command?.includes(binName) ||
131
+ h.command?.includes("ory-agent-plugins"));
174
132
  }
175
133
  // ─── Matcher-Based Hooks (Claude Code, Gemini CLI) ─────────────────
176
134
  /**
@@ -258,35 +216,21 @@ function removeFlatHooks(existing, binName) {
258
216
  }
259
217
  // ─── MCP Server Config ────────────────────────────────────────────
260
218
  const MCP_SERVER_NAME = "ory";
261
- const MCP_SERVER_PACKAGE = "@ory/mcp-server";
262
- /**
263
- * Resolve the command + args needed to run the Ory MCP server.
264
- * Tries require.resolve first, falls back to the global bin name.
265
- */
266
- function resolveMcpServerCommand() {
267
- try {
268
- const entryPoint = require.resolve(MCP_SERVER_PACKAGE);
269
- return { command: "node", args: [entryPoint] };
270
- }
271
- catch {
272
- return { command: "ory-mcp-server", args: [] };
273
- }
274
- }
275
219
  /**
276
220
  * Generate the mcpServers config object for the Ory MCP server.
221
+ *
222
+ * The command is always supplied by the caller: it is the MCP shim written when
223
+ * the runtime was resolved at install time. There is deliberately no fallback
224
+ * that re-resolves the package — a registration that resolves at *run* time is
225
+ * the thing this design removes.
277
226
  */
278
227
  function mcpServerEntry(cmd) {
279
- const resolved = cmd ?? resolveMcpServerCommand();
280
228
  return {
281
- command: resolved.command,
282
- ...(resolved.args.length > 0 ? { args: resolved.args } : {}),
229
+ command: cmd.command,
230
+ ...(cmd.args.length > 0 ? { args: cmd.args } : {}),
283
231
  };
284
232
  }
285
- /**
286
- * Merge the Ory MCP server into an existing settings object's `mcpServers` key.
287
- * Pass an optional `cmd` to override the default resolution (useful when the
288
- * caller can resolve the mcp-server entry point more reliably than core can).
289
- */
233
+ /** Merge the Ory MCP server into an existing settings object's `mcpServers` key. */
290
234
  function mergeMcpServer(existing, cmd) {
291
235
  const merged = { ...existing };
292
236
  const servers = (merged.mcpServers ?? {});
@@ -411,11 +355,11 @@ Options:
411
355
 
412
356
  Environment variables:
413
357
  ORY_PROJECT_URL Your Ory project URL (required at runtime)
414
- ORY_AGENT_API_KEY Agent API key / OAuth2 bearer (preferred name;
415
- ORY_API_KEY is honored as a deprecated alias)
416
- ORY_OAUTH2_CLIENT_ID Public OAuth2 client id for the user PKCE flow
417
- (the interactive user login runs every session)
418
- ORY_PERMISSION_MODE "observe" (default) or "enforce" — what to do on deny
358
+ ORY_AGENT_SECURITY_URL Canonical Agent Security origin (legacy fallback: project URL)
359
+ ORY_AGENT_CLIENT_ID Static agent OAuth2 client_credentials (with
360
+ ORY_AGENT_CLIENT_SECRET …SECRET) otherwise the agent self-registers
361
+ ORY_OAUTH2_CLIENT_ID Override the public OAuth2 client id for the user PKCE flow
362
+ (default: ory-agent-security-login)
419
363
  ORY_AGENT_DEBUG Set to "true" for debug logging
420
364
  ORY_AGENT_LOG_FILE Path to write debug logs
421
365
  ORY_AGENT_SUBJECT_ID Override the subject ID for permission checks
@@ -430,7 +374,7 @@ function beginDeferNextSteps() {
430
374
  }
431
375
  /**
432
376
  * Print any captured next-steps output and stop deferring. `configured` tells
433
- * the renderer whether the wizard finished configuring Ory (so it can drop the
377
+ * the renderer whether the install finished configuring Ory (so it can drop the
434
378
  * manual setup steps, which would only contradict what's already saved).
435
379
  */
436
380
  function emitDeferredNextSteps(configured = false) {
@@ -444,7 +388,7 @@ function emitDeferredNextSteps(configured = false) {
444
388
  * Either run the next-steps printer now, or capture it for later when
445
389
  * deferral is active. Harness-specific next-steps printers (e.g. Codex's)
446
390
  * route through this so they participate in the same deferral. When run inline
447
- * (e.g. the standalone setup binary) no wizard configured anything, so the
391
+ * (e.g. the standalone setup binary) nothing configured a connection, so the
448
392
  * renderer is invoked with `configured: false`.
449
393
  */
450
394
  function nextStepsSink(fn) {
@@ -456,9 +400,9 @@ function nextStepsSink(fn) {
456
400
  }
457
401
  /**
458
402
  * Print the "Next steps" text after successful setup. Deferred to the end of
459
- * an interactive install via {@link nextStepsSink} (see above). When the wizard
460
- * already connected Ory, prints a short launch summary instead of the manual
461
- * env-var setup steps.
403
+ * an install via {@link nextStepsSink} (see above). When the install already
404
+ * connected Ory, prints a short launch summary instead of the manual env-var
405
+ * setup steps.
462
406
  */
463
407
  function printNextSteps(harnessName, uninstallCmd, opts) {
464
408
  nextStepsSink(({ configured }) => configured
@@ -466,44 +410,45 @@ function printNextSteps(harnessName, uninstallCmd, opts) {
466
410
  : printNextStepsNow(harnessName, uninstallCmd));
467
411
  }
468
412
  /**
469
- * The closing message when the interactive wizard already configured Ory.
413
+ * The closing message when the install already configured a connection.
470
414
  * Everything the manual steps would ask for is done, so this points the user
471
- * at the next things they'll actually want: see what Ory is doing (status /
472
- * live trace watch), promote to enforcement, and turn on debug logging. When
415
+ * at the next things they'll actually want: see what Ory is doing, enable the
416
+ * live debug stream, and promote to enforcement. When
473
417
  * no {@link NextStepsOpts} is supplied it degrades to the short launch summary.
474
418
  */
475
419
  function printConfiguredNextStepsNow(harnessName, uninstallCmd, opts) {
476
420
  ui.heading("Next steps:");
477
- ui.success(`Ory is configured — start ${harnessName} in your project directory.`);
421
+ ui.success((0, config_js_1.resolveConfig)().security.connected
422
+ ? `Ory Agent Security is connected — start ${harnessName} in your project directory.`
423
+ : `Start ${harnessName} in your project directory.`);
478
424
  if (!opts) {
479
425
  ui.blank();
480
426
  ui.hint(`To uninstall: ${ui.inlineCommand(uninstallCmd)}`);
481
427
  return;
482
428
  }
483
429
  const npx = (0, cli_invocation_js_1.oryNpx)(opts.binName);
484
- const auditOnly = (0, config_js_1.resolveConfig)().auditOnly;
485
- if (auditOnly) {
486
- ui.hint("Audit-only mode: tool calls are traced locally no checks run, nothing is blocked.");
430
+ const security = (0, config_js_1.resolveConfig)().security;
431
+ if (!security.connected) {
432
+ ui.hint("Ory Agent Security is not connected: tool activity is logged locally, nothing is checked or blocked.");
433
+ ui.hint(`Connect it any time with ${ui.inlineCommand(`${npx} configure --project-url <URL> --agent-security-url <URL>`)}.`);
487
434
  ui.blank();
488
- ui.bullet("1. Open the dashboarda live view of config, permissions, and activity:");
489
- ui.command(`${npx} dashboard`);
490
- ui.hint(` ...or from the terminal: ${ui.inlineCommand(`${npx} status`)} / ${ui.inlineCommand(`${npx} watch`)}`);
435
+ ui.bullet("1. See what's happening — config and recent activity:");
436
+ ui.command(`${npx} status`);
491
437
  ui.blank();
492
- ui.bullet("2. Want more detail? Turn on debug logging:");
438
+ ui.bullet("2. Stream complete activity and debug output live:");
493
439
  ui.command("export ORY_AGENT_DEBUG=true");
494
440
  }
495
441
  else {
496
- ui.hint("It starts in watch mode: every tool call is checked, but nothing is blocked yet.");
442
+ ui.hint("It starts in observe mode: every tool call is checked, but nothing is blocked yet.");
497
443
  ui.blank();
498
- ui.bullet("1. Open the dashboarda live view of config, permission coverage, and activity:");
499
- ui.command(`${npx} dashboard`);
500
- ui.hint(` ...or from the terminal: ${ui.inlineCommand(`${npx} status`)} / ${ui.inlineCommand(`${npx} watch`)}`);
444
+ ui.bullet("1. See what's happeningconfig and permission coverage:");
445
+ ui.command(`${npx} status`);
501
446
  ui.blank();
502
- ui.bullet("2. Turn on enforcement once the watch-mode traces look right:");
503
- ui.command(`${npx} permissions enforce`);
504
- ui.hint(` denied tools are then blocked; return to watch with ${ui.inlineCommand(`${npx} permissions observe`)}`);
447
+ ui.bullet("2. Turn on enforcement once the activity log looks right:");
448
+ ui.hint(" the deny posture is controlled on the Ory project (Agent Security).");
449
+ ui.hint(` Check the live mode with ${ui.inlineCommand(`${npx} permissions status`)}.`);
505
450
  ui.blank();
506
- ui.bullet("3. Want more detail? Turn on debug logging:");
451
+ ui.bullet("3. Stream complete activity and debug output live:");
507
452
  ui.command("export ORY_AGENT_DEBUG=true");
508
453
  }
509
454
  ui.blank();
@@ -511,23 +456,21 @@ function printConfiguredNextStepsNow(harnessName, uninstallCmd, opts) {
511
456
  }
512
457
  function printNextStepsNow(harnessName, uninstallCmd) {
513
458
  ui.heading("Next steps:");
514
- ui.bullet("1. Set required environment variables:");
515
- ui.command("export ORY_PROJECT_URL=https://your-project.projects.oryapis.com");
516
- ui.command("export ORY_AGENT_API_KEY=ory_pat_...");
517
- ui.blank();
518
- ui.bullet("2. Provide the public OAuth2 client id for the user login (runs every session):");
519
- ui.command("configure --oauth2-client-id <public OAuth2 client id>");
459
+ ui.bullet("1. Optional connect Ory Agent Security with the project URL from the Ory Console:");
460
+ ui.command("configure --project-url <URL>");
520
461
  ui.hint(" ...or set it per-session via an env var:");
521
- ui.command("export ORY_OAUTH2_CLIENT_ID=<public OAuth2 client id>");
522
- ui.hint(` Without it, ${harnessName} runs without a human Ory identity attached`);
523
- ui.hint(" to the session and permission checks fall back to a session:<id> subject.");
524
- ui.hint(" The OAuth2 client id is the public client (no secret) you registered in");
525
- ui.hint(" your Ory project with the four loopback redirect URIs.");
462
+ ui.command("export ORY_PROJECT_URL=https://your-project.projects.oryapis.com");
463
+ ui.hint(" ORY_AGENT_SECURITY_URL optionally overrides the production broker.");
464
+ ui.hint(" ORY_OAUTH2_CLIENT_ID optionally overrides ory-agent-security-login.");
465
+ ui.hint(` Without a project URL, checks stay off and ${harnessName} only logs tool activity locally.`);
466
+ ui.hint(" Everything else the plugin installs works without them.");
467
+ ui.hint(" The reserved public login client is provisioned in the Ory Console");
468
+ ui.hint(" along with the permission model, grants, and enforce posture.");
526
469
  ui.blank();
527
- ui.bullet("3. Optionally enable debug logging:");
470
+ ui.bullet("2. Optionally enable debug logging:");
528
471
  ui.command("export ORY_AGENT_DEBUG=true");
529
472
  ui.blank();
530
- ui.bullet(`4. Start ${harnessName} in your project directory.`);
473
+ ui.bullet(`3. Start ${harnessName} in your project directory.`);
531
474
  ui.blank();
532
475
  ui.hint(`To uninstall: ${ui.inlineCommand(uninstallCmd)}`);
533
476
  }
package/dist/skills.js CHANGED
@@ -122,13 +122,6 @@ const COMMAND_SOURCES = [
122
122
  description: "Start the local Temporal TypeScript dev server (Temporal Server + Web UI) for the Ory-authed worker scaffold.",
123
123
  file: "commands/temporal-up.md",
124
124
  },
125
- {
126
- id: "dashboard",
127
- name: "ory-dashboard",
128
- slug: "dashboard",
129
- description: "Open a live browser dashboard of the plugin's configuration and the local Ory stack's service health.",
130
- file: "commands/dashboard.md",
131
- },
132
125
  ];
133
126
  /** Names of the skills materialized by the plugins (for uninstall cleanup). */
134
127
  exports.ORY_SKILL_NAMES = SKILL_SOURCES.map((s) => s.name);
@@ -5,14 +5,29 @@
5
5
  export declare function printUserIdentitySection(): void;
6
6
  /**
7
7
  * Render the "Agent identity" block. Summarizes the resolved machine
8
- * credential — static env override, persisted DCR, or unconfigured.
8
+ * credential — static env override, persisted DCR, or unconfigured. Each
9
+ * installed harness has its own agent registration, so the report is for
10
+ * `harness`'s identity only.
9
11
  */
10
- export declare function printAgentIdentitySection(): void;
12
+ export declare function printAgentIdentitySection(harness: string): void;
11
13
  /**
12
- * Render the "Permissions" block. Always prints the configured mode and
13
- * namespace; runs a network probe of the harness's built-in tool catalog
14
- * only when a project URL is configured *and* a user identity is
15
- * available (cached PKCE tokens or `ORY_USER_SUBJECT_ID`).
14
+ * Render the "Sub-agent identities" block one entry per typed sub-agent
15
+ * (e.g. `Explore`, `general-purpose`) the agent has registered a distinct
16
+ * OAuth2 client for via DCR. All sub-agent identities are dynamic
17
+ * registrations. Scoped to `harness` sub-agents belong to that harness's
18
+ * agent. A no-op when none exist yet.
19
+ */
20
+ export declare function printSubAgentIdentitiesSection(harness: string): void;
21
+ /**
22
+ * Render the "Permissions" block: the deny posture, the namespace, and the
23
+ * coverage of the harness's built-in tool catalog.
24
+ *
25
+ * The network probe runs only when a project URL is configured *and* a user
26
+ * identity is available (cached PKCE tokens or `ORY_USER_SUBJECT_ID`). When it
27
+ * runs, the reported **Mode is read live from the project** in the same pass, so
28
+ * this line answers "what would a tool call do right now?" rather than echoing a
29
+ * cache that is only refreshed at session start. On every other path the last
30
+ * cached value is reported, annotated as such.
16
31
  */
17
32
  export declare function printPermissionsSection(binName: string, harness: string): Promise<void>;
18
33
  export interface StatusCommandOptions {
@@ -21,17 +36,18 @@ export interface StatusCommandOptions {
21
36
  /**
22
37
  * Optional renderer for the "Hooks & plugin" section. Each harness owns
23
38
  * the layout for its plugin-specific registration data (extension dir,
24
- * marketplace plugin ID, hook script path, etc.).
39
+ * marketplace plugin ID, hook script path, etc.). May be async — some
40
+ * harnesses have to reach the network to report what will actually load.
25
41
  */
26
- printPluginSection?: () => void;
42
+ printPluginSection?: () => void | Promise<void>;
27
43
  }
28
44
  /**
29
45
  * Compose the unified `status` output for a plugin CLI. Sections render
30
46
  * in this order: title → configuration → user identity → agent identity
31
- * → permissions → hooks & plugin → environment → recent activity
32
- * (traces + debug log).
47
+ * → sub-agent identities → permissions → hooks & plugin → environment →
48
+ * recent activity from the unified activity/debug log.
33
49
  *
34
- * Each section degrades gracefully — missing project URL, audit-only
50
+ * Each section degrades gracefully — Agent Security not connected
35
51
  * mode, and empty token caches all surface as inline "n/a" lines rather
36
52
  * than aborting the command.
37
53
  */