@ory/argus 0.14.0 → 1.0.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 +31 -46
- 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 +39 -91
- package/assets/skills/ory-e2b-sandbox/SKILL.md +18 -17
- package/assets/skills/ory-temporal-worker/SKILL.md +31 -33
- package/assets/skills/permissions-onboarding/SKILL.md +131 -104
- package/dist/adapters.d.ts +88 -32
- package/dist/adapters.js +443 -164
- package/dist/agent-auth.d.ts +226 -67
- package/dist/agent-auth.js +951 -205
- package/dist/auth-store.d.ts +37 -2
- package/dist/auth-store.js +37 -3
- package/dist/auth.d.ts +33 -4
- package/dist/auth.js +163 -20
- package/dist/bash-parser.d.ts +98 -0
- package/dist/bash-parser.js +396 -0
- package/dist/branding.d.ts +77 -16
- package/dist/branding.js +93 -23
- 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 -239
- package/dist/client.d.ts +175 -138
- package/dist/client.js +672 -391
- package/dist/config.d.ts +217 -54
- package/dist/config.js +461 -42
- package/dist/context.d.ts +10 -0
- package/dist/context.js +21 -0
- package/dist/contract-suite.d.ts +3 -5
- package/dist/contract-suite.js +75 -47
- 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 +28 -23
- package/dist/index.js +173 -58
- 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.js +7 -7
- 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 +159 -36
- package/dist/local/ports.d.ts +158 -0
- package/dist/local/ports.js +443 -0
- package/dist/local/seed.d.ts +13 -5
- package/dist/local/seed.js +62 -38
- 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 +21 -37
- package/dist/runtime-credential.d.ts +140 -0
- package/dist/runtime-credential.js +572 -0
- package/dist/runtime.d.ts +413 -0
- package/dist/runtime.js +825 -0
- package/dist/setup.d.ts +23 -47
- package/dist/setup.js +59 -116
- package/dist/skills.js +0 -7
- package/dist/status-cli.d.ts +27 -11
- package/dist/status-cli.js +121 -115
- package/dist/status-data.d.ts +116 -17
- package/dist/status-data.js +121 -38
- 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 +71 -34
- package/dist/uninstall.js +217 -85
- package/dist/user-login.d.ts +9 -10
- package/dist/user-login.js +56 -75
- package/dist/watch-cli.d.ts +6 -0
- package/dist/watch-cli.js +217 -0
- package/package.json +4 -27
- package/assets/commands/dashboard.md +0 -34
- package/dist/dashboard-cli.d.ts +0 -8
- package/dist/dashboard-cli.js +0 -70
- package/dist/dev.d.ts +0 -103
- package/dist/dev.js +0 -583
- package/dist/interactive-setup.d.ts +0 -286
- package/dist/interactive-setup.js +0 -1734
- 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/project-api-key.d.ts +0 -69
- package/dist/project-api-key.js +0 -147
- package/dist/setup-actions.d.ts +0 -232
- package/dist/setup-actions.js +0 -507
- 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/web/api.d.ts +0 -33
- package/dist/web/api.js +0 -294
- package/dist/web/launch.d.ts +0 -11
- package/dist/web/launch.js +0 -96
- package/dist/web/server.d.ts +0 -20
- package/dist/web/server.js +0 -233
- package/dist/web/types.d.ts +0 -65
- package/dist/web/types.js +0 -2
- package/dist/webapp/assets/index-Wucl4SZs.css +0 -1
- package/dist/webapp/assets/index-m-GtEdq0.js +0 -49
- package/dist/webapp/favicon.ico +0 -0
- 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>;
|