@ory/continue 0.13.9 → 0.14.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 CHANGED
@@ -25,12 +25,14 @@ npx -y -p @ory/continue ory-cn install
25
25
 
26
26
  Continue has no native install command, so this writes the Ory hooks into your project settings and drops the Ory skills into your project — Continue turns each skill into a slash command automatically (so the local Ory commands show up as `/ory-local-up`, `/ory-local-down`, and `/ory-temporal-up`).
27
27
 
28
- You'll be asked how you want to connect — **press Enter for the default**:
28
+ It opens a guided setup **in your browser** where you pick how to connect — the default takes just a click:
29
29
 
30
30
  - **Ory Network** *(default)* — sign in, or create a free account, in your browser. The project, keys, permissions, and login are all set up for you. Nothing to configure by hand.
31
31
  - **Local** — run a complete Ory on your laptop with Docker. No account, no signup, no keys. Great for trying it out.
32
32
  - **Audit-only** — skip Ory entirely and just log what Continue does.
33
33
 
34
+ > No browser available (CI, SSH, headless)? The same walkthrough runs right in your terminal instead — or force it with `--no-web`.
35
+
34
36
  That's it. Confirm everything landed with:
35
37
 
36
38
  ```bash
@@ -58,6 +60,7 @@ Under the hood, Continue runs the plugin the same way [Claude Code](https://gith
58
60
  Everything the plugin does is observable out of the box — no configuration required:
59
61
 
60
62
  - **Status at a glance.** `npx -y -p @ory/continue ory-cn status` shows what's configured, who's signed in, how many built-in tools your permissions cover, and the most recent tool-call activity.
63
+ - **Live dashboard.** `npx -y -p @ory/continue ory-cn dashboard` opens the same picture in your browser — configuration, identities, permission coverage, Ory service health, and the latest tool-call activity, all refreshing live. From there you can flip **enforcement** on or off, toggle **user login**, and use **Change stack** to reconnect to a different Ory — no CLI required.
61
64
  - **Live traces.** Every tool call is recorded as an OpenTelemetry-style span. Watch them stream as the agent works:
62
65
 
63
66
  ```bash
@@ -75,7 +78,7 @@ When the watch-mode logs look right, turn on blocking with one command (setup al
75
78
  npx -y -p @ory/continue ory-cn permissions enforce
76
79
  ```
77
80
 
78
- Now a denied tool is actually blocked. Go back to watch mode anytime with `permissions observe`. Use `permissions status` to see what's covered and `permissions bootstrap` to (re-)grant the built-in tools.
81
+ Now a denied tool is actually blocked. Go back to watch mode anytime with `permissions observe`. Prefer clicking? The dashboard has the same **Enforce** switch — flip it on, or back to watch mode, without touching the CLI. Use `permissions status` to see what's covered and `permissions bootstrap` to (re-)grant the built-in tools.
79
82
 
80
83
  ## Also: add login to your own app
81
84
 
@@ -90,8 +93,7 @@ The guided setup covers most people. For scripted or CI setups, or to point at a
90
93
  ```bash
91
94
  npx -y -p @ory/continue ory-cn configure \
92
95
  --project-url https://<slug>.projects.oryapis.com \
93
- --oauth2-client-id <login client id> \
94
- --user-login
96
+ --oauth2-client-id <login client id>
95
97
  ```
96
98
 
97
99
  Continue's own identity registers itself automatically on first run — nothing to create. The `--oauth2-client-id` is the one piece browser sign-in needs; the guided setup makes it for you, or see below to do it by hand. For logging-only with no checks, use `--audit-only`.
@@ -103,7 +105,7 @@ The guided setup normally does this. To do it yourself, create a **public** OAut
103
105
 
104
106
  ```bash
105
107
  ory create oauth2-client --project <project-id> \
106
- --name "ory-agent-plugin" \
108
+ --name "Ory Agent Security · user login (PKCE)" \
107
109
  --grant-type authorization_code,refresh_token \
108
110
  --response-type code \
109
111
  --scope openid,offline_access \
@@ -123,11 +125,12 @@ With nothing configured, the plugin still loads and runs in **pass-through mode*
123
125
  ## Commands
124
126
 
125
127
  ```
126
- ory-cn install | uninstall Install/remove; --reconfigure re-runs setup, --no-configure skips it
128
+ ory-cn install | uninstall Install/remove; --reconfigure re-runs setup, --no-web forces the terminal wizard, --no-configure skips it
127
129
  ory-cn status Show configuration, identities, permission coverage, recent activity
130
+ ory-cn dashboard Open the live browser dashboard (status + service health + Change stack)
128
131
  ory-cn watch Tail the live trace stream (OTel spans)
129
132
  ory-cn permissions <cmd> status | bootstrap | observe (watch) | enforce (block)
130
- ory-cn configure <flags> Point at a project by hand (--project-url, --oauth2-client-id, --user-login, --audit-only)
133
+ ory-cn configure <flags> Point at a project by hand (--project-url, --oauth2-client-id, --audit-only)
131
134
  ory-cn agent <status|unregister> Manage Continue's own auto-created identity
132
135
  ```
133
136
 
package/dist/cli/main.js CHANGED
@@ -103,6 +103,12 @@ function main() {
103
103
  case "watch":
104
104
  (0, argus_1.runWatchCommand)("continue", args);
105
105
  break;
106
+ case "dashboard":
107
+ (0, argus_1.runDashboardCommand)("ory-cn", "continue", args).then((code) => process.exit(code), (err) => {
108
+ console.error(err.message ?? err);
109
+ process.exit(1);
110
+ });
111
+ break;
106
112
  case "version":
107
113
  case "--version":
108
114
  case "-v":
@@ -146,7 +152,7 @@ function printQuickstart() {
146
152
  console.log("Quickstart:");
147
153
  console.log(" 1. Inside Continue, run /local-up to start a local Ory stack.");
148
154
  console.log(" 2. Ask Continue \"add Ory auth to this app\" to scaffold login/signup.");
149
- console.log(" 3. Set ORY_USER_LOGIN=true to enable the interactive PKCE browser login.");
155
+ console.log(" 3. Set ORY_OAUTH2_CLIENT_ID so the per-session PKCE browser login can complete.");
150
156
  }
151
157
  async function status() {
152
158
  await (0, argus_1.runStatusCommand)("ory-cn", "continue", {
@@ -173,6 +179,7 @@ Commands:
173
179
  permissions <cmd> Manage permission mode and tool permissions (status, bootstrap, observe, enforce)
174
180
  setup [--project-dir] Write hooks directly to .continue/settings.json
175
181
  status Show plugin status and configuration
182
+ dashboard Open the Ory Agent dashboard (system health + configuration)
176
183
  watch [trace-file] Tail the trace stream (OTel spans) live
177
184
  version Show version and the ory-agent-plugins build commit
178
185
  local <cmd> Manage local Ory dev environment (up, down, status, seed, ...)
package/dist/handlers.js CHANGED
@@ -70,13 +70,12 @@ async function handleSessionStart(input, client, deps) {
70
70
  attributes: { model: input.model, source: input.source },
71
71
  });
72
72
  // Run the user login (interactive PKCE on first session, refresh when
73
- // needed). Continue dispatches SessionStart as a subprocess hook that can
74
- // hard-block via exit code 2, so allowBlock is true.
73
+ // needed). This runs on every session and never blocks — enforcement is
74
+ // governed solely by permissionMode at tool-call time.
75
75
  const userGate = deps.userLogin ?? argus_1.ensureUserAuthenticated;
76
- const decision = await userGate(client, {
76
+ await userGate(client, {
77
77
  binName: BIN_NAME,
78
78
  harness: HARNESS,
79
- allowBlock: true,
80
79
  });
81
80
  // Resolve the agent identity (machine credentials) regardless of how user
82
81
  // auth went — never blocks, attaches the agent's bearer token to outgoing
@@ -86,83 +85,8 @@ async function handleSessionStart(input, client, deps) {
86
85
  // Record the user→agent delegation for the audit trail. Best-effort,
87
86
  // fail-open, and written at most once per install.
88
87
  await (0, argus_1.writeUserDelegatesAgent)(client);
89
- if (!decision.proceed) {
90
- return { decision: "block", reason: decision.reason };
91
- }
92
- if (decision.mode !== "disabled") {
93
- return {};
94
- }
95
- const resolved = (0, argus_1.resolveConfig)();
96
- if (resolved.auditOnly) {
97
- client.logger.info("config.audit_only", {
98
- message: "Audit-only mode enabled. Auth and permission checks are disabled.",
99
- });
100
- return {};
101
- }
102
- if (!resolved.projectUrl) {
103
- client.logger.warn("config.not_configured", {
104
- message: "Ory plugin is not configured. Auth and permission checks are disabled. " +
105
- "Run 'npx ory-cn configure' to connect to an Ory project.",
106
- });
107
- return {};
108
- }
109
- // Try session token first, then OAuth2 token
110
- const sessionToken = process.env.ORY_SESSION_TOKEN;
111
- const oauth2Token = process.env.ORY_OAUTH2_TOKEN;
112
- if (sessionToken) {
113
- await verifySessionToken(sessionToken, client);
114
- return {};
115
- }
116
- if (oauth2Token) {
117
- await verifyOAuth2Token(oauth2Token, client);
118
- return {};
119
- }
120
- client.logger.warn("session.no_credentials", {
121
- message: "Neither ORY_SESSION_TOKEN nor ORY_OAUTH2_TOKEN is set. " +
122
- "Skipping authentication.",
123
- });
124
88
  return {};
125
89
  }
126
- async function verifySessionToken(token, client) {
127
- try {
128
- const session = await client.verifySession(token);
129
- if (!session.active) {
130
- client.logger.warn("session.inactive", {
131
- message: "Ory session is not active. Re-authenticate to enable auth checks.",
132
- });
133
- }
134
- }
135
- catch (err) {
136
- const oryErr = err;
137
- client.logger.warn("session.verify_failed", {
138
- code: oryErr.code,
139
- message: oryErr.message,
140
- });
141
- }
142
- }
143
- async function verifyOAuth2Token(token, client) {
144
- try {
145
- const tokenInfo = await client.introspectToken(token);
146
- if (!tokenInfo.active) {
147
- client.logger.warn("oauth2.token_inactive", {
148
- message: "Ory OAuth2 token is not active. Obtain a new token to enable auth checks.",
149
- });
150
- return;
151
- }
152
- client.logger.info("oauth2.session_authenticated", {
153
- clientId: tokenInfo.clientId,
154
- subject: tokenInfo.subject,
155
- scope: tokenInfo.scope,
156
- });
157
- }
158
- catch (err) {
159
- const oryErr = err;
160
- client.logger.warn("oauth2.introspect_failed", {
161
- code: oryErr.code,
162
- message: oryErr.message,
163
- });
164
- }
165
- }
166
90
  // ─── PreToolUse ─────────────────────────────────────────────────────
167
91
  async function handlePreToolUse(input, client, deps = {}) {
168
92
  const toolName = input.tool_name ?? "unknown";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ory/continue",
3
- "version": "0.13.9",
3
+ "version": "0.14.0",
4
4
  "description": "Ory plugin for Continue CLI (cn): scaffolding skills, a local Ory instance, and authentication, authorization, and audit for every tool call",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://ory.com",
@@ -68,7 +68,7 @@
68
68
  ],
69
69
  "dependencies": {
70
70
  "reo-census": "^1.2.8",
71
- "@ory/argus": "0.13.9"
71
+ "@ory/argus": "0.14.0"
72
72
  },
73
73
  "engines": {
74
74
  "node": ">=22"