@ogment-ai/cli 0.6.0 → 0.7.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/dist/cli.js +21382 -4
- package/dist/cli.js.map +1 -0
- package/package.json +46 -53
- package/README.md +0 -134
- package/dist/cli/commands.d.ts +0 -37
- package/dist/cli/commands.d.ts.map +0 -1
- package/dist/cli/commands.js +0 -56
- package/dist/cli/execute.d.ts +0 -11
- package/dist/cli/execute.d.ts.map +0 -1
- package/dist/cli/execute.js +0 -468
- package/dist/cli/invocations.d.ts +0 -31
- package/dist/cli/invocations.d.ts.map +0 -1
- package/dist/cli/invocations.js +0 -1
- package/dist/cli/parse-errors.d.ts +0 -17
- package/dist/cli/parse-errors.d.ts.map +0 -1
- package/dist/cli/parse-errors.js +0 -184
- package/dist/cli/program.d.ts +0 -10
- package/dist/cli/program.d.ts.map +0 -1
- package/dist/cli/program.js +0 -174
- package/dist/cli/run.d.ts +0 -6
- package/dist/cli/run.d.ts.map +0 -1
- package/dist/cli/run.js +0 -83
- package/dist/cli/runtime.d.ts +0 -21
- package/dist/cli/runtime.d.ts.map +0 -1
- package/dist/cli/runtime.js +0 -80
- package/dist/cli.d.ts +0 -4
- package/dist/cli.d.ts.map +0 -1
- package/dist/commands/auth.d.ts +0 -19
- package/dist/commands/auth.d.ts.map +0 -1
- package/dist/commands/auth.js +0 -21
- package/dist/commands/catalog.d.ts +0 -31
- package/dist/commands/catalog.d.ts.map +0 -1
- package/dist/commands/catalog.js +0 -167
- package/dist/commands/context.d.ts +0 -15
- package/dist/commands/context.d.ts.map +0 -1
- package/dist/commands/context.js +0 -1
- package/dist/commands/invoke.d.ts +0 -17
- package/dist/commands/invoke.d.ts.map +0 -1
- package/dist/commands/invoke.js +0 -173
- package/dist/commands/server-context.d.ts +0 -14
- package/dist/commands/server-context.d.ts.map +0 -1
- package/dist/commands/server-context.js +0 -26
- package/dist/commands/status.d.ts +0 -12
- package/dist/commands/status.d.ts.map +0 -1
- package/dist/commands/status.js +0 -5
- package/dist/index.d.ts +0 -4
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -3
- package/dist/infra/credentials.d.ts +0 -22
- package/dist/infra/credentials.d.ts.map +0 -1
- package/dist/infra/credentials.js +0 -74
- package/dist/infra/env.d.ts +0 -15
- package/dist/infra/env.d.ts.map +0 -1
- package/dist/infra/env.js +0 -100
- package/dist/infra/http.d.ts +0 -16
- package/dist/infra/http.d.ts.map +0 -1
- package/dist/infra/http.js +0 -84
- package/dist/output/envelope.d.ts +0 -22
- package/dist/output/envelope.d.ts.map +0 -1
- package/dist/output/envelope.js +0 -67
- package/dist/output/manager.d.ts +0 -47
- package/dist/output/manager.d.ts.map +0 -1
- package/dist/output/manager.js +0 -120
- package/dist/services/account.d.ts +0 -16
- package/dist/services/account.d.ts.map +0 -1
- package/dist/services/account.js +0 -75
- package/dist/services/auth.d.ts +0 -37
- package/dist/services/auth.d.ts.map +0 -1
- package/dist/services/auth.js +0 -270
- package/dist/services/info.d.ts +0 -24
- package/dist/services/info.d.ts.map +0 -1
- package/dist/services/info.js +0 -316
- package/dist/services/mcp-error-mapping.d.ts +0 -9
- package/dist/services/mcp-error-mapping.d.ts.map +0 -1
- package/dist/services/mcp-error-mapping.js +0 -129
- package/dist/services/mcp.d.ts +0 -39
- package/dist/services/mcp.d.ts.map +0 -1
- package/dist/services/mcp.js +0 -169
- package/dist/shared/constants.d.ts +0 -5
- package/dist/shared/constants.d.ts.map +0 -1
- package/dist/shared/constants.js +0 -6
- package/dist/shared/error-codes.d.ts +0 -31
- package/dist/shared/error-codes.d.ts.map +0 -1
- package/dist/shared/error-codes.js +0 -25
- package/dist/shared/error-presentation.d.ts +0 -17
- package/dist/shared/error-presentation.d.ts.map +0 -1
- package/dist/shared/error-presentation.js +0 -151
- package/dist/shared/errors.d.ts +0 -146
- package/dist/shared/errors.d.ts.map +0 -1
- package/dist/shared/errors.js +0 -233
- package/dist/shared/exit-codes.d.ts +0 -15
- package/dist/shared/exit-codes.d.ts.map +0 -1
- package/dist/shared/exit-codes.js +0 -44
- package/dist/shared/guards.d.ts +0 -11
- package/dist/shared/guards.d.ts.map +0 -1
- package/dist/shared/guards.js +0 -29
- package/dist/shared/recovery.d.ts +0 -5
- package/dist/shared/recovery.d.ts.map +0 -1
- package/dist/shared/recovery.js +0 -123
- package/dist/shared/schema-example.d.ts +0 -3
- package/dist/shared/schema-example.d.ts.map +0 -1
- package/dist/shared/schema-example.js +0 -105
- package/dist/shared/schemas.d.ts +0 -14
- package/dist/shared/schemas.d.ts.map +0 -1
- package/dist/shared/schemas.js +0 -14
- package/dist/shared/types.d.ts +0 -225
- package/dist/shared/types.d.ts.map +0 -1
- package/dist/shared/types.js +0 -1
package/dist/infra/env.js
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import { execSync } from "node:child_process";
|
|
2
|
-
import { homedir } from "node:os";
|
|
3
|
-
import { join } from "node:path";
|
|
4
|
-
import { DEFAULT_OGMENT_BASE_URL, VERSION } from "../shared/constants.js";
|
|
5
|
-
export const createRuntimeConfig = (env = process.env, homeDirectory = homedir()) => {
|
|
6
|
-
const configDir = join(homeDirectory, ".config", "ogment");
|
|
7
|
-
const hasBaseUrlOverride = typeof env["OGMENT_BASE_URL"] === "string";
|
|
8
|
-
return {
|
|
9
|
-
baseUrl: env["OGMENT_BASE_URL"] ?? DEFAULT_OGMENT_BASE_URL,
|
|
10
|
-
baseUrlSource: hasBaseUrlOverride ? "env" : "default",
|
|
11
|
-
configDir,
|
|
12
|
-
credentialsPath: join(configDir, "credentials.json"),
|
|
13
|
-
envApiKey: env["OGMENT_API_KEY"],
|
|
14
|
-
version: VERSION,
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
export const isInteractiveOutput = (stdout = process.stdout) => {
|
|
18
|
-
return Boolean(stdout.isTTY);
|
|
19
|
-
};
|
|
20
|
-
const getAncestorProcesses = () => {
|
|
21
|
-
try {
|
|
22
|
-
let pid = process.ppid;
|
|
23
|
-
const ancestors = [];
|
|
24
|
-
for (let depth = 0; depth < 5; depth += 1) {
|
|
25
|
-
const command = execSync(`ps -p ${pid} -o comm=`, { timeout: 500 }).toString().trim().split("/").pop() ??
|
|
26
|
-
"";
|
|
27
|
-
if (command.length === 0) {
|
|
28
|
-
break;
|
|
29
|
-
}
|
|
30
|
-
ancestors.push(command);
|
|
31
|
-
const parentPid = execSync(`ps -p ${pid} -o ppid=`, { timeout: 500 }).toString().trim();
|
|
32
|
-
if (parentPid.length === 0 || parentPid === "0" || parentPid === "1") {
|
|
33
|
-
break;
|
|
34
|
-
}
|
|
35
|
-
pid = Number(parentPid);
|
|
36
|
-
}
|
|
37
|
-
return ancestors;
|
|
38
|
-
}
|
|
39
|
-
catch {
|
|
40
|
-
return [];
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
export const detectExecutionEnvironment = (env = process.env, getAncestors = getAncestorProcesses) => {
|
|
44
|
-
if (env["CURSOR_TRACE_ID"] !== undefined || env["CURSOR_SESSION_ID"] !== undefined) {
|
|
45
|
-
return "Cursor";
|
|
46
|
-
}
|
|
47
|
-
if (env["VSCODE_PID"] !== undefined || env["VSCODE_IPC_HOOK"] !== undefined) {
|
|
48
|
-
return "VS Code";
|
|
49
|
-
}
|
|
50
|
-
if (env["WINDSURF_SESSION_ID"] !== undefined) {
|
|
51
|
-
return "Windsurf";
|
|
52
|
-
}
|
|
53
|
-
if (typeof env["JETBRAINS_IDE"] === "string" && env["JETBRAINS_IDE"].length > 0) {
|
|
54
|
-
return env["JETBRAINS_IDE"];
|
|
55
|
-
}
|
|
56
|
-
if (env["CLAUDE_CODE_DISABLE_TELEMETRY"] !== undefined ||
|
|
57
|
-
env["CLAUDE_CODE_MAX_TOKENS"] !== undefined ||
|
|
58
|
-
env["CLAUDE_CODE_AUTO_APPROVE"] !== undefined) {
|
|
59
|
-
return "Claude Code";
|
|
60
|
-
}
|
|
61
|
-
if (env["CI"] !== undefined) {
|
|
62
|
-
return "CI";
|
|
63
|
-
}
|
|
64
|
-
const ancestors = getAncestors();
|
|
65
|
-
const ancestorNames = ancestors.join(" ").toLowerCase();
|
|
66
|
-
if (ancestorNames.includes("claude")) {
|
|
67
|
-
return "Claude Code";
|
|
68
|
-
}
|
|
69
|
-
if (ancestorNames.includes("codex")) {
|
|
70
|
-
return "Codex";
|
|
71
|
-
}
|
|
72
|
-
if (ancestorNames.includes("cursor")) {
|
|
73
|
-
return "Cursor";
|
|
74
|
-
}
|
|
75
|
-
if (ancestorNames.includes("windsurf")) {
|
|
76
|
-
return "Windsurf";
|
|
77
|
-
}
|
|
78
|
-
if (ancestorNames.includes("warp")) {
|
|
79
|
-
return "Warp";
|
|
80
|
-
}
|
|
81
|
-
if (ancestors.some((value) => value.toLowerCase() === "code")) {
|
|
82
|
-
return "VS Code";
|
|
83
|
-
}
|
|
84
|
-
if (env["TERM_PROGRAM"] === "iTerm.app") {
|
|
85
|
-
return "iTerm";
|
|
86
|
-
}
|
|
87
|
-
if (env["TERM_PROGRAM"] === "Apple_Terminal") {
|
|
88
|
-
return "Terminal.app";
|
|
89
|
-
}
|
|
90
|
-
if (env["TERM_PROGRAM"] === "WezTerm") {
|
|
91
|
-
return "WezTerm";
|
|
92
|
-
}
|
|
93
|
-
if (env["TERM_PROGRAM"] === "Hyper") {
|
|
94
|
-
return "Hyper";
|
|
95
|
-
}
|
|
96
|
-
if (typeof env["TERM_PROGRAM"] === "string" && env["TERM_PROGRAM"].length > 0) {
|
|
97
|
-
return env["TERM_PROGRAM"];
|
|
98
|
-
}
|
|
99
|
-
return "unknown";
|
|
100
|
-
};
|
package/dist/infra/http.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Result } from "better-result";
|
|
2
|
-
import { RemoteRequestError } from "../shared/errors.js";
|
|
3
|
-
export interface HttpClient {
|
|
4
|
-
request(input: RequestInfo | URL, init?: RequestInit, options?: {
|
|
5
|
-
operation?: string;
|
|
6
|
-
timeoutMs?: number;
|
|
7
|
-
}): Promise<Result<Response, RemoteRequestError>>;
|
|
8
|
-
}
|
|
9
|
-
interface HttpClientDeps {
|
|
10
|
-
defaultTimeoutMs?: number;
|
|
11
|
-
fetchFn?: typeof fetch;
|
|
12
|
-
}
|
|
13
|
-
export declare const createHttpClient: (deps?: HttpClientDeps) => HttpClient;
|
|
14
|
-
export declare const readResponseText: (response: Response) => Promise<string>;
|
|
15
|
-
export {};
|
|
16
|
-
//# sourceMappingURL=http.d.ts.map
|
package/dist/infra/http.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/infra/http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAIzD,MAAM,WAAW,UAAU;IACzB,OAAO,CACL,KAAK,EAAE,WAAW,GAAG,GAAG,EACxB,IAAI,CAAC,EAAE,WAAW,EAClB,OAAO,CAAC,EAAE;QACR,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,GACA,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,kBAAkB,CAAC,CAAC,CAAC;CAClD;AAED,UAAU,cAAc;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,CAAC,EAAE,OAAO,KAAK,CAAC;CACxB;AAcD,eAAO,MAAM,gBAAgB,GAAI,OAAM,cAAmB,KAAG,UAoE5D,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAU,UAAU,QAAQ,KAAG,OAAO,CAAC,MAAM,CAWzE,CAAC"}
|
package/dist/infra/http.js
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { Result } from "better-result";
|
|
2
|
-
import { RemoteRequestError } from "../shared/errors.js";
|
|
3
|
-
const DEFAULT_HTTP_TIMEOUT_MS = 10_000;
|
|
4
|
-
const isAbortError = (cause) => {
|
|
5
|
-
if (cause instanceof DOMException) {
|
|
6
|
-
return cause.name === "AbortError" || cause.name === "TimeoutError";
|
|
7
|
-
}
|
|
8
|
-
if (cause instanceof Error) {
|
|
9
|
-
return cause.name === "AbortError" || cause.name === "TimeoutError";
|
|
10
|
-
}
|
|
11
|
-
return false;
|
|
12
|
-
};
|
|
13
|
-
export const createHttpClient = (deps = {}) => {
|
|
14
|
-
const defaultTimeoutMs = deps.defaultTimeoutMs ?? DEFAULT_HTTP_TIMEOUT_MS;
|
|
15
|
-
const fetchFn = deps.fetchFn ?? fetch;
|
|
16
|
-
return {
|
|
17
|
-
request: async (input, init, options) => {
|
|
18
|
-
const abortController = new AbortController();
|
|
19
|
-
const timeoutMs = options?.timeoutMs ?? defaultTimeoutMs;
|
|
20
|
-
const cleanupCallbacks = [];
|
|
21
|
-
const abortWithReason = (reason) => {
|
|
22
|
-
if (!abortController.signal.aborted) {
|
|
23
|
-
abortController.abort(reason);
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
const upstreamSignal = init?.signal ?? undefined;
|
|
27
|
-
if (upstreamSignal !== undefined) {
|
|
28
|
-
if (upstreamSignal.aborted) {
|
|
29
|
-
abortWithReason(upstreamSignal.reason);
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
const onAbort = () => {
|
|
33
|
-
abortWithReason(upstreamSignal.reason);
|
|
34
|
-
};
|
|
35
|
-
upstreamSignal.addEventListener("abort", onAbort);
|
|
36
|
-
cleanupCallbacks.push(() => {
|
|
37
|
-
upstreamSignal.removeEventListener("abort", onAbort);
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
const timeoutId = setTimeout(() => {
|
|
42
|
-
abortWithReason(new DOMException("HTTP request timed out", "TimeoutError"));
|
|
43
|
-
}, timeoutMs);
|
|
44
|
-
cleanupCallbacks.push(() => {
|
|
45
|
-
clearTimeout(timeoutId);
|
|
46
|
-
});
|
|
47
|
-
const requestPromise = Result.tryPromise({
|
|
48
|
-
catch: (cause) => new RemoteRequestError({
|
|
49
|
-
message: isAbortError(cause) ? "HTTP request timed out" : "HTTP request failed",
|
|
50
|
-
...(options?.operation === undefined ? {} : { operation: options.operation }),
|
|
51
|
-
raw: cause instanceof Error
|
|
52
|
-
? {
|
|
53
|
-
message: cause.message,
|
|
54
|
-
name: cause.name,
|
|
55
|
-
stack: cause.stack,
|
|
56
|
-
}
|
|
57
|
-
: cause,
|
|
58
|
-
retryable: isAbortError(cause),
|
|
59
|
-
source: "network",
|
|
60
|
-
}),
|
|
61
|
-
try: async () => fetchFn(input, {
|
|
62
|
-
...init,
|
|
63
|
-
signal: abortController.signal,
|
|
64
|
-
}),
|
|
65
|
-
});
|
|
66
|
-
return requestPromise.finally(() => {
|
|
67
|
-
for (const cleanup of cleanupCallbacks) {
|
|
68
|
-
cleanup();
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
},
|
|
72
|
-
};
|
|
73
|
-
};
|
|
74
|
-
export const readResponseText = async (response) => {
|
|
75
|
-
return Result.tryPromise({
|
|
76
|
-
catch: () => "",
|
|
77
|
-
try: async () => response.text(),
|
|
78
|
-
}).then((result) => {
|
|
79
|
-
if (Result.isError(result)) {
|
|
80
|
-
return "";
|
|
81
|
-
}
|
|
82
|
-
return result.value;
|
|
83
|
-
});
|
|
84
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { AppError } from "../shared/errors.js";
|
|
2
|
-
import type { CliErrorEnvelope, CliNextAction, CliParseErrorPayload, CliPaginationMeta, CliSuccessEnvelope } from "../shared/types.js";
|
|
3
|
-
export interface EnvelopeContext {
|
|
4
|
-
command: string;
|
|
5
|
-
diagnostics?: Record<string, unknown>;
|
|
6
|
-
entity?: Record<string, unknown> | null;
|
|
7
|
-
includeDebug?: boolean;
|
|
8
|
-
nextActions?: CliNextAction[];
|
|
9
|
-
pagination?: CliPaginationMeta;
|
|
10
|
-
}
|
|
11
|
-
interface EnvelopeBuilderDeps {
|
|
12
|
-
createRequestId?: () => string;
|
|
13
|
-
now?: () => Date;
|
|
14
|
-
}
|
|
15
|
-
export interface EnvelopeBuilder {
|
|
16
|
-
error: (error: AppError, context: EnvelopeContext) => CliErrorEnvelope;
|
|
17
|
-
parseError: (payload: CliParseErrorPayload, context: EnvelopeContext) => CliErrorEnvelope;
|
|
18
|
-
success: <T>(data: T, context: EnvelopeContext) => CliSuccessEnvelope<T>;
|
|
19
|
-
}
|
|
20
|
-
export declare const createEnvelopeBuilder: (deps?: EnvelopeBuilderDeps) => EnvelopeBuilder;
|
|
21
|
-
export {};
|
|
22
|
-
//# sourceMappingURL=envelope.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"envelope.d.ts","sourceRoot":"","sources":["../../src/output/envelope.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,KAAK,EACV,gBAAgB,EAChB,aAAa,EACb,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAE5B,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACxC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,aAAa,EAAE,CAAC;IAC9B,UAAU,CAAC,EAAE,iBAAiB,CAAC;CAChC;AAED,UAAU,mBAAmB;IAC3B,eAAe,CAAC,EAAE,MAAM,MAAM,CAAC;IAC/B,GAAG,CAAC,EAAE,MAAM,IAAI,CAAC;CAClB;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,eAAe,KAAK,gBAAgB,CAAC;IACvE,UAAU,EAAE,CAAC,OAAO,EAAE,oBAAoB,EAAE,OAAO,EAAE,eAAe,KAAK,gBAAgB,CAAC;IAC1F,OAAO,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,eAAe,KAAK,kBAAkB,CAAC,CAAC,CAAC,CAAC;CAC1E;AAED,eAAO,MAAM,qBAAqB,GAAI,OAAM,mBAAwB,KAAG,eAqEtE,CAAC"}
|
package/dist/output/envelope.js
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { randomUUID } from "node:crypto";
|
|
2
|
-
import { presentRuntimeErrorPayload } from "../shared/error-presentation.js";
|
|
3
|
-
export const createEnvelopeBuilder = (deps = {}) => {
|
|
4
|
-
const createRequestId = deps.createRequestId ?? randomUUID;
|
|
5
|
-
const now = deps.now ?? (() => new Date());
|
|
6
|
-
const toMeta = (context) => {
|
|
7
|
-
const base = {
|
|
8
|
-
command: context.command,
|
|
9
|
-
};
|
|
10
|
-
if (context.pagination !== undefined) {
|
|
11
|
-
return {
|
|
12
|
-
...base,
|
|
13
|
-
pagination: context.pagination,
|
|
14
|
-
...(context.includeDebug === true
|
|
15
|
-
? {
|
|
16
|
-
entity: context.entity ?? null,
|
|
17
|
-
requestId: createRequestId(),
|
|
18
|
-
timestamp: now().toISOString(),
|
|
19
|
-
}
|
|
20
|
-
: {}),
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
return {
|
|
24
|
-
...base,
|
|
25
|
-
...(context.includeDebug === true
|
|
26
|
-
? {
|
|
27
|
-
entity: context.entity ?? null,
|
|
28
|
-
requestId: createRequestId(),
|
|
29
|
-
timestamp: now().toISOString(),
|
|
30
|
-
}
|
|
31
|
-
: {}),
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
return {
|
|
35
|
-
error: (error, context) => {
|
|
36
|
-
const payload = presentRuntimeErrorPayload(error, {
|
|
37
|
-
...(context.diagnostics === undefined ? {} : { contextDiagnostics: context.diagnostics }),
|
|
38
|
-
includeDebug: context.includeDebug === true,
|
|
39
|
-
});
|
|
40
|
-
return {
|
|
41
|
-
data: null,
|
|
42
|
-
error: payload,
|
|
43
|
-
meta: toMeta(context),
|
|
44
|
-
next_actions: context.nextActions ?? [],
|
|
45
|
-
ok: false,
|
|
46
|
-
};
|
|
47
|
-
},
|
|
48
|
-
parseError: (payload, context) => {
|
|
49
|
-
return {
|
|
50
|
-
data: null,
|
|
51
|
-
error: payload,
|
|
52
|
-
meta: toMeta(context),
|
|
53
|
-
next_actions: context.nextActions ?? [],
|
|
54
|
-
ok: false,
|
|
55
|
-
};
|
|
56
|
-
},
|
|
57
|
-
success: (data, context) => {
|
|
58
|
-
return {
|
|
59
|
-
data,
|
|
60
|
-
error: null,
|
|
61
|
-
meta: toMeta(context),
|
|
62
|
-
next_actions: context.nextActions ?? [],
|
|
63
|
-
ok: true,
|
|
64
|
-
};
|
|
65
|
-
},
|
|
66
|
-
};
|
|
67
|
-
};
|
package/dist/output/manager.d.ts
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { type AppError } from "../shared/errors.js";
|
|
2
|
-
import type { CliErrorEnvelope, CliNextAction, CliPaginationMeta, CliParseErrorPayload } from "../shared/types.js";
|
|
3
|
-
export type OutputMode = "human" | "json" | "quiet";
|
|
4
|
-
export interface OutputInitOptions {
|
|
5
|
-
debug?: boolean | undefined;
|
|
6
|
-
human: boolean | undefined;
|
|
7
|
-
json?: boolean | undefined;
|
|
8
|
-
quiet: boolean | undefined;
|
|
9
|
-
yes: boolean | undefined;
|
|
10
|
-
}
|
|
11
|
-
interface WritableLike {
|
|
12
|
-
write(chunk: string): boolean;
|
|
13
|
-
}
|
|
14
|
-
interface OutputManagerDeps {
|
|
15
|
-
createRequestId?: () => string;
|
|
16
|
-
isTty?: boolean;
|
|
17
|
-
noColor?: boolean;
|
|
18
|
-
now?: () => Date;
|
|
19
|
-
stderr?: WritableLike;
|
|
20
|
-
stdout?: WritableLike;
|
|
21
|
-
}
|
|
22
|
-
interface EnvelopeOptions {
|
|
23
|
-
command: string;
|
|
24
|
-
diagnostics?: Record<string, unknown>;
|
|
25
|
-
entity?: Record<string, unknown> | null;
|
|
26
|
-
nextActions?: CliNextAction[];
|
|
27
|
-
pagination?: CliPaginationMeta;
|
|
28
|
-
}
|
|
29
|
-
interface SuccessOptions extends EnvelopeOptions {
|
|
30
|
-
humanMessage?: string;
|
|
31
|
-
}
|
|
32
|
-
export declare class OutputManager {
|
|
33
|
-
#private;
|
|
34
|
-
constructor(deps?: OutputManagerDeps);
|
|
35
|
-
configure(options: OutputInitOptions): void;
|
|
36
|
-
get mode(): OutputMode;
|
|
37
|
-
get debug(): boolean;
|
|
38
|
-
error(error: AppError, options: EnvelopeOptions): CliErrorEnvelope;
|
|
39
|
-
parseError(payload: CliParseErrorPayload, options: EnvelopeOptions): CliErrorEnvelope;
|
|
40
|
-
info(message: string): void;
|
|
41
|
-
json(value: unknown): void;
|
|
42
|
-
success<T>(data: T, options: SuccessOptions): void;
|
|
43
|
-
writeStdout(chunk: string): void;
|
|
44
|
-
writeStderr(chunk: string): void;
|
|
45
|
-
}
|
|
46
|
-
export {};
|
|
47
|
-
//# sourceMappingURL=manager.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../src/output/manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,KAAK,EACV,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,oBAAoB,CAAC;AAG5B,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC;AAEpD,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC5B,KAAK,EAAE,OAAO,GAAG,SAAS,CAAC;IAC3B,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC3B,KAAK,EAAE,OAAO,GAAG,SAAS,CAAC;IAC3B,GAAG,EAAE,OAAO,GAAG,SAAS,CAAC;CAC1B;AAED,UAAU,YAAY;IACpB,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B;AAED,UAAU,iBAAiB;IACzB,eAAe,CAAC,EAAE,MAAM,MAAM,CAAC;IAC/B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,IAAI,CAAC;IACjB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB;AAED,UAAU,eAAe;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACxC,WAAW,CAAC,EAAE,aAAa,EAAE,CAAC;IAC9B,UAAU,CAAC,EAAE,iBAAiB,CAAC;CAChC;AAED,UAAU,cAAe,SAAQ,eAAe;IAC9C,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AA6BD,qBAAa,aAAa;;gBAOL,IAAI,GAAE,iBAAsB;IAUxC,SAAS,CAAC,OAAO,EAAE,iBAAiB,GAAG,IAAI;IAWlD,IAAW,IAAI,IAAI,UAAU,CAE5B;IAED,IAAW,KAAK,IAAI,OAAO,CAE1B;IAEM,KAAK,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,eAAe,GAAG,gBAAgB;IAoBlE,UAAU,CAAC,OAAO,EAAE,oBAAoB,EAAE,OAAO,EAAE,eAAe,GAAG,gBAAgB;IAmBrF,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAQ3B,IAAI,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI;IAI1B,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,cAAc,GAAG,IAAI;IAuBlD,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAIhC,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;CAGxC"}
|
package/dist/output/manager.js
DELETED
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import { appErrorMeta } from "../shared/errors.js";
|
|
2
|
-
import { createEnvelopeBuilder } from "./envelope.js";
|
|
3
|
-
const toJson = (value) => {
|
|
4
|
-
return `${JSON.stringify(value, null, 2)}\n`;
|
|
5
|
-
};
|
|
6
|
-
const mergeNextActions = (recovery, contextActions) => {
|
|
7
|
-
const merged = [
|
|
8
|
-
...(recovery === undefined || recovery === null ? [] : [recovery]),
|
|
9
|
-
...(contextActions ?? []),
|
|
10
|
-
];
|
|
11
|
-
const deduped = [];
|
|
12
|
-
const seen = new Set();
|
|
13
|
-
for (const action of merged) {
|
|
14
|
-
const key = `${action.id}::${action.command}`;
|
|
15
|
-
if (seen.has(key)) {
|
|
16
|
-
continue;
|
|
17
|
-
}
|
|
18
|
-
seen.add(key);
|
|
19
|
-
deduped.push(action);
|
|
20
|
-
}
|
|
21
|
-
return deduped;
|
|
22
|
-
};
|
|
23
|
-
export class OutputManager {
|
|
24
|
-
#envelopeBuilder;
|
|
25
|
-
#mode;
|
|
26
|
-
#debug = false;
|
|
27
|
-
#stderr;
|
|
28
|
-
#stdout;
|
|
29
|
-
constructor(deps = {}) {
|
|
30
|
-
this.#stderr = deps.stderr ?? process.stderr;
|
|
31
|
-
this.#stdout = deps.stdout ?? process.stdout;
|
|
32
|
-
this.#mode = "json";
|
|
33
|
-
this.#envelopeBuilder = createEnvelopeBuilder({
|
|
34
|
-
...(deps.createRequestId === undefined ? {} : { createRequestId: deps.createRequestId }),
|
|
35
|
-
...(deps.now === undefined ? {} : { now: deps.now }),
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
configure(options) {
|
|
39
|
-
if (options.quiet === true) {
|
|
40
|
-
this.#mode = "quiet";
|
|
41
|
-
}
|
|
42
|
-
else if (options.human === true && options.json !== true) {
|
|
43
|
-
this.#mode = "human";
|
|
44
|
-
}
|
|
45
|
-
else {
|
|
46
|
-
this.#mode = "json";
|
|
47
|
-
}
|
|
48
|
-
this.#debug = options.debug === true;
|
|
49
|
-
}
|
|
50
|
-
get mode() {
|
|
51
|
-
return this.#mode;
|
|
52
|
-
}
|
|
53
|
-
get debug() {
|
|
54
|
-
return this.#debug;
|
|
55
|
-
}
|
|
56
|
-
error(error, options) {
|
|
57
|
-
const envelope = this.#envelopeBuilder.error(error, {
|
|
58
|
-
...options,
|
|
59
|
-
includeDebug: this.#debug,
|
|
60
|
-
nextActions: mergeNextActions(appErrorMeta(error).recovery, options.nextActions),
|
|
61
|
-
});
|
|
62
|
-
if (this.#mode === "json") {
|
|
63
|
-
this.#stdout.write(toJson(envelope));
|
|
64
|
-
return envelope;
|
|
65
|
-
}
|
|
66
|
-
if (this.#mode === "quiet") {
|
|
67
|
-
return envelope;
|
|
68
|
-
}
|
|
69
|
-
this.#stderr.write(`${envelope.error.code}: ${envelope.error.detail}\n`);
|
|
70
|
-
return envelope;
|
|
71
|
-
}
|
|
72
|
-
parseError(payload, options) {
|
|
73
|
-
const envelope = this.#envelopeBuilder.parseError(payload, {
|
|
74
|
-
...options,
|
|
75
|
-
includeDebug: this.#debug,
|
|
76
|
-
});
|
|
77
|
-
if (this.#mode === "json") {
|
|
78
|
-
this.#stdout.write(toJson(envelope));
|
|
79
|
-
return envelope;
|
|
80
|
-
}
|
|
81
|
-
if (this.#mode === "quiet") {
|
|
82
|
-
return envelope;
|
|
83
|
-
}
|
|
84
|
-
this.#stderr.write(`${envelope.error.code}: ${envelope.error.detail}\n`);
|
|
85
|
-
return envelope;
|
|
86
|
-
}
|
|
87
|
-
info(message) {
|
|
88
|
-
if (this.#mode !== "human") {
|
|
89
|
-
return;
|
|
90
|
-
}
|
|
91
|
-
this.#stdout.write(`${message}\n`);
|
|
92
|
-
}
|
|
93
|
-
json(value) {
|
|
94
|
-
this.#stdout.write(toJson(value));
|
|
95
|
-
}
|
|
96
|
-
success(data, options) {
|
|
97
|
-
const envelope = this.#envelopeBuilder.success(data, {
|
|
98
|
-
...options,
|
|
99
|
-
includeDebug: this.#debug,
|
|
100
|
-
});
|
|
101
|
-
if (this.#mode === "json") {
|
|
102
|
-
this.#stdout.write(toJson(envelope));
|
|
103
|
-
return;
|
|
104
|
-
}
|
|
105
|
-
if (this.#mode === "quiet") {
|
|
106
|
-
return;
|
|
107
|
-
}
|
|
108
|
-
if (typeof options.humanMessage === "string" && options.humanMessage.length > 0) {
|
|
109
|
-
this.#stdout.write(`${options.humanMessage}\n`);
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
112
|
-
this.#stdout.write(toJson(data));
|
|
113
|
-
}
|
|
114
|
-
writeStdout(chunk) {
|
|
115
|
-
this.#stdout.write(chunk);
|
|
116
|
-
}
|
|
117
|
-
writeStderr(chunk) {
|
|
118
|
-
this.#stderr.write(chunk);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { Result as ResultType } from "better-result";
|
|
2
|
-
import type { HttpClient } from "../infra/http.js";
|
|
3
|
-
import { AuthError, RemoteRequestError, type ValidationError } from "../shared/errors.js";
|
|
4
|
-
import type { AccountProfile, ServerWithOrg } from "../shared/types.js";
|
|
5
|
-
export type FetchAccountError = AuthError | RemoteRequestError | ValidationError;
|
|
6
|
-
export interface AccountService {
|
|
7
|
-
fetchAccount(apiKey: string): Promise<ResultType<AccountProfile, FetchAccountError>>;
|
|
8
|
-
listServers(apiKey: string): Promise<ResultType<ServerWithOrg[], FetchAccountError>>;
|
|
9
|
-
}
|
|
10
|
-
interface AccountServiceDeps {
|
|
11
|
-
baseUrl: string;
|
|
12
|
-
httpClient: HttpClient;
|
|
13
|
-
}
|
|
14
|
-
export declare const createAccountService: (deps: AccountServiceDeps) => AccountService;
|
|
15
|
-
export {};
|
|
16
|
-
//# sourceMappingURL=account.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../../src/services/account.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,eAAe,CAAC;AAE1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAGnD,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAG1F,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExE,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,kBAAkB,GAAG,eAAe,CAAC;AAEjF,MAAM,WAAW,cAAc;IAC7B,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,cAAc,EAAE,iBAAiB,CAAC,CAAC,CAAC;IACrF,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,aAAa,EAAE,EAAE,iBAAiB,CAAC,CAAC,CAAC;CACtF;AAED,UAAU,kBAAkB;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,UAAU,CAAC;CACxB;AAQD,eAAO,MAAM,oBAAoB,GAAI,MAAM,kBAAkB,KAAG,cAoF/D,CAAC"}
|
package/dist/services/account.js
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { Result } from "better-result";
|
|
2
|
-
import { readResponseText } from "../infra/http.js";
|
|
3
|
-
import { ERROR_CODE } from "../shared/error-codes.js";
|
|
4
|
-
import { AuthError, RemoteRequestError } from "../shared/errors.js";
|
|
5
|
-
import { parseWithSchema } from "../shared/guards.js";
|
|
6
|
-
import { accountMeSchema } from "../shared/schemas.js";
|
|
7
|
-
const authHeader = (apiKey) => {
|
|
8
|
-
return {
|
|
9
|
-
Authorization: `Bearer ${apiKey}`,
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
export const createAccountService = (deps) => {
|
|
13
|
-
const fetchAccountOnce = async (apiKey) => {
|
|
14
|
-
const responseResult = await deps.httpClient.request(`${deps.baseUrl}/api/v1/mcp-auth/me`, {
|
|
15
|
-
headers: authHeader(apiKey),
|
|
16
|
-
});
|
|
17
|
-
if (Result.isError(responseResult)) {
|
|
18
|
-
return responseResult;
|
|
19
|
-
}
|
|
20
|
-
if (!responseResult.value.ok) {
|
|
21
|
-
if (responseResult.value.status === 401) {
|
|
22
|
-
return Result.err(new AuthError({
|
|
23
|
-
code: ERROR_CODE.authInvalidCredentials,
|
|
24
|
-
message: "Authentication failed. Run `ogment auth login` again.",
|
|
25
|
-
recovery: { command: "ogment auth login" },
|
|
26
|
-
}));
|
|
27
|
-
}
|
|
28
|
-
const body = await readResponseText(responseResult.value);
|
|
29
|
-
return Result.err(new RemoteRequestError({
|
|
30
|
-
body,
|
|
31
|
-
httpStatus: responseResult.value.status,
|
|
32
|
-
message: "Failed to fetch account details",
|
|
33
|
-
operation: "account/fetch",
|
|
34
|
-
raw: body,
|
|
35
|
-
source: "http",
|
|
36
|
-
}));
|
|
37
|
-
}
|
|
38
|
-
const jsonResult = await Result.tryPromise({
|
|
39
|
-
catch: () => new RemoteRequestError({
|
|
40
|
-
httpStatus: responseResult.value.status,
|
|
41
|
-
message: "Failed to parse account response JSON",
|
|
42
|
-
operation: "account/fetch",
|
|
43
|
-
source: "http",
|
|
44
|
-
}),
|
|
45
|
-
try: async () => responseResult.value.json(),
|
|
46
|
-
});
|
|
47
|
-
if (Result.isError(jsonResult)) {
|
|
48
|
-
return jsonResult;
|
|
49
|
-
}
|
|
50
|
-
const parsed = parseWithSchema(accountMeSchema, jsonResult.value, "account response");
|
|
51
|
-
if (Result.isError(parsed)) {
|
|
52
|
-
return parsed;
|
|
53
|
-
}
|
|
54
|
-
return Result.ok(parsed.value.data);
|
|
55
|
-
};
|
|
56
|
-
const fetchAccount = async (apiKey) => fetchAccountOnce(apiKey);
|
|
57
|
-
return {
|
|
58
|
-
fetchAccount,
|
|
59
|
-
listServers: async (apiKey) => {
|
|
60
|
-
const profileResult = await fetchAccount(apiKey);
|
|
61
|
-
if (Result.isError(profileResult)) {
|
|
62
|
-
return profileResult;
|
|
63
|
-
}
|
|
64
|
-
const servers = profileResult.value.orgs.flatMap((organization) => {
|
|
65
|
-
return organization.servers.map((server) => {
|
|
66
|
-
return {
|
|
67
|
-
...server,
|
|
68
|
-
orgSlug: organization.orgSlug,
|
|
69
|
-
};
|
|
70
|
-
});
|
|
71
|
-
});
|
|
72
|
-
return Result.ok(servers);
|
|
73
|
-
},
|
|
74
|
-
};
|
|
75
|
-
};
|
package/dist/services/auth.d.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import type { Result as ResultType } from "better-result";
|
|
2
|
-
import type { CredentialsStore } from "../infra/credentials.js";
|
|
3
|
-
import type { HttpClient } from "../infra/http.js";
|
|
4
|
-
import { AuthError, RemoteRequestError, UnexpectedError, ValidationError } from "../shared/errors.js";
|
|
5
|
-
import type { AuthStatusSuccess, LoginSuccess, LogoutSuccess } from "../shared/types.js";
|
|
6
|
-
export interface LoginPendingInfo {
|
|
7
|
-
userCode: string;
|
|
8
|
-
verificationUri: string;
|
|
9
|
-
}
|
|
10
|
-
interface DeviceLoginOptions {
|
|
11
|
-
mode: "device";
|
|
12
|
-
onPending?: (info: LoginPendingInfo) => void;
|
|
13
|
-
}
|
|
14
|
-
interface ApiKeyLoginOptions {
|
|
15
|
-
apiKey: string;
|
|
16
|
-
mode: "apiKey";
|
|
17
|
-
}
|
|
18
|
-
export type LoginOptions = ApiKeyLoginOptions | DeviceLoginOptions;
|
|
19
|
-
export type LoginError = AuthError | RemoteRequestError | UnexpectedError | ValidationError;
|
|
20
|
-
export type ResolveApiKeyError = AuthError | UnexpectedError;
|
|
21
|
-
export interface AuthService {
|
|
22
|
-
login(options: LoginOptions): Promise<ResultType<LoginSuccess, LoginError>>;
|
|
23
|
-
logout(): Promise<ResultType<LogoutSuccess, UnexpectedError>>;
|
|
24
|
-
resolveApiKey(overrideApiKey?: string): Promise<ResultType<string, ResolveApiKeyError>>;
|
|
25
|
-
status(overrideApiKey?: string): Promise<ResultType<AuthStatusSuccess, UnexpectedError>>;
|
|
26
|
-
}
|
|
27
|
-
interface AuthServiceDeps {
|
|
28
|
-
baseUrl: string;
|
|
29
|
-
credentialsStore: CredentialsStore;
|
|
30
|
-
envApiKey: string | undefined;
|
|
31
|
-
httpClient: HttpClient;
|
|
32
|
-
now?: () => number;
|
|
33
|
-
sleep?: (milliseconds: number) => Promise<void>;
|
|
34
|
-
}
|
|
35
|
-
export declare const createAuthService: (deps: AuthServiceDeps) => AuthService;
|
|
36
|
-
export {};
|
|
37
|
-
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/services/auth.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,eAAe,CAAC;AAE1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAGnD,OAAO,EACL,SAAS,EACT,kBAAkB,EAClB,eAAe,EACf,eAAe,EAChB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEzF,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,UAAU,kBAAkB;IAC1B,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAC;CAC9C;AAED,UAAU,kBAAkB;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED,MAAM,MAAM,YAAY,GAAG,kBAAkB,GAAG,kBAAkB,CAAC;AAEnE,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,kBAAkB,GAAG,eAAe,GAAG,eAAe,CAAC;AAE5F,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,eAAe,CAAC;AAE7D,MAAM,WAAW,WAAW;IAC1B,KAAK,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,UAAU,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC,CAAC;IAC5E,MAAM,IAAI,OAAO,CAAC,UAAU,CAAC,aAAa,EAAE,eAAe,CAAC,CAAC,CAAC;IAC9D,aAAa,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC,CAAC;IACxF,MAAM,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,iBAAiB,EAAE,eAAe,CAAC,CAAC,CAAC;CAC1F;AAED,UAAU,eAAe;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,UAAU,EAAE,UAAU,CAAC;IACvB,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACjD;AA6BD,eAAO,MAAM,iBAAiB,GAAI,MAAM,eAAe,KAAG,WA+TzD,CAAC"}
|