@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
@@ -0,0 +1,140 @@
1
+ /** The broker header a runtime credential must occupy for a request. */
2
+ export type RuntimeAuthorizationHeader = "authorization" | "x-ory-agent-authorization";
3
+ export interface RuntimeAuthenticatedRequest {
4
+ url: string;
5
+ init: RequestInit;
6
+ authorizationHeader: RuntimeAuthorizationHeader;
7
+ /** Default transport. An mTLS authenticator may ignore this and use its own transport. */
8
+ fetch: typeof fetch;
9
+ /** Whether `fetch` is the core's default transport rather than an injected implementation. */
10
+ usesDefaultFetch?: boolean;
11
+ }
12
+ /**
13
+ * Executes one noninteractive Agent Security request. Custom Agent SDK
14
+ * integrations can use this hook to attach a SPIFFE workload identity and run
15
+ * the request over mTLS without exposing key material to Argus.
16
+ */
17
+ export type RuntimeRequestAuthenticator = (request: RuntimeAuthenticatedRequest) => Promise<Response>;
18
+ export type RuntimeCredentialKind = "talos" | "injected";
19
+ export interface RuntimeCredential {
20
+ kind: RuntimeCredentialKind;
21
+ subject?: string;
22
+ authenticate: RuntimeRequestAuthenticator;
23
+ }
24
+ export interface ResolveRuntimeCredentialOptions {
25
+ env?: NodeJS.ProcessEnv;
26
+ requestAuthenticator?: RuntimeRequestAuthenticator;
27
+ subject?: string;
28
+ fetch?: typeof fetch;
29
+ }
30
+ export interface EnrollTalosRuntimeCredentialOptions {
31
+ projectUrl: string;
32
+ agentSecurityUrl: string;
33
+ userToken: string;
34
+ name: string;
35
+ idempotencyKey: string;
36
+ fetch?: typeof fetch;
37
+ signal?: AbortSignal;
38
+ credentialStore?: TalosCredentialStore;
39
+ identity?: TalosCredentialIdentity;
40
+ /** @internal Injectable seam for testing default-fetch TLS setup. */
41
+ configureSystemCaTrust?: () => void;
42
+ }
43
+ export interface EnrolledRuntimeCredential {
44
+ credential: RuntimeCredential;
45
+ actorId: string;
46
+ warnings: string[];
47
+ }
48
+ export type TalosCredentialIdentity = {
49
+ projectUrl: string;
50
+ harness: string;
51
+ sessionId: string;
52
+ kind: "agent";
53
+ } | {
54
+ projectUrl: string;
55
+ harness: string;
56
+ sessionId: string;
57
+ kind: "subagent";
58
+ subAgentType: string;
59
+ perSpawnId: string;
60
+ };
61
+ export interface StoredTalosCredentialV2 {
62
+ version: 2;
63
+ credential: string;
64
+ actorId: string;
65
+ credentialId?: string;
66
+ expiresAt?: string;
67
+ identity: TalosCredentialIdentity;
68
+ }
69
+ export interface StoredTalosCredentialV1 {
70
+ version: 1;
71
+ credential: string;
72
+ actorId: string;
73
+ }
74
+ export type StoredTalosCredential = StoredTalosCredentialV1 | StoredTalosCredentialV2;
75
+ export type TalosCredentialStoreIdentity = TalosCredentialIdentity | string;
76
+ export interface TalosCredentialStore {
77
+ load(identity: TalosCredentialStoreIdentity): Promise<StoredTalosCredential | undefined>;
78
+ save(identity: TalosCredentialStoreIdentity, secret: StoredTalosCredential): Promise<void>;
79
+ }
80
+ export interface CredentialStoreCommandOptions {
81
+ input?: string;
82
+ }
83
+ export type CredentialStoreCommandRunner = (command: string, args: string[], options?: CredentialStoreCommandOptions) => Promise<{
84
+ stdout: string;
85
+ }>;
86
+ export interface OsTalosCredentialStoreOptions {
87
+ platform?: NodeJS.Platform;
88
+ runCommand?: CredentialStoreCommandRunner;
89
+ }
90
+ export interface NodeTlsCaProvider {
91
+ getCACertificates?: (type?: "default" | "system" | "bundled" | "extra") => string[];
92
+ setDefaultCACertificates?: (certificates: ReadonlyArray<string | NodeJS.ArrayBufferView>) => void;
93
+ }
94
+ /**
95
+ * Make subsequent default Node TLS connections trust both Node's existing CA
96
+ * set and the operating system trust store. This is process-local and does not
97
+ * disable certificate verification.
98
+ */
99
+ export declare function configureSystemCaTrustForDefaultFetch(provider?: NodeTlsCaProvider): boolean;
100
+ export declare class CredentialStoreCommandError extends Error {
101
+ readonly exitCode?: number | undefined;
102
+ readonly causeCode?: string | undefined;
103
+ constructor(message: string, exitCode?: number | undefined, causeCode?: string | undefined);
104
+ }
105
+ export declare const runCredentialStoreCommand: CredentialStoreCommandRunner;
106
+ /** Normalize equivalent project URLs before deriving their credential-store key. */
107
+ export declare function canonicalProjectUrl(projectUrl: string): string;
108
+ export declare function canonicalCredentialIdentity(identity: TalosCredentialStoreIdentity): TalosCredentialIdentity;
109
+ export declare function credentialAccount(identity: TalosCredentialStoreIdentity): string;
110
+ /** OS-backed Talos store. Secrets are never placed in process arguments. */
111
+ export declare function createOsTalosCredentialStore(options?: OsTalosCredentialStoreOptions): TalosCredentialStore;
112
+ export declare function talosRuntimeCredential(apiKey: string, options?: {
113
+ subject?: string;
114
+ fetch?: typeof fetch;
115
+ /** @internal Injectable seam for testing default-fetch TLS setup. */
116
+ configureSystemCaTrust?: () => void;
117
+ }): RuntimeCredential;
118
+ /** Resolve only noninteractive runtime credentials. No persisted state is read. */
119
+ export declare function resolveRuntimeCredential(options?: ResolveRuntimeCredentialOptions): RuntimeCredential | undefined;
120
+ /** Explicitly enroll a Talos credential and optionally persist it in an OS store. */
121
+ export declare function enrollTalosRuntimeCredential(options: EnrollTalosRuntimeCredentialOptions): Promise<EnrolledRuntimeCredential>;
122
+ export interface EnrollTalosChildRuntimeCredentialOptions {
123
+ projectUrl: string;
124
+ agentSecurityUrl: string;
125
+ name: string;
126
+ subAgentType: string;
127
+ idempotencyKey: string;
128
+ parentCredential: RuntimeCredential;
129
+ identity: Extract<TalosCredentialIdentity, {
130
+ kind: "subagent";
131
+ }>;
132
+ fetch?: typeof fetch;
133
+ signal?: AbortSignal;
134
+ credentialStore?: TalosCredentialStore;
135
+ }
136
+ /** Enroll a separately keyed child using the authenticated parent runtime. */
137
+ export declare function enrollTalosChildRuntimeCredential(options: EnrollTalosChildRuntimeCredentialOptions): Promise<EnrolledRuntimeCredential>;
138
+ export declare function authenticatedRuntimeRequest(credential: RuntimeCredential, request: Omit<RuntimeAuthenticatedRequest, "fetch" | "usesDefaultFetch"> & {
139
+ fetch?: typeof fetch;
140
+ }): Promise<Response>;