@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
@@ -4,6 +4,7 @@
4
4
  * Each function returns the file content as a string. The local manager
5
5
  * writes these into .ory-dev/ory/ at runtime so Docker Compose can mount them.
6
6
  */
7
+ import { type ResolvedLocalPorts } from "./ports.js";
7
8
  export type ConsoleSource = "env" | "default";
8
9
  export interface GatewayConfig {
9
10
  /** Path under GATEWAY_URL that returns 2xx when the gateway is ready. */
@@ -63,6 +64,29 @@ export declare function getGatewayConfig(): GatewayConfig;
63
64
  * root** (two levels up) — see {@link monorepoRootForConsoleApp}.
64
65
  */
65
66
  export declare function getConsoleConfig(projectRoot?: string): ConsoleConfig;
67
+ export interface OathkeeperConfig {
68
+ /** Whether to front the Keto `/user/*` read path with Oathkeeper. */
69
+ enabled: boolean;
70
+ }
71
+ /**
72
+ * Resolve whether the local stack should front Keto's token-authenticated
73
+ * `/user/*` read path with a real **Oathkeeper** service.
74
+ *
75
+ * **On by default** so the local stack mirrors the hosted token-introspection
76
+ * contract: an Oathkeeper service configured like the hosted
77
+ * `ory-corp:cloud:keto:read:user-token` rule — `oauth2_introspection`
78
+ * authenticator against Hydra, `allow` authorizer, `noop` mutator, `strip_path:/user`
79
+ * upstream to keto-read — so a valid plugin OAuth2 access token is *required* to
80
+ * read permissions locally, exactly as it is on a hosted Ory project. (The
81
+ * plugin's agent DCR / user PKCE tokens are populated before any permission read
82
+ * runs, so this is transparent in the normal flow.)
83
+ *
84
+ * Set `ORY_LOCAL_OATHKEEPER=0` (also `false`/`no`/`off`) to opt out and fall back
85
+ * to a transparent nginx passthrough that strips `/user` and forwards straight to
86
+ * keto-read with **no** auth — a leaner stack that matches the hosted *path shape*
87
+ * only, useful when iterating on something unrelated to the auth layer.
88
+ */
89
+ export declare function getOathkeeperConfig(): OathkeeperConfig;
66
90
  /**
67
91
  * Render the docker-compose YAML.
68
92
  *
@@ -70,32 +94,64 @@ export declare function getConsoleConfig(projectRoot?: string): ConsoleConfig;
70
94
  * emitted. When omitted, it is resolved via `getConsoleConfig(projectRoot)`.
71
95
  * The nginx API gateway and the login UI are always emitted.
72
96
  */
73
- export declare function dockerComposeYaml(projectRoot?: string, consoleCfg?: ConsoleConfig): string;
97
+ export declare function dockerComposeYaml(projectRoot?: string, consoleCfg?: ConsoleConfig, oathkeeperCfg?: OathkeeperConfig): string;
74
98
  export declare function kratosConfigYaml(): string;
75
99
  export declare function kratosIdentitySchema(): string;
76
100
  export declare function ketoConfigYaml(): string;
77
101
  export declare function hydraConfigYaml(): string;
102
+ /**
103
+ * Oathkeeper server config. Only written when `ORY_LOCAL_OATHKEEPER` is set.
104
+ *
105
+ * Serves the proxy (the gateway forwards `/user/*` here) and the API port, and
106
+ * declares the handlers the access rule references: the `oauth2_introspection`
107
+ * authenticator introspects the plugin's OAuth2 access token against Hydra's
108
+ * admin introspection endpoint, `allow` authorizes, and `noop` mutates. Rules
109
+ * use the `regexp` matching strategy so the `/user/*` URL pattern resolves.
110
+ */
111
+ export declare function oathkeeperConfigYaml(): string;
112
+ /**
113
+ * Oathkeeper access rule mirroring the hosted
114
+ * `ory-corp:cloud:keto:read:user-token` rule: token-introspect the caller,
115
+ * `allow`, and forward to keto-read with the `/user` prefix stripped. Scoped to
116
+ * the same read surface as hosted — `/user/relation-tuples*` and
117
+ * `/user/namespaces*` — on GET/HEAD/POST.
118
+ */
119
+ export declare function oathkeeperAccessRulesYaml(): string;
78
120
  /**
79
121
  * Nginx config that acts as a unified API gateway, replicating what
80
122
  * Ory Network does: route all API paths to the correct backend service
81
123
  * so the @ory/client SDK works with a single basePath.
82
124
  */
83
- export declare function nginxConf(): string;
84
- export declare const GATEWAY_PORT = 4000;
85
- export declare const GATEWAY_URL = "http://localhost:4000";
86
- export declare const CONSOLE_PORT = 4100;
87
- export declare const CONSOLE_URL = "http://localhost:4100";
88
- export declare const LOGIN_UI_PORT = 4455;
89
- export declare const LOGIN_UI_URL = "http://localhost:4455";
90
- export declare const KRATOS_PUBLIC_PORT = 4433;
91
- export declare const KRATOS_ADMIN_PORT = 4434;
92
- export declare const KETO_READ_PORT = 4466;
93
- export declare const KETO_WRITE_PORT = 4467;
94
- export declare const HYDRA_PUBLIC_PORT = 4444;
95
- export declare const HYDRA_ADMIN_PORT = 4445;
96
- export declare const JAEGER_UI_PORT = 16686;
97
- export declare const JAEGER_OTLP_HTTP_PORT = 4318;
98
- export declare const JAEGER_UI_URL = "http://localhost:16686";
99
- export declare const JAEGER_OTLP_HTTP_URL = "http://localhost:4318";
125
+ export declare function nginxConf(oathkeeperEnabled?: boolean): string;
126
+ /**
127
+ * Problems found while resolving ports (an unparseable value, an offset that
128
+ * runs off the end of the port range, two services pinned to one port). The
129
+ * manager prints these before starting so a typo'd override doesn't silently
130
+ * fall back to a default the user thought they had changed.
131
+ */
132
+ export declare const LOCAL_PORT_WARNINGS: readonly string[];
133
+ /** The host every generated URL advertises, and where that value came from. */
134
+ export declare const LOCAL_STACK_HOST: string;
135
+ export declare const LOCAL_STACK_HOST_SOURCE: import("./ports.js").LocalHostSource;
136
+ export declare const GATEWAY_PORT: number;
137
+ export declare const GATEWAY_URL: string;
138
+ export declare const CONSOLE_PORT: number;
139
+ export declare const CONSOLE_URL: string;
140
+ export declare const LOGIN_UI_PORT: number;
141
+ export declare const LOGIN_UI_URL: string;
142
+ export declare const KRATOS_PUBLIC_PORT: number;
143
+ export declare const KRATOS_ADMIN_PORT: number;
144
+ export declare const KETO_READ_PORT: number;
145
+ export declare const KETO_WRITE_PORT: number;
146
+ export declare const HYDRA_PUBLIC_PORT: number;
147
+ export declare const HYDRA_ADMIN_PORT: number;
148
+ export declare const HYDRA_TOKEN_USER_PORT: number;
149
+ /** Oathkeeper proxy port — the gateway forwards `/user/*` here when
150
+ * `ORY_LOCAL_OATHKEEPER` is set. Defaults clear of the login-UI port. */
151
+ export declare const OATHKEEPER_PROXY_PORT: number;
152
+ /** Oathkeeper API/rules port. */
153
+ export declare const OATHKEEPER_API_PORT: number;
154
+ /** The resolved host-port set, for the preflight check and `local status`. */
155
+ export declare function getLocalPorts(): ResolvedLocalPorts;
100
156
  /** URL the manager probes to confirm the gateway is healthy. */
101
157
  export declare function gatewayHealthUrl(): string;