@ory/continue 0.11.1 → 0.12.1

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
@@ -1,119 +1,150 @@
1
1
  # Ory Agent Plugin: Continue CLI
2
2
 
3
- [Ory](https://ory.com) bundled into [Continue](https://continue.dev)'s `cn` CLI: skills and slash commands that scaffold Ory authentication into your codebase, a local Ory stack you can spin up in one command, and (when pointed at an Ory project) authentication, authorization, and audit for every tool Continue runs.
3
+ Security and developer experience for [Continue](https://continue.dev)'s `cn` CLI, powered by [Ory](https://ory.com).
4
4
 
5
- You don't need an Ory account or any prior Ory experience to start.
5
+ **Security.** Continue runs real actions on your machine — editing files, running shell commands, calling APIs. The plugin gives every session a verifiable identity (you sign in once; Continue and any sub-agents it spawns each get their own), checks every tool call against permissions you control, and records each decision as an audit trace you can ship to your observability stack. It starts in watch mode so nothing is blocked on day one, and if Ory is ever unreachable it steps aside rather than locking you out.
6
6
 
7
- This integration targets the **`cn` CLI** (not the Continue IDE extension) and is verified against `@continuedev/cli`.
7
+ **Developer experience.** A single command installs the plugin and walks you through connecting — choose Ory Network, a local Docker stack, or audit-only, and it wires up the project, sign-in client, login, and permissions for you. It also helps you build Ory into your own app: ask in plain language to scaffold login, registration, and recovery pages, run a local Ory, or manage identities and permissions through the bundled MCP server.
8
8
 
9
- ## New to Ory?
9
+ This targets the **`cn` CLI** (not the Continue IDE extension), verified against `@continuedev/cli`.
10
10
 
11
- [Ory](https://www.ory.com/docs/) is an open-source identity and access platform — login, registration, sessions, social sign-in, multi-factor auth, and fine-grained permissions, so you don't have to build any of that yourself. Two things make it easy to try with no prior experience:
11
+ ## What you'll need
12
12
 
13
- - **Ory Elements** are prebuilt, themeable UI components for the auth pages. The scaffolding skills wire them into your app for you.
14
- - **The local Ory stack** is a complete Ory running on your laptop in Docker — no account, no signup, no API key.
13
+ - [Continue](https://continue.dev)'s `cn` CLI, installed
14
+ - Node.js **22 or newer**
15
+ - [Docker](https://docs.docker.com/get-docker/) — only if you want to run Ory locally
16
+ - macOS or Linux (Windows works via WSL2)
15
17
 
16
- ## What this plugin does
18
+ ## Get started
17
19
 
18
- Two independent things, and you can use either on its own:
20
+ Run one command. It installs the plugin and walks you through connecting:
19
21
 
20
- 1. **Build auth into your app.** Have Continue scaffold Ory login, registration, social sign-in, and permissions into the project you're working on, backed by the local stack. This needs nothing but Docker.
21
- 2. **Govern the agent itself.** Authenticate Continue's own session and authorize every tool it runs against Ory Permissions, with a full audit trail. See [Agent security](#agent-security).
22
+ ```bash
23
+ npx -y -p @ory/continue ory-cn install
24
+ ```
25
+
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`).
22
27
 
23
- ## Prerequisites
28
+ You'll be asked how you want to connect — **press Enter for the default**:
24
29
 
25
- - [Continue](https://continue.dev) `cn` CLI installed
26
- - Node.js **≥ 22**
27
- - [Docker](https://docs.docker.com/get-docker/) (only needed for the local Ory stack)
28
- - macOS or Linux. Windows works via WSL2.
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
+ - **Local** — run a complete Ory on your laptop with Docker. No account, no signup, no keys. Great for trying it out.
32
+ - **Audit-only** — skip Ory entirely and just log what Continue does.
29
33
 
30
- ## Install
34
+ That's it. Confirm everything landed with:
31
35
 
32
36
  ```bash
33
- npx -y -p @ory/continue ory-continue install
37
+ npx -y -p @ory/continue ory-cn status
34
38
  ```
35
39
 
36
- Continue has no native extension-install command, so `install` writes the Ory hooks directly into `<project>/.continue/settings.json` and materializes the Ory skills under `<project>/.continue/skills/`. Continue surfaces each skill as a slash command automatically, so the local-stack commands ship as skills too and surface as `/ory-local-up`, `/ory-local-down`, and `/ory-temporal-up`. Confirm everything landed:
40
+ `status` is your one-stop check: what's configured, who's signed in, which tools are covered by permissions, and recent activity. Anything not set up yet shows as `(unset)`.
37
41
 
38
- ```bash
39
- npx -y -p @ory/continue ory-continue status
40
- ```
42
+ > Re-run install with `--reconfigure` to change your connection later, or `--no-configure` to skip the wizard and configure by hand.
41
43
 
42
- `status` prints configuration, user and agent identity, per-tool permission coverage, hook/skill registration, and a tail of recent debug logs. Unconfigured fields show inline as `(unset)`.
44
+ ## What you get
43
45
 
44
- Uninstall removes only the Ory hooks and skills, leaving the rest of your settings intact:
46
+ Once connected, every tool Continue runs is governed by Ory — three things happen automatically:
45
47
 
46
- ```bash
47
- npx -y -p @ory/continue ory-continue uninstall
48
- ```
48
+ - **Who's driving.** You sign in once in your browser (a quick, secure handoff — no passwords or tokens to copy around). Continue itself registers its own identity automatically the first time it runs, and any sub-agents get their own too. The "who acted on whose behalf" trail stays queryable later.
49
+ - **What it's allowed to do.** Before a tool runs, Ory checks whether it's permitted. It starts in **watch mode** — nothing is blocked, you just *see* what would be — so it never gets in your way on day one.
50
+ - **A record of everything.** Every decision (allowed, denied, skipped) is logged as a trace you can send to Jaeger, Honeycomb, Grafana, or just a file.
49
51
 
50
- ## Quickstart (≈ 3 minutes)
52
+ If Ory is ever unreachable, the plugin gets out of the way and lets Continue keep working — so it can't lock you out.
51
53
 
52
- From any project where you'd like Ory authentication, inside Continue:
54
+ Under the hood, Continue runs the plugin the same way [Claude Code](https://github.com/anthropics/claude-code) does — as a small subprocess for each event — and it reads hooks from both `.continue/` and `.claude/` settings. When a tool is blocked, the plugin signals it with exit code 2 and Continue shows why.
53
55
 
54
- 1. **Start a local Ory instance.** Ask Continue *"start the local Ory stack"* or run `/ory-local-up`. A banner prints the seeded test user's email and password — note them.
55
- 2. **Scaffold Ory into your project.** Ask Continue *"add Ory auth to this app"* (the `ory-auth-setup` skill). It installs Ory Elements, wires the SDK, and generates the login / registration / recovery / settings pages, all targeting the local stack.
56
- 3. **Sign in.** Start your app, visit the login page, and sign in with the seeded credentials. You now have a real Ory session backed by a real Ory stack — locally, offline, zero configuration.
56
+ ### See what's happening
57
57
 
58
- That's the full Ory DX path. Continue to [Agent security](#agent-security) when you're ready to enforce.
58
+ Everything the plugin does is observable out of the box — no configuration required:
59
59
 
60
- ## How the integration works
60
+ - **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.
61
+ - **Live traces.** Every tool call is recorded as an OpenTelemetry-style span. Watch them stream as the agent works:
61
62
 
62
- Continue runs the Ory plugin as a **subprocess hook**, the same way [Claude Code](https://github.com/anthropics/claude-code) does — and Continue reads hooks from both `.continue/settings.json` and `.claude/settings.json`. Each lifecycle event launches the hook binary with the event payload as JSON on stdin; the hook replies on stdout and signals a hard block with **exit code 2**.
63
+ ```bash
64
+ npx -y -p @ory/continue ory-cn watch
65
+ ```
63
66
 
64
- The hooks wire into these phases:
67
+ Spans are also written to `~/.config/ory-agent-plugins/continue/ory-agent-trace.ndjson` (NDJSON, one span per line) — tail that file, or point `OTEL_EXPORTER_OTLP_ENDPOINT` at a collector to ship them straight to Jaeger, Honeycomb, or Grafana.
68
+ - **Debug log.** For a verbose play-by-play, set `ORY_AGENT_DEBUG=true`; structured logs land in `~/.config/ory-agent-plugins/continue/ory-agent-debug.log`.
65
69
 
66
- - **SessionStart** — run the user and agent auth gates.
67
- - **PreToolUse / PermissionRequest** — check the tool against Ory Permissions. In enforce mode a `PreToolUse` deny blocks the call with exit code 2, while a `PermissionRequest` deny is returned as a structured deny decision in the hook output. In observe mode a permission-request deny is recorded as an audit span and falls through to Continue's native user prompt — it is never pre-approved on the user's behalf.
68
- - **SubagentStart / SubagentStop** — resolve a distinct identity for typed sub-agents and record their lifecycle.
69
- - **PostToolUse / Stop / SessionEnd** — trace-only audit spans.
70
+ ### Ready to enforce?
70
71
 
71
- The plugin is **fail-open** on its own infrastructure failures (network errors, rate limits, missing config): the agent always starts, and enforcement is only as strong as your permission grants.
72
+ When the watch-mode logs look right, turn on blocking with one command (setup already granted you the built-in tools):
72
73
 
73
- ## Agent security
74
+ ```bash
75
+ npx -y -p @ory/continue ory-cn permissions enforce
76
+ ```
74
77
 
75
- Once pointed at an Ory project (local or hosted), Continue's session and every tool call can be governed by Ory.
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.
76
79
 
77
- - **Authentication.** The human at the keyboard (the **user**) authenticates interactively via Ory Identities when user login is on (`ORY_USER_LOGIN=true`, off by default — browser PKCE flow on first session, persisted token thereafter). The Continue process (the **agent**) gets its own OAuth2 identity, self-registered via [Dynamic Client Registration (RFC 7591)](https://datatracker.ietf.org/doc/html/rfc7591) on first run.
78
- - **Authorization.** Before any tool runs, the plugin checks [Ory Permissions](https://www.ory.com/docs/keto) (Zanzibar-style relations) against the user's subject and blocks on `deny`.
79
- - **Audit.** Every decision is recorded as a structured trace span (NDJSON file and/or OTLP export).
80
+ ## Also: add login to your own app
80
81
 
81
- ### Permission modes: observe → enforce
82
+ Beyond securing Continue, the plugin helps you build Ory into whatever you're working on. Ask Continue *"add Ory login to this app"* and it scaffolds the login, registration, recovery, and settings pages (using [Ory Elements](https://github.com/ory/elements)) wired to a local Ory — no signup or keys needed. Start that local Ory with `/ory-local-up` (it prints a test email + password to sign in with) and tear it down with `/ory-local-down`.
82
83
 
83
- After install the plugin runs in **observe mode**: every tool call is checked, but a deny is recorded as a `permission.observe_deny` audit span and the tool runs anyway. This lets you see what *would* be blocked first.
84
+ Bundled **skills** (just ask in plain language, and Continue surfaces each as a slash command) cover more: `ory-auth-setup`, `ory-login-flow`, `ory-social-login` (Google, GitHub, Apple…), `ory-permissions-onboarding`, and playbooks for wiring Ory into your own agents, E2B sandboxes, or Temporal workers.
84
85
 
85
- ```bash
86
- # Grant the current user `use` on every built-in tool (idempotent):
87
- npx -y -p @ory/continue ory-continue permissions bootstrap
86
+ ## Configure by hand (CI / advanced)
88
87
 
89
- # See allowed/denied per tool:
90
- npx -y -p @ory/continue ory-continue permissions status
88
+ The guided setup covers most people. For scripted or CI setups, or to point at an existing Ory Network project, configure directly. Settings are saved to `~/.config/ory-agent-plugins/config.json` and shared across all your Ory agent plugins; environment variables win when both are set.
91
89
 
92
- # Turn on hard blocking once the observe-mode logs look right:
93
- npx -y -p @ory/continue ory-continue permissions enforce
90
+ ```bash
91
+ npx -y -p @ory/continue ory-cn configure \
92
+ --project-url https://<slug>.projects.oryapis.com \
93
+ --oauth2-client-id <login client id> \
94
+ --user-login
94
95
  ```
95
96
 
96
- Switch back any time with `permissions observe`. To disable Ory entirely (audit logging only, no auth or checks), run `ory-continue configure --audit-only`.
97
+ 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`.
97
98
 
98
- ## Pointing at a real Ory project
99
+ <details>
100
+ <summary>Create the sign-in client by hand</summary>
99
101
 
100
- The Quickstart uses the local stack. To point at a hosted [Ory Network](https://console.ory.sh) project:
102
+ The guided setup normally does this. To do it yourself, create a **public** OAuth2 client (no secret) listing all four loopback URLs — the plugin tries each in turn so sign-in survives a busy port:
101
103
 
102
104
  ```bash
103
- npx -y -p @ory/continue ory-continue configure \
104
- --project-url https://<id>.projects.oryapis.com \
105
- --oauth2-client-id <public OAuth2 client id>
105
+ ory create oauth2-client --project <project-id> \
106
+ --name "ory-agent-plugin" \
107
+ --grant-type authorization_code,refresh_token \
108
+ --response-type code \
109
+ --scope openid,offline_access \
110
+ --token-endpoint-auth-method none \
111
+ --redirect-uri http://127.0.0.1:47823/callback \
112
+ --redirect-uri http://127.0.0.1:47824/callback \
113
+ --redirect-uri http://127.0.0.1:47825/callback \
114
+ --redirect-uri http://127.0.0.1:47826/callback
106
115
  ```
107
116
 
108
- `--oauth2-client-id` is required whenever `--project-url` is set — the user PKCE flow needs a public OAuth2 client registered with the four loopback redirect URIs (`http://127.0.0.1:47823..47826/callback`). See the [repo README](../../README.md) and [`AGENTS.md`](../../AGENTS.md) for the full environment-variable reference (`ORY_PROJECT_URL`, `ORY_USER_LOGIN`, `ORY_OAUTH2_CLIENT_ID`, agent-identity vars) and permission-mode semantics. Config is shared across every Ory agent plugin at `~/.config/ory-agent-plugins/config.json`.
117
+ Pass the resulting id to `configure --oauth2-client-id`. Running headless with a session token already? Set `ORY_USER_SESSION_TOKEN` and skip the browser step entirely.
118
+
119
+ </details>
120
+
121
+ With nothing configured, the plugin still loads and runs in **pass-through mode**: skills and their slash commands work, but no checks run and nothing is blocked. Perfectly fine if you only want the app-building features.
122
+
123
+ ## Commands
124
+
125
+ ```
126
+ ory-cn install | uninstall Install/remove; --reconfigure re-runs setup, --no-configure skips it
127
+ ory-cn status Show configuration, identities, permission coverage, recent activity
128
+ ory-cn watch Tail the live trace stream (OTel spans)
129
+ 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)
131
+ ory-cn agent <status|unregister> Manage Continue's own auto-created identity
132
+ ```
133
+
134
+ All prefixed with `npx -y -p @ory/continue`.
135
+
136
+ ## Troubleshooting
109
137
 
110
- Without configuration the plugin still loads cleanly and runs in **pass-through mode**: skills and their slash commands work, but nothing is blocked.
138
+ - **`/ory-local-up` fails** — make sure Docker is running and ports `4000`, `4100`, `4455`, and `16686` are free.
139
+ - **Browser sign-in loops** — reset with `ory-cn agent unregister` and try again.
140
+ - **`npx` grabbed an old version** — force the latest: `npx -y -p @ory/continue@latest ory-cn …`.
141
+ - **Hooks stuck on an old version** — re-run the installer.
142
+ - **Want to see what's happening** — `npx -y -p @ory/continue ory-cn status` for a snapshot, `npx -y -p @ory/continue ory-cn watch` for the live trace stream, or set `ORY_AGENT_DEBUG=true` for a verbose log. Traces and logs live under `~/.config/ory-agent-plugins/continue/` (see [See what's happening](#see-whats-happening)).
111
143
 
112
- ## Links
144
+ ## Learn more
113
145
 
114
- - [Ory documentation](https://www.ory.com/docs/)
146
+ - [Ory documentation](https://www.ory.com/docs/) · [Ory Console](https://console.ory.sh) · [Ory Elements](https://github.com/ory/elements)
115
147
  - [Continue documentation](https://docs.continue.dev/)
116
- - [Repo README](../../README.md) and [AGENTS.md](../../AGENTS.md) — full env-var and permission-mode reference
117
148
 
118
149
  ## License
119
150
 
@@ -56,7 +56,7 @@ const argus_1 = require("@ory/argus");
56
56
  const HARNESS = "continue";
57
57
  const PACKAGE_NAME = "@ory/continue";
58
58
  const RENDER_OPTS = {
59
- binName: "ory-continue",
59
+ binName: "ory-cn",
60
60
  packageName: PACKAGE_NAME,
61
61
  };
62
62
  function safeRmEmpty(dir) {
@@ -3,12 +3,12 @@
3
3
  * Main CLI for @ory/continue.
4
4
  *
5
5
  * Usage:
6
- * npx ory-continue install Write hooks to settings.json + assets
7
- * npx ory-continue uninstall Remove hooks and assets
8
- * npx ory-continue configure Set or view Ory credentials
9
- * npx ory-continue setup [--project-dir] Write hooks to settings.json directly
10
- * npx ory-continue status Show plugin status
11
- * npx ory-continue local <cmd> Manage local Ory dev environment
6
+ * npx ory-cn install Write hooks to settings.json + assets
7
+ * npx ory-cn uninstall Remove hooks and assets
8
+ * npx ory-cn configure Set or view Ory credentials
9
+ * npx ory-cn setup [--project-dir] Write hooks to settings.json directly
10
+ * npx ory-cn status Show plugin status
11
+ * npx ory-cn local <cmd> Manage local Ory dev environment
12
12
  *
13
13
  * Continue (the `cn` CLI) has no extension-install command, so `install` is a
14
14
  * thin wrapper over the same settings.json setup path the README documents.
package/dist/cli/main.js CHANGED
@@ -4,12 +4,12 @@
4
4
  * Main CLI for @ory/continue.
5
5
  *
6
6
  * Usage:
7
- * npx ory-continue install Write hooks to settings.json + assets
8
- * npx ory-continue uninstall Remove hooks and assets
9
- * npx ory-continue configure Set or view Ory credentials
10
- * npx ory-continue setup [--project-dir] Write hooks to settings.json directly
11
- * npx ory-continue status Show plugin status
12
- * npx ory-continue local <cmd> Manage local Ory dev environment
7
+ * npx ory-cn install Write hooks to settings.json + assets
8
+ * npx ory-cn uninstall Remove hooks and assets
9
+ * npx ory-cn configure Set or view Ory credentials
10
+ * npx ory-cn setup [--project-dir] Write hooks to settings.json directly
11
+ * npx ory-cn status Show plugin status
12
+ * npx ory-cn local <cmd> Manage local Ory dev environment
13
13
  *
14
14
  * Continue (the `cn` CLI) has no extension-install command, so `install` is a
15
15
  * thin wrapper over the same settings.json setup path the README documents.
@@ -56,26 +56,31 @@ function main() {
56
56
  const [command, ...args] = process.argv.slice(2);
57
57
  switch (command) {
58
58
  case "install":
59
+ (0, argus_1.beginDeferNextSteps)();
59
60
  install(args);
60
- postInstallPermissions("ory-continue", "continue").then(() => process.exit(0), (err) => {
61
+ (0, argus_1.runPostInstall)("ory-cn", "continue", args).then(() => process.exit(0), (err) => {
61
62
  console.error(err.message ?? err);
62
63
  process.exit(1);
63
64
  });
64
65
  break;
65
66
  case "uninstall":
66
67
  uninstall(args);
68
+ (0, argus_1.clearCredentialsForUninstall)().then(() => process.exit(0), (err) => {
69
+ console.error(err.message ?? err);
70
+ process.exit(1);
71
+ });
67
72
  break;
68
73
  case "configure":
69
- (0, argus_1.runConfigureCommand)("ory-continue", args);
74
+ (0, argus_1.runConfigureCommand)("ory-cn", args);
70
75
  break;
71
76
  case "agent":
72
- (0, argus_1.runAgentCommand)("ory-continue", args).then((code) => process.exit(code), (err) => {
77
+ (0, argus_1.runAgentCommand)("ory-cn", args).then((code) => process.exit(code), (err) => {
73
78
  console.error(err.message ?? err);
74
79
  process.exit(1);
75
80
  });
76
81
  break;
77
82
  case "permissions":
78
- (0, argus_1.runPermissionsCommand)("ory-continue", "continue", args).then((code) => process.exit(code), (err) => {
83
+ (0, argus_1.runPermissionsCommand)("ory-cn", "continue", args).then((code) => process.exit(code), (err) => {
79
84
  console.error(err.message ?? err);
80
85
  process.exit(1);
81
86
  });
@@ -90,11 +95,14 @@ function main() {
90
95
  });
91
96
  break;
92
97
  case "local":
93
- (0, argus_1.runLocalCommand)("ory-continue", args).catch((err) => {
98
+ (0, argus_1.runLocalCommand)("ory-cn", args).catch((err) => {
94
99
  console.error(err.message ?? err);
95
100
  process.exit(1);
96
101
  });
97
102
  break;
103
+ case "watch":
104
+ (0, argus_1.runWatchCommand)("continue", args);
105
+ break;
98
106
  case "help":
99
107
  case "--help":
100
108
  case "-h":
@@ -117,19 +125,13 @@ function install(args) {
117
125
  process.argv = ["node", "setup.js", ...args];
118
126
  require("./setup.js");
119
127
  printQuickstart();
120
- (0, argus_1.printEnvHelp)("ory-continue");
128
+ (0, argus_1.printEnvHelp)("ory-cn");
121
129
  }
122
130
  function uninstall(args) {
123
131
  const setupArgs = ["--uninstall", ...args];
124
132
  process.argv = ["node", "setup.js", ...setupArgs];
125
133
  require("./setup.js");
126
134
  }
127
- async function postInstallPermissions(binName, harness) {
128
- const bootstrapped = await (0, argus_1.maybeAutoBootstrap)(binName, harness);
129
- (0, argus_1.printPermissionsOnboardingHelp)(binName, harness, {
130
- bootstrappedAutomatically: bootstrapped,
131
- });
132
- }
133
135
  /**
134
136
  * Print a three-line quickstart so a fresh user sees the happy path
135
137
  * before the more detailed credentials and permissions banners scroll by.
@@ -142,7 +144,7 @@ function printQuickstart() {
142
144
  console.log(" 3. Set ORY_USER_LOGIN=true to enable the interactive PKCE browser login.");
143
145
  }
144
146
  async function status() {
145
- await (0, argus_1.runStatusCommand)("ory-continue", "continue", {
147
+ await (0, argus_1.runStatusCommand)("ory-cn", "continue", {
146
148
  title: "Continue CLI",
147
149
  printPluginSection: () => {
148
150
  console.log("Hooks & plugin:");
@@ -153,10 +155,10 @@ async function status() {
153
155
  }
154
156
  function help() {
155
157
  console.log(`
156
- ory-continue — Ory plugin for Continue CLI (cn)
158
+ ory-cn — Ory plugin for Continue CLI (cn)
157
159
 
158
160
  Usage:
159
- npx ory-continue <command> [options]
161
+ npx -y -p @ory/continue ory-cn <command> [options]
160
162
 
161
163
  Commands:
162
164
  install Write Ory hooks and skills into .continue/
@@ -166,6 +168,7 @@ Commands:
166
168
  permissions <cmd> Manage permission mode and tool permissions (status, bootstrap, observe, enforce)
167
169
  setup [--project-dir] Write hooks directly to .continue/settings.json
168
170
  status Show plugin status and configuration
171
+ watch [trace-file] Tail the trace stream (OTel spans) live
169
172
  local <cmd> Manage local Ory dev environment (up, down, status, seed, ...)
170
173
 
171
174
  After installing, the plugin hooks into these Continue CLI lifecycle events:
@@ -174,9 +177,9 @@ After installing, the plugin hooks into these Continue CLI lifecycle events:
174
177
  PostToolUse Audit log tool executions
175
178
 
176
179
  Examples:
177
- npx ory-continue install # Install hooks + assets
178
- npx ory-continue status # Check configuration
179
- npx ory-continue uninstall # Remove hooks + assets
180
+ npx -y -p @ory/continue ory-cn install # Install hooks + assets
181
+ npx -y -p @ory/continue ory-cn status # Check configuration
182
+ npx -y -p @ory/continue ory-cn uninstall # Remove hooks + assets
180
183
  `);
181
184
  }
182
185
  main();
@@ -6,10 +6,10 @@
6
6
  * directly into the harness's settings.json.
7
7
  *
8
8
  * Usage:
9
- * npx ory-continue-setup # Auto-detect and configure
10
- * npx ory-continue-setup --project-dir /path/to/repo
11
- * npx ory-continue-setup --print # Print config to stdout without writing
12
- * npx ory-continue-setup --uninstall # Remove Ory hooks from settings
9
+ * npx ory-cn-setup # Auto-detect and configure
10
+ * npx ory-cn-setup --project-dir /path/to/repo
11
+ * npx ory-cn-setup --print # Print config to stdout without writing
12
+ * npx ory-cn-setup --uninstall # Remove Ory hooks from settings
13
13
  *
14
14
  * Verified against @continuedev/cli: Continue reads a top-level `hooks` object
15
15
  * from `.continue/settings.json` (also `.claude/settings.json` and home
package/dist/cli/setup.js CHANGED
@@ -7,10 +7,10 @@
7
7
  * directly into the harness's settings.json.
8
8
  *
9
9
  * Usage:
10
- * npx ory-continue-setup # Auto-detect and configure
11
- * npx ory-continue-setup --project-dir /path/to/repo
12
- * npx ory-continue-setup --print # Print config to stdout without writing
13
- * npx ory-continue-setup --uninstall # Remove Ory hooks from settings
10
+ * npx ory-cn-setup # Auto-detect and configure
11
+ * npx ory-cn-setup --project-dir /path/to/repo
12
+ * npx ory-cn-setup --print # Print config to stdout without writing
13
+ * npx ory-cn-setup --uninstall # Remove Ory hooks from settings
14
14
  *
15
15
  * Verified against @continuedev/cli: Continue reads a top-level `hooks` object
16
16
  * from `.continue/settings.json` (also `.claude/settings.json` and home
@@ -54,7 +54,7 @@ const fs = __importStar(require("node:fs"));
54
54
  const path = __importStar(require("node:path"));
55
55
  const argus_1 = require("@ory/argus");
56
56
  const assets_js_1 = require("./assets.js");
57
- const BIN_NAME = "ory-continue-hook";
57
+ const BIN_NAME = "ory-cn-hook";
58
58
  const PACKAGE_NAME = "@ory/continue";
59
59
  function getSettingsPath(args) {
60
60
  return path.join(args.projectDir, ".continue", "settings.json");
@@ -77,7 +77,7 @@ function generateHooksConfig() {
77
77
  }
78
78
  function main() {
79
79
  if (process.argv.includes("--help") || process.argv.includes("-h")) {
80
- (0, argus_1.printSetupHelp)("ory-continue-setup", "Continue CLI");
80
+ (0, argus_1.printSetupHelp)("ory-cn-setup", "Continue CLI");
81
81
  process.exit(0);
82
82
  }
83
83
  const args = (0, argus_1.parseSetupArgs)();
@@ -109,6 +109,18 @@ function main() {
109
109
  (0, assets_js_1.installContinueOryAssets)(continueDir);
110
110
  console.log(`Ory hooks and MCP server installed to ${settingsPath}`);
111
111
  console.log(`Ory skills installed to ${continueDir}`);
112
- (0, argus_1.printNextSteps)("Continue CLI", "npx ory-continue-setup --uninstall");
112
+ (0, argus_1.printNextSteps)("Continue CLI", "npx -y -p @ory/continue ory-cn-setup --uninstall", {
113
+ binName: "ory-cn",
114
+ harness: "continue",
115
+ });
113
116
  }
114
117
  main();
118
+ // When invoked directly as the `-setup` bin with `--uninstall`, also clear
119
+ // stored Ory credentials. When required by the plugin's main CLI, that
120
+ // command owns the purge, so the `require.main` guard prevents a double run.
121
+ if (require.main === module && process.argv.includes("--uninstall")) {
122
+ (0, argus_1.clearCredentialsForUninstall)().then(() => process.exit(0), (err) => {
123
+ console.error(err.message ?? err);
124
+ process.exit(1);
125
+ });
126
+ }
package/dist/handlers.js CHANGED
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.handleHookEvent = handleHookEvent;
4
4
  const argus_1 = require("@ory/argus");
5
5
  const HARNESS = "continue";
6
- const BIN_NAME = "ory-continue";
6
+ const BIN_NAME = "ory-cn";
7
7
  /**
8
8
  * Route a Continue CLI hook event to the appropriate Ory integration.
9
9
  *
@@ -102,7 +102,7 @@ async function handleSessionStart(input, client, deps) {
102
102
  if (!resolved.projectUrl) {
103
103
  client.logger.warn("config.not_configured", {
104
104
  message: "Ory plugin is not configured. Auth and permission checks are disabled. " +
105
- "Run 'npx ory-continue configure' to connect to an Ory project.",
105
+ "Run 'npx ory-cn configure' to connect to an Ory project.",
106
106
  });
107
107
  return {};
108
108
  }
package/dist/settings.js CHANGED
@@ -67,7 +67,7 @@ function generateSettings(hookScriptPath) {
67
67
  * Generate settings assuming the plugin is installed via npm/pnpm.
68
68
  */
69
69
  function generateInstalledSettings() {
70
- return generateSettings("ory-continue-hook");
70
+ return generateSettings("ory-cn-hook");
71
71
  }
72
72
  /**
73
73
  * Generate settings pointing to a local dev build.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ory/continue",
3
- "version": "0.11.1",
3
+ "version": "0.12.1",
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",
@@ -57,9 +57,9 @@
57
57
  }
58
58
  },
59
59
  "bin": {
60
- "ory-continue": "dist/cli/main.js",
61
- "ory-continue-hook": "dist/hook.js",
62
- "ory-continue-setup": "dist/cli/setup.js"
60
+ "ory-cn": "dist/cli/main.js",
61
+ "ory-cn-hook": "dist/hook.js",
62
+ "ory-cn-setup": "dist/cli/setup.js"
63
63
  },
64
64
  "files": [
65
65
  "dist",
@@ -67,7 +67,8 @@
67
67
  "!dist/**/*.tsbuildinfo"
68
68
  ],
69
69
  "dependencies": {
70
- "@ory/argus": "0.11.1"
70
+ "reo-census": "^1.2.8",
71
+ "@ory/argus": "0.12.1"
71
72
  },
72
73
  "engines": {
73
74
  "node": ">=22"