@ory/argus 0.13.9 → 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.
- package/README.md +31 -45
- package/assets/commands/temporal-up.md +1 -1
- package/assets/skills/auth-setup/SKILL.md +1 -1
- package/assets/skills/local-dev/SKILL.md +17 -7
- package/assets/skills/ory-build-agent/SKILL.md +43 -97
- package/assets/skills/ory-e2b-sandbox/SKILL.md +18 -18
- package/assets/skills/ory-temporal-worker/SKILL.md +38 -42
- package/assets/skills/permissions-onboarding/SKILL.md +131 -104
- package/dist/adapters.d.ts +93 -30
- package/dist/adapters.js +464 -136
- package/dist/agent-auth.d.ts +258 -68
- package/dist/agent-auth.js +998 -202
- package/dist/auth-store.d.ts +37 -2
- package/dist/auth-store.js +37 -3
- package/dist/auth.d.ts +40 -4
- package/dist/auth.js +247 -19
- package/dist/bash-parser.d.ts +98 -0
- package/dist/bash-parser.js +396 -0
- package/dist/branding.d.ts +128 -0
- package/dist/branding.js +151 -0
- package/dist/build-info.json +4 -4
- package/dist/cli-invocation.d.ts +1 -1
- package/dist/cli-invocation.js +2 -1
- package/dist/cli.d.ts +20 -29
- package/dist/cli.js +271 -278
- package/dist/client.d.ts +175 -138
- package/dist/client.js +672 -391
- package/dist/config.d.ts +249 -57
- package/dist/config.js +486 -62
- package/dist/context.d.ts +10 -0
- package/dist/context.js +21 -0
- package/dist/contract-suite.d.ts +8 -8
- package/dist/contract-suite.js +88 -69
- package/dist/denial.d.ts +36 -3
- package/dist/denial.js +79 -10
- package/dist/event-reporter.d.ts +77 -0
- package/dist/event-reporter.js +776 -0
- package/dist/external-registrations-main.d.ts +10 -0
- package/dist/external-registrations-main.js +38 -0
- package/dist/external-registrations.d.ts +79 -0
- package/dist/external-registrations.js +188 -0
- package/dist/help-cli.d.ts +39 -0
- package/dist/help-cli.js +55 -0
- package/dist/hook-timeout.d.ts +64 -0
- package/dist/hook-timeout.js +88 -0
- package/dist/index.d.ts +31 -19
- package/dist/index.js +182 -31
- package/dist/lifecycle.d.ts +3 -3
- package/dist/lifecycle.js +38 -6
- package/dist/local/cli.js +11 -6
- package/dist/local/configs.d.ts +74 -18
- package/dist/local/configs.js +291 -84
- package/dist/local/health.d.ts +14 -0
- package/dist/local/health.js +50 -4
- package/dist/local/index.d.ts +2 -2
- package/dist/local/index.js +24 -10
- package/dist/local/manager.d.ts +20 -1
- package/dist/local/manager.js +160 -39
- package/dist/local/ports.d.ts +158 -0
- package/dist/local/ports.js +443 -0
- package/dist/local/seed.d.ts +22 -25
- package/dist/local/seed.js +88 -56
- package/dist/logger.d.ts +54 -25
- package/dist/logger.js +329 -63
- package/dist/mcp.d.ts +2 -2
- package/dist/mcp.js +10 -5
- package/dist/mirror-bootstrap.d.ts +48 -0
- package/dist/mirror-bootstrap.js +254 -0
- package/dist/opl.d.ts +289 -0
- package/dist/opl.js +446 -0
- package/dist/permission-mode.d.ts +87 -0
- package/dist/permission-mode.js +307 -0
- package/dist/permissions-cli.d.ts +13 -49
- package/dist/permissions-cli.js +154 -348
- package/dist/permissions.d.ts +148 -38
- package/dist/permissions.js +591 -45
- package/dist/post-install.d.ts +33 -0
- package/dist/post-install.js +127 -0
- package/dist/read-credential.d.ts +65 -0
- package/dist/read-credential.js +86 -0
- package/dist/registry/cli.js +5 -2
- package/dist/registry/config.d.ts +0 -17
- package/dist/registry/config.js +0 -23
- package/dist/registry/index.d.ts +1 -1
- package/dist/registry/index.js +2 -2
- package/dist/registry/manager.d.ts +4 -21
- package/dist/registry/manager.js +83 -55
- package/dist/runtime-credential.d.ts +140 -0
- package/dist/runtime-credential.js +572 -0
- package/dist/runtime.d.ts +408 -0
- package/dist/runtime.js +748 -0
- package/dist/setup.d.ts +23 -28
- package/dist/setup.js +57 -84
- package/dist/status-cli.d.ts +29 -13
- package/dist/status-cli.js +124 -144
- package/dist/status-data.d.ts +195 -0
- package/dist/status-data.js +333 -0
- package/dist/status-system.d.ts +24 -0
- package/dist/status-system.js +56 -0
- package/dist/subject.d.ts +126 -20
- package/dist/subject.js +215 -30
- package/dist/testing.d.ts +74 -38
- package/dist/testing.js +185 -68
- package/dist/tool-catalog.d.ts +53 -11
- package/dist/tool-catalog.js +164 -13
- package/dist/tool-metadata.d.ts +7 -6
- package/dist/tool-metadata.js +6 -5
- package/dist/types.d.ts +11 -1
- package/dist/uninstall.d.ts +74 -19
- package/dist/uninstall.js +224 -49
- package/dist/user-login.d.ts +22 -16
- package/dist/user-login.js +67 -96
- package/dist/watch-cli.d.ts +6 -0
- package/dist/watch-cli.js +217 -0
- package/package.json +3 -11
- package/dist/dev.d.ts +0 -103
- package/dist/dev.js +0 -584
- package/dist/interactive-setup.d.ts +0 -165
- package/dist/interactive-setup.js +0 -1546
- package/dist/local/jaeger-main.d.ts +0 -13
- package/dist/local/jaeger-main.js +0 -85
- package/dist/local/jaeger.d.ts +0 -50
- package/dist/local/jaeger.js +0 -162
- package/dist/otel/exporter.d.ts +0 -17
- package/dist/otel/exporter.js +0 -12
- package/dist/otel/index.d.ts +0 -2
- package/dist/otel/index.js +0 -8
- package/dist/otel/otlp.d.ts +0 -103
- package/dist/otel/otlp.js +0 -385
- package/dist/tracer.d.ts +0 -190
- package/dist/tracer.js +0 -481
- package/dist/watch-sandbox.d.ts +0 -9
- package/dist/watch-sandbox.js +0 -81
package/dist/setup.d.ts
CHANGED
|
@@ -28,13 +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
|
+
* 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.
|
|
31
37
|
*/
|
|
32
38
|
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
|
/**
|
|
39
40
|
* Build a matcher-based hook entry: `[{ matcher: "", hooks: [{ type: "command", command }] }]`
|
|
40
41
|
*/
|
|
@@ -59,27 +60,20 @@ export declare function mergeFlatHooks(existing: Record<string, unknown>, newHoo
|
|
|
59
60
|
* Remove all Ory flat hooks from existing config.
|
|
60
61
|
*/
|
|
61
62
|
export declare function removeFlatHooks(existing: Record<string, unknown>, binName: string): Record<string, unknown>;
|
|
62
|
-
/**
|
|
63
|
-
* Resolve the command + args needed to run the Ory MCP server.
|
|
64
|
-
* Tries require.resolve first, falls back to the global bin name.
|
|
65
|
-
*/
|
|
66
|
-
export declare function resolveMcpServerCommand(): {
|
|
67
|
-
command: string;
|
|
68
|
-
args: string[];
|
|
69
|
-
};
|
|
70
63
|
/**
|
|
71
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.
|
|
72
70
|
*/
|
|
73
|
-
export declare function mcpServerEntry(cmd
|
|
71
|
+
export declare function mcpServerEntry(cmd: {
|
|
74
72
|
command: string;
|
|
75
73
|
args: string[];
|
|
76
74
|
}): Record<string, unknown>;
|
|
77
|
-
/**
|
|
78
|
-
|
|
79
|
-
* Pass an optional `cmd` to override the default resolution (useful when the
|
|
80
|
-
* caller can resolve the mcp-server entry point more reliably than core can).
|
|
81
|
-
*/
|
|
82
|
-
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: {
|
|
83
77
|
command: string;
|
|
84
78
|
args: string[];
|
|
85
79
|
}): Record<string, unknown>;
|
|
@@ -125,7 +119,7 @@ export type NextStepsRenderer = (opts: {
|
|
|
125
119
|
export declare function beginDeferNextSteps(): void;
|
|
126
120
|
/**
|
|
127
121
|
* Print any captured next-steps output and stop deferring. `configured` tells
|
|
128
|
-
* the renderer whether the
|
|
122
|
+
* the renderer whether the install finished configuring Ory (so it can drop the
|
|
129
123
|
* manual setup steps, which would only contradict what's already saved).
|
|
130
124
|
*/
|
|
131
125
|
export declare function emitDeferredNextSteps(configured?: boolean): void;
|
|
@@ -133,22 +127,23 @@ export declare function emitDeferredNextSteps(configured?: boolean): void;
|
|
|
133
127
|
* Either run the next-steps printer now, or capture it for later when
|
|
134
128
|
* deferral is active. Harness-specific next-steps printers (e.g. Codex's)
|
|
135
129
|
* route through this so they participate in the same deferral. When run inline
|
|
136
|
-
* (e.g. the standalone setup binary)
|
|
130
|
+
* (e.g. the standalone setup binary) nothing configured a connection, so the
|
|
137
131
|
* renderer is invoked with `configured: false`.
|
|
138
132
|
*/
|
|
139
133
|
export declare function nextStepsSink(fn: NextStepsRenderer): void;
|
|
140
134
|
/**
|
|
141
135
|
* Print the "Next steps" text after successful setup. Deferred to the end of
|
|
142
|
-
* an
|
|
143
|
-
*
|
|
144
|
-
*
|
|
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.
|
|
145
139
|
*/
|
|
146
140
|
export declare function printNextSteps(harnessName: string, uninstallCmd: string, opts?: NextStepsOpts): void;
|
|
147
141
|
/**
|
|
148
142
|
* Identity a harness passes to {@link printNextSteps} so the "you're all set"
|
|
149
|
-
* message can emit copy-pasteable `status` / `
|
|
150
|
-
* and tailor itself to
|
|
151
|
-
* no enforcement step). Optional so older
|
|
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.
|
|
152
147
|
*/
|
|
153
148
|
export interface NextStepsOpts {
|
|
154
149
|
/** CLI bin name, e.g. `ory-claude` — used to render follow-up commands. */
|
package/dist/setup.js
CHANGED
|
@@ -37,14 +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
40
|
exports.matcherHookEntry = matcherHookEntry;
|
|
42
41
|
exports.mergeMatcherHooks = mergeMatcherHooks;
|
|
43
42
|
exports.removeMatcherHooks = removeMatcherHooks;
|
|
44
43
|
exports.flatHookEntry = flatHookEntry;
|
|
45
44
|
exports.mergeFlatHooks = mergeFlatHooks;
|
|
46
45
|
exports.removeFlatHooks = removeFlatHooks;
|
|
47
|
-
exports.resolveMcpServerCommand = resolveMcpServerCommand;
|
|
48
46
|
exports.mcpServerEntry = mcpServerEntry;
|
|
49
47
|
exports.mergeMcpServer = mergeMcpServer;
|
|
50
48
|
exports.removeMcpServer = removeMcpServer;
|
|
@@ -60,6 +58,7 @@ const os = __importStar(require("node:os"));
|
|
|
60
58
|
const path = __importStar(require("node:path"));
|
|
61
59
|
const cli_invocation_js_1 = require("./cli-invocation.js");
|
|
62
60
|
const config_js_1 = require("./config.js");
|
|
61
|
+
const runtime_js_1 = require("./runtime.js");
|
|
63
62
|
const ui = __importStar(require("./ui.js"));
|
|
64
63
|
// ─── Arg Parsing ───────────────────────────────────────────────────
|
|
65
64
|
/**
|
|
@@ -119,25 +118,17 @@ function writeJsonFile(filePath, data) {
|
|
|
119
118
|
// ─── Hook Command Utilities ────────────────────────────────────────
|
|
120
119
|
/**
|
|
121
120
|
* Check if a hook command belongs to an Ory plugin.
|
|
121
|
+
*
|
|
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.
|
|
122
127
|
*/
|
|
123
128
|
function isOryHookCommand(h, binName) {
|
|
124
|
-
return h.command
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
* Resolve the hook command string for a plugin.
|
|
128
|
-
* Tries require.resolve first, falls back to the global bin name.
|
|
129
|
-
*/
|
|
130
|
-
function resolveHookCommand(packageName, binName) {
|
|
131
|
-
try {
|
|
132
|
-
const binPath = require.resolve(packageName);
|
|
133
|
-
// The package root resolves to the main entry (dist/index.js).
|
|
134
|
-
// The hook script lives alongside it as dist/hook.js.
|
|
135
|
-
const hookPath = path.resolve(path.dirname(binPath), "hook.js");
|
|
136
|
-
return `node "${hookPath}"`;
|
|
137
|
-
}
|
|
138
|
-
catch {
|
|
139
|
-
return binName;
|
|
140
|
-
}
|
|
129
|
+
return ((0, runtime_js_1.isOryRuntimeCommand)(h.command) ||
|
|
130
|
+
h.command?.includes(binName) ||
|
|
131
|
+
h.command?.includes("ory-agent-plugins"));
|
|
141
132
|
}
|
|
142
133
|
// ─── Matcher-Based Hooks (Claude Code, Gemini CLI) ─────────────────
|
|
143
134
|
/**
|
|
@@ -225,35 +216,21 @@ function removeFlatHooks(existing, binName) {
|
|
|
225
216
|
}
|
|
226
217
|
// ─── MCP Server Config ────────────────────────────────────────────
|
|
227
218
|
const MCP_SERVER_NAME = "ory";
|
|
228
|
-
const MCP_SERVER_PACKAGE = "@ory/mcp-server";
|
|
229
|
-
/**
|
|
230
|
-
* Resolve the command + args needed to run the Ory MCP server.
|
|
231
|
-
* Tries require.resolve first, falls back to the global bin name.
|
|
232
|
-
*/
|
|
233
|
-
function resolveMcpServerCommand() {
|
|
234
|
-
try {
|
|
235
|
-
const entryPoint = require.resolve(MCP_SERVER_PACKAGE);
|
|
236
|
-
return { command: "node", args: [entryPoint] };
|
|
237
|
-
}
|
|
238
|
-
catch {
|
|
239
|
-
return { command: "ory-mcp-server", args: [] };
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
219
|
/**
|
|
243
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.
|
|
244
226
|
*/
|
|
245
227
|
function mcpServerEntry(cmd) {
|
|
246
|
-
const resolved = cmd ?? resolveMcpServerCommand();
|
|
247
228
|
return {
|
|
248
|
-
command:
|
|
249
|
-
...(
|
|
229
|
+
command: cmd.command,
|
|
230
|
+
...(cmd.args.length > 0 ? { args: cmd.args } : {}),
|
|
250
231
|
};
|
|
251
232
|
}
|
|
252
|
-
/**
|
|
253
|
-
* Merge the Ory MCP server into an existing settings object's `mcpServers` key.
|
|
254
|
-
* Pass an optional `cmd` to override the default resolution (useful when the
|
|
255
|
-
* caller can resolve the mcp-server entry point more reliably than core can).
|
|
256
|
-
*/
|
|
233
|
+
/** Merge the Ory MCP server into an existing settings object's `mcpServers` key. */
|
|
257
234
|
function mergeMcpServer(existing, cmd) {
|
|
258
235
|
const merged = { ...existing };
|
|
259
236
|
const servers = (merged.mcpServers ?? {});
|
|
@@ -378,13 +355,11 @@ Options:
|
|
|
378
355
|
|
|
379
356
|
Environment variables:
|
|
380
357
|
ORY_PROJECT_URL Your Ory project URL (required at runtime)
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
(or persist it with: configure --user-login)
|
|
387
|
-
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)
|
|
388
363
|
ORY_AGENT_DEBUG Set to "true" for debug logging
|
|
389
364
|
ORY_AGENT_LOG_FILE Path to write debug logs
|
|
390
365
|
ORY_AGENT_SUBJECT_ID Override the subject ID for permission checks
|
|
@@ -399,7 +374,7 @@ function beginDeferNextSteps() {
|
|
|
399
374
|
}
|
|
400
375
|
/**
|
|
401
376
|
* Print any captured next-steps output and stop deferring. `configured` tells
|
|
402
|
-
* the renderer whether the
|
|
377
|
+
* the renderer whether the install finished configuring Ory (so it can drop the
|
|
403
378
|
* manual setup steps, which would only contradict what's already saved).
|
|
404
379
|
*/
|
|
405
380
|
function emitDeferredNextSteps(configured = false) {
|
|
@@ -413,7 +388,7 @@ function emitDeferredNextSteps(configured = false) {
|
|
|
413
388
|
* Either run the next-steps printer now, or capture it for later when
|
|
414
389
|
* deferral is active. Harness-specific next-steps printers (e.g. Codex's)
|
|
415
390
|
* route through this so they participate in the same deferral. When run inline
|
|
416
|
-
* (e.g. the standalone setup binary)
|
|
391
|
+
* (e.g. the standalone setup binary) nothing configured a connection, so the
|
|
417
392
|
* renderer is invoked with `configured: false`.
|
|
418
393
|
*/
|
|
419
394
|
function nextStepsSink(fn) {
|
|
@@ -425,9 +400,9 @@ function nextStepsSink(fn) {
|
|
|
425
400
|
}
|
|
426
401
|
/**
|
|
427
402
|
* Print the "Next steps" text after successful setup. Deferred to the end of
|
|
428
|
-
* an
|
|
429
|
-
*
|
|
430
|
-
*
|
|
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.
|
|
431
406
|
*/
|
|
432
407
|
function printNextSteps(harnessName, uninstallCmd, opts) {
|
|
433
408
|
nextStepsSink(({ configured }) => configured
|
|
@@ -435,44 +410,45 @@ function printNextSteps(harnessName, uninstallCmd, opts) {
|
|
|
435
410
|
: printNextStepsNow(harnessName, uninstallCmd));
|
|
436
411
|
}
|
|
437
412
|
/**
|
|
438
|
-
* The closing message when the
|
|
413
|
+
* The closing message when the install already configured a connection.
|
|
439
414
|
* Everything the manual steps would ask for is done, so this points the user
|
|
440
|
-
* at the next things they'll actually want: see what Ory is doing
|
|
441
|
-
* live
|
|
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
|
|
442
417
|
* no {@link NextStepsOpts} is supplied it degrades to the short launch summary.
|
|
443
418
|
*/
|
|
444
419
|
function printConfiguredNextStepsNow(harnessName, uninstallCmd, opts) {
|
|
445
420
|
ui.heading("Next steps:");
|
|
446
|
-
ui.success(
|
|
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.`);
|
|
447
424
|
if (!opts) {
|
|
448
425
|
ui.blank();
|
|
449
426
|
ui.hint(`To uninstall: ${ui.inlineCommand(uninstallCmd)}`);
|
|
450
427
|
return;
|
|
451
428
|
}
|
|
452
429
|
const npx = (0, cli_invocation_js_1.oryNpx)(opts.binName);
|
|
453
|
-
const
|
|
454
|
-
if (
|
|
455
|
-
ui.hint("
|
|
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>`)}.`);
|
|
456
434
|
ui.blank();
|
|
457
|
-
ui.bullet("1. See what's
|
|
435
|
+
ui.bullet("1. See what's happening — config and recent activity:");
|
|
458
436
|
ui.command(`${npx} status`);
|
|
459
|
-
ui.hint(` ...or watch it live: ${ui.inlineCommand(`${npx} watch`)}`);
|
|
460
437
|
ui.blank();
|
|
461
|
-
ui.bullet("2.
|
|
438
|
+
ui.bullet("2. Stream complete activity and debug output live:");
|
|
462
439
|
ui.command("export ORY_AGENT_DEBUG=true");
|
|
463
440
|
}
|
|
464
441
|
else {
|
|
465
|
-
ui.hint("It starts in
|
|
442
|
+
ui.hint("It starts in observe mode: every tool call is checked, but nothing is blocked yet.");
|
|
466
443
|
ui.blank();
|
|
467
|
-
ui.bullet("1. See what
|
|
444
|
+
ui.bullet("1. See what's happening — config and permission coverage:");
|
|
468
445
|
ui.command(`${npx} status`);
|
|
469
|
-
ui.hint(` ...or watch the trace stream live: ${ui.inlineCommand(`${npx} watch`)}`);
|
|
470
446
|
ui.blank();
|
|
471
|
-
ui.bullet("2. Turn on enforcement once the
|
|
472
|
-
ui.
|
|
473
|
-
ui.hint(`
|
|
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`)}.`);
|
|
474
450
|
ui.blank();
|
|
475
|
-
ui.bullet("3.
|
|
451
|
+
ui.bullet("3. Stream complete activity and debug output live:");
|
|
476
452
|
ui.command("export ORY_AGENT_DEBUG=true");
|
|
477
453
|
}
|
|
478
454
|
ui.blank();
|
|
@@ -480,24 +456,21 @@ function printConfiguredNextStepsNow(harnessName, uninstallCmd, opts) {
|
|
|
480
456
|
}
|
|
481
457
|
function printNextStepsNow(harnessName, uninstallCmd) {
|
|
482
458
|
ui.heading("Next steps:");
|
|
483
|
-
ui.bullet("1.
|
|
459
|
+
ui.bullet("1. Optional — connect Ory Agent Security with the project URL from the Ory Console:");
|
|
460
|
+
ui.command("configure --project-url <URL>");
|
|
461
|
+
ui.hint(" ...or set it per-session via an env var:");
|
|
484
462
|
ui.command("export ORY_PROJECT_URL=https://your-project.projects.oryapis.com");
|
|
485
|
-
ui.
|
|
486
|
-
ui.
|
|
487
|
-
ui.
|
|
488
|
-
ui.
|
|
489
|
-
ui.hint("
|
|
490
|
-
ui.
|
|
491
|
-
ui.command("export ORY_OAUTH2_CLIENT_ID=<public OAuth2 client id>");
|
|
492
|
-
ui.hint(` Without these, ${harnessName} runs without a human Ory identity attached`);
|
|
493
|
-
ui.hint(" to the session and permission checks fall back to a session:<id> subject.");
|
|
494
|
-
ui.hint(" The OAuth2 client id is the public client (no secret) you registered in");
|
|
495
|
-
ui.hint(" your Ory project with the four loopback redirect URIs.");
|
|
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.");
|
|
496
469
|
ui.blank();
|
|
497
|
-
ui.bullet("
|
|
470
|
+
ui.bullet("2. Optionally enable debug logging:");
|
|
498
471
|
ui.command("export ORY_AGENT_DEBUG=true");
|
|
499
472
|
ui.blank();
|
|
500
|
-
ui.bullet(`
|
|
473
|
+
ui.bullet(`3. Start ${harnessName} in your project directory.`);
|
|
501
474
|
ui.blank();
|
|
502
475
|
ui.hint(`To uninstall: ${ui.inlineCommand(uninstallCmd)}`);
|
|
503
476
|
}
|
package/dist/status-cli.d.ts
CHANGED
|
@@ -1,18 +1,33 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Render the "User identity" block.
|
|
3
|
-
*
|
|
2
|
+
* Render the "User identity" block. The interactive PKCE login runs every
|
|
3
|
+
* session; this shows the cached token's subject and expiry, if any.
|
|
4
4
|
*/
|
|
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 "
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
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 →
|
|
32
|
-
*
|
|
47
|
+
* → sub-agent identities → permissions → hooks & plugin → environment →
|
|
48
|
+
* recent activity from the unified activity/debug log.
|
|
33
49
|
*
|
|
34
|
-
* Each section degrades gracefully —
|
|
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
|
*/
|