@ogment-ai/cli 0.5.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 -55
- package/README.md +0 -143
- package/dist/cli/commands.d.ts +0 -38
- package/dist/cli/commands.d.ts.map +0 -1
- package/dist/cli/commands.js +0 -57
- package/dist/cli/execute.d.ts +0 -11
- package/dist/cli/execute.d.ts.map +0 -1
- package/dist/cli/execute.js +0 -487
- package/dist/cli/invocations.d.ts +0 -32
- 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 -183
- 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 -22
- package/dist/cli/runtime.d.ts.map +0 -1
- package/dist/cli/runtime.js +0 -86
- package/dist/cli.d.ts +0 -4
- package/dist/cli.d.ts.map +0 -1
- package/dist/commands/auth.d.ts +0 -22
- package/dist/commands/auth.d.ts.map +0 -1
- package/dist/commands/auth.js +0 -29
- 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/browser.d.ts +0 -12
- package/dist/infra/browser.d.ts.map +0 -1
- package/dist/infra/browser.js +0 -20
- package/dist/infra/credentials.d.ts +0 -22
- package/dist/infra/credentials.d.ts.map +0 -1
- package/dist/infra/credentials.js +0 -81
- 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 -49
- package/dist/output/manager.d.ts.map +0 -1
- package/dist/output/manager.js +0 -128
- 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 -49
- package/dist/services/auth.d.ts.map +0 -1
- package/dist/services/auth.js +0 -739
- 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 -7
- package/dist/shared/constants.d.ts.map +0 -1
- package/dist/shared/constants.js +0 -8
- 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 -15
- package/dist/shared/schemas.d.ts.map +0 -1
- package/dist/shared/schemas.js +0 -15
- 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/services/mcp.js
DELETED
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
import { Client } from "@modelcontextprotocol/sdk/client";
|
|
2
|
-
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
|
|
3
|
-
import { Result } from "better-result";
|
|
4
|
-
import { createRemoteRequestErrorFromMcpCause } from "./mcp-error-mapping.js";
|
|
5
|
-
import { ERROR_CODE } from "../shared/error-codes.js";
|
|
6
|
-
import { RemoteRequestError } from "../shared/errors.js";
|
|
7
|
-
import { parseWithSchema } from "../shared/guards.js";
|
|
8
|
-
import { toolDefinitionSchema } from "../shared/schemas.js";
|
|
9
|
-
const MCP_CONNECT_TIMEOUT_MS = 10_000;
|
|
10
|
-
const MCP_DISCOVERY_TIMEOUT_MS = 10_000;
|
|
11
|
-
const MCP_INVOKE_TIMEOUT_MS = 45_000;
|
|
12
|
-
const defaultCreateClient = (version) => {
|
|
13
|
-
return new Client({
|
|
14
|
-
name: "ogment-cli",
|
|
15
|
-
version,
|
|
16
|
-
}, {
|
|
17
|
-
capabilities: {},
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
|
-
const defaultCreateTransport = (url, apiKey) => {
|
|
21
|
-
return new StreamableHTTPClientTransport(url, {
|
|
22
|
-
requestInit: {
|
|
23
|
-
headers: {
|
|
24
|
-
Authorization: `Bearer ${apiKey}`,
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
});
|
|
28
|
-
};
|
|
29
|
-
const parseToolCallContent = (result) => {
|
|
30
|
-
if (typeof result !== "object" || result === null) {
|
|
31
|
-
return Result.err(new RemoteRequestError({
|
|
32
|
-
message: "MCP call returned a non-object result",
|
|
33
|
-
}));
|
|
34
|
-
}
|
|
35
|
-
const asRecord = result;
|
|
36
|
-
if (Object.hasOwn(asRecord, "toolResult")) {
|
|
37
|
-
return Result.ok({
|
|
38
|
-
isError: false,
|
|
39
|
-
structuredContent: asRecord["toolResult"],
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
if (Object.hasOwn(asRecord, "structuredContent") && asRecord["structuredContent"] !== undefined) {
|
|
43
|
-
return Result.ok({
|
|
44
|
-
isError: asRecord["isError"] === true,
|
|
45
|
-
structuredContent: asRecord["structuredContent"],
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
const content = asRecord["content"];
|
|
49
|
-
if (Array.isArray(content)) {
|
|
50
|
-
const firstItem = content[0];
|
|
51
|
-
if (typeof firstItem === "object" && firstItem !== null && Object.hasOwn(firstItem, "text")) {
|
|
52
|
-
const text = firstItem.text;
|
|
53
|
-
if (typeof text === "string") {
|
|
54
|
-
const json = Result.try({
|
|
55
|
-
catch: () => text,
|
|
56
|
-
try: () => JSON.parse(text),
|
|
57
|
-
});
|
|
58
|
-
if (Result.isError(json)) {
|
|
59
|
-
return Result.ok({
|
|
60
|
-
isError: asRecord["isError"] === true,
|
|
61
|
-
structuredContent: text,
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
return Result.ok({
|
|
65
|
-
isError: asRecord["isError"] === true,
|
|
66
|
-
structuredContent: json.value,
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
return Result.ok({
|
|
72
|
-
isError: asRecord["isError"] === true,
|
|
73
|
-
structuredContent: asRecord,
|
|
74
|
-
});
|
|
75
|
-
};
|
|
76
|
-
export const createMcpService = (deps) => {
|
|
77
|
-
const createClient = deps.createClient ?? (() => defaultCreateClient(deps.version));
|
|
78
|
-
const createTransport = deps.createTransport ?? defaultCreateTransport;
|
|
79
|
-
const withClient = async (target, apiKey, handler) => {
|
|
80
|
-
const endpoint = `${deps.baseUrl}/api/v1/mcp/${target.orgSlug}/${target.serverPath}`;
|
|
81
|
-
const url = new URL(endpoint);
|
|
82
|
-
const transport = createTransport(url, apiKey);
|
|
83
|
-
const client = createClient();
|
|
84
|
-
const connectResult = await Result.tryPromise({
|
|
85
|
-
catch: (cause) => createRemoteRequestErrorFromMcpCause({
|
|
86
|
-
cause,
|
|
87
|
-
message: "Failed to connect to MCP server",
|
|
88
|
-
operation: "connect",
|
|
89
|
-
}),
|
|
90
|
-
try: async () => {
|
|
91
|
-
await client.connect(transport, {
|
|
92
|
-
timeout: MCP_CONNECT_TIMEOUT_MS,
|
|
93
|
-
});
|
|
94
|
-
},
|
|
95
|
-
});
|
|
96
|
-
if (Result.isError(connectResult)) {
|
|
97
|
-
return connectResult;
|
|
98
|
-
}
|
|
99
|
-
try {
|
|
100
|
-
return await handler(client);
|
|
101
|
-
}
|
|
102
|
-
finally {
|
|
103
|
-
await Result.tryPromise({
|
|
104
|
-
catch: () => undefined,
|
|
105
|
-
try: async () => {
|
|
106
|
-
await client.close();
|
|
107
|
-
},
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
};
|
|
111
|
-
const withRemoteCall = async (action, message, operation) => {
|
|
112
|
-
return Result.tryPromise({
|
|
113
|
-
catch: (cause) => createRemoteRequestErrorFromMcpCause({
|
|
114
|
-
cause,
|
|
115
|
-
message,
|
|
116
|
-
operation,
|
|
117
|
-
}),
|
|
118
|
-
try: action,
|
|
119
|
-
});
|
|
120
|
-
};
|
|
121
|
-
return {
|
|
122
|
-
callTool: async (target, apiKey, toolName, args) => {
|
|
123
|
-
return withClient(target, apiKey, async (client) => {
|
|
124
|
-
const toolCallResult = await withRemoteCall(async () => {
|
|
125
|
-
return client.callTool({
|
|
126
|
-
arguments: args,
|
|
127
|
-
name: toolName,
|
|
128
|
-
}, undefined, {
|
|
129
|
-
timeout: MCP_INVOKE_TIMEOUT_MS,
|
|
130
|
-
});
|
|
131
|
-
}, "MCP tool call failed", "tools/call");
|
|
132
|
-
if (Result.isError(toolCallResult)) {
|
|
133
|
-
return toolCallResult;
|
|
134
|
-
}
|
|
135
|
-
return parseToolCallContent(toolCallResult.value);
|
|
136
|
-
});
|
|
137
|
-
},
|
|
138
|
-
listTools: async (target, apiKey) => {
|
|
139
|
-
return withClient(target, apiKey, async (client) => {
|
|
140
|
-
const toolsResult = await withRemoteCall(async () => client.listTools(undefined, {
|
|
141
|
-
timeout: MCP_DISCOVERY_TIMEOUT_MS,
|
|
142
|
-
}), "MCP tools/list failed", "tools/list");
|
|
143
|
-
if (Result.isError(toolsResult)) {
|
|
144
|
-
return toolsResult;
|
|
145
|
-
}
|
|
146
|
-
const parsedTools = [];
|
|
147
|
-
for (const tool of toolsResult.value.tools) {
|
|
148
|
-
const parsed = parseWithSchema(toolDefinitionSchema, tool, "MCP tool definition", {
|
|
149
|
-
code: ERROR_CODE.toolInputSchemaViolation,
|
|
150
|
-
recovery: { command: "ogment catalog" },
|
|
151
|
-
});
|
|
152
|
-
if (Result.isError(parsed)) {
|
|
153
|
-
return parsed;
|
|
154
|
-
}
|
|
155
|
-
const normalizedTool = {
|
|
156
|
-
description: parsed.value.description ?? null,
|
|
157
|
-
inputSchema: parsed.value.inputSchema,
|
|
158
|
-
name: parsed.value.name,
|
|
159
|
-
};
|
|
160
|
-
if (parsed.value.outputSchema !== undefined) {
|
|
161
|
-
normalizedTool.outputSchema = parsed.value.outputSchema;
|
|
162
|
-
}
|
|
163
|
-
parsedTools.push(normalizedTool);
|
|
164
|
-
}
|
|
165
|
-
return Result.ok(parsedTools);
|
|
166
|
-
});
|
|
167
|
-
},
|
|
168
|
-
};
|
|
169
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare const APP_NAME = "ogment";
|
|
2
|
-
export declare const APP_DESCRIPTION = "Ogment CLI - secure your AI agents' SaaS credentials";
|
|
3
|
-
export declare const DEFAULT_OGMENT_BASE_URL = "https://dashboard.ogment.ai";
|
|
4
|
-
export declare const CLI_CLIENT_NAME = "Ogment CLI";
|
|
5
|
-
export declare const CLI_REDIRECT_HOST = "127.0.0.1";
|
|
6
|
-
export declare const VERSION: string;
|
|
7
|
-
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/shared/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ,WAAW,CAAC;AACjC,eAAO,MAAM,eAAe,yDAAyD,CAAC;AAEtF,eAAO,MAAM,uBAAuB,gCAAgC,CAAC;AACrE,eAAO,MAAM,eAAe,eAAe,CAAC;AAC5C,eAAO,MAAM,iBAAiB,cAAc,CAAC;AAQ7C,eAAO,MAAM,OAAO,QAAsB,CAAC"}
|
package/dist/shared/constants.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { readFileSync } from "node:fs";
|
|
2
|
-
export const APP_NAME = "ogment";
|
|
3
|
-
export const APP_DESCRIPTION = "Ogment CLI - secure your AI agents' SaaS credentials";
|
|
4
|
-
export const DEFAULT_OGMENT_BASE_URL = "https://dashboard.ogment.ai";
|
|
5
|
-
export const CLI_CLIENT_NAME = "Ogment CLI";
|
|
6
|
-
export const CLI_REDIRECT_HOST = "127.0.0.1";
|
|
7
|
-
const packageJson = JSON.parse(readFileSync(new URL("../../package.json", import.meta.url), "utf8"));
|
|
8
|
-
export const VERSION = packageJson.version;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
export declare const ERROR_CATEGORY: {
|
|
2
|
-
readonly auth: "auth";
|
|
3
|
-
readonly authorization: "authorization";
|
|
4
|
-
readonly contractMismatch: "contract_mismatch";
|
|
5
|
-
readonly internal: "internal";
|
|
6
|
-
readonly notFound: "not_found";
|
|
7
|
-
readonly rateLimit: "rate_limit";
|
|
8
|
-
readonly remote: "remote";
|
|
9
|
-
readonly transport: "transport";
|
|
10
|
-
readonly validation: "validation";
|
|
11
|
-
};
|
|
12
|
-
export type ErrorCategory = (typeof ERROR_CATEGORY)[keyof typeof ERROR_CATEGORY];
|
|
13
|
-
export declare const ERROR_CODE: {
|
|
14
|
-
readonly authDeviceExpired: "AUTH_DEVICE_EXPIRED";
|
|
15
|
-
readonly authDevicePending: "AUTH_DEVICE_PENDING";
|
|
16
|
-
readonly authInvalidCredentials: "AUTH_INVALID_CREDENTIALS";
|
|
17
|
-
readonly authRequired: "AUTH_REQUIRED";
|
|
18
|
-
readonly contractVersionUnsupported: "CONTRACT_VERSION_UNSUPPORTED";
|
|
19
|
-
readonly internalUnexpected: "INTERNAL_UNEXPECTED";
|
|
20
|
-
readonly remoteRateLimited: "REMOTE_RATE_LIMITED";
|
|
21
|
-
readonly remoteUnavailable: "REMOTE_UNAVAILABLE";
|
|
22
|
-
readonly toolInputSchemaViolation: "TOOL_INPUT_SCHEMA_VIOLATION";
|
|
23
|
-
readonly toolNotFound: "TOOL_NOT_FOUND";
|
|
24
|
-
readonly transportRequestFailed: "TRANSPORT_REQUEST_FAILED";
|
|
25
|
-
readonly validationInvalidInput: "VALIDATION_INVALID_INPUT";
|
|
26
|
-
};
|
|
27
|
-
export type StaticErrorCode = (typeof ERROR_CODE)[keyof typeof ERROR_CODE];
|
|
28
|
-
export type HttpStatusErrorCode = `HTTP_${number}`;
|
|
29
|
-
export type McpNumericErrorCode = `MCP_${number}`;
|
|
30
|
-
export type ErrorCode = StaticErrorCode | HttpStatusErrorCode | McpNumericErrorCode;
|
|
31
|
-
//# sourceMappingURL=error-codes.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"error-codes.d.ts","sourceRoot":"","sources":["../../src/shared/error-codes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;;;;;;;;CAUjB,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAEjF,eAAO,MAAM,UAAU;;;;;;;;;;;;;CAab,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC;AAC3E,MAAM,MAAM,mBAAmB,GAAG,QAAQ,MAAM,EAAE,CAAC;AACnD,MAAM,MAAM,mBAAmB,GAAG,OAAO,MAAM,EAAE,CAAC;AAClD,MAAM,MAAM,SAAS,GAAG,eAAe,GAAG,mBAAmB,GAAG,mBAAmB,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export const ERROR_CATEGORY = {
|
|
2
|
-
auth: "auth",
|
|
3
|
-
authorization: "authorization",
|
|
4
|
-
contractMismatch: "contract_mismatch",
|
|
5
|
-
internal: "internal",
|
|
6
|
-
notFound: "not_found",
|
|
7
|
-
rateLimit: "rate_limit",
|
|
8
|
-
remote: "remote",
|
|
9
|
-
transport: "transport",
|
|
10
|
-
validation: "validation",
|
|
11
|
-
};
|
|
12
|
-
export const ERROR_CODE = {
|
|
13
|
-
authDeviceExpired: "AUTH_DEVICE_EXPIRED",
|
|
14
|
-
authDevicePending: "AUTH_DEVICE_PENDING",
|
|
15
|
-
authInvalidCredentials: "AUTH_INVALID_CREDENTIALS",
|
|
16
|
-
authRequired: "AUTH_REQUIRED",
|
|
17
|
-
contractVersionUnsupported: "CONTRACT_VERSION_UNSUPPORTED",
|
|
18
|
-
internalUnexpected: "INTERNAL_UNEXPECTED",
|
|
19
|
-
remoteRateLimited: "REMOTE_RATE_LIMITED",
|
|
20
|
-
remoteUnavailable: "REMOTE_UNAVAILABLE",
|
|
21
|
-
toolInputSchemaViolation: "TOOL_INPUT_SCHEMA_VIOLATION",
|
|
22
|
-
toolNotFound: "TOOL_NOT_FOUND",
|
|
23
|
-
transportRequestFailed: "TRANSPORT_REQUEST_FAILED",
|
|
24
|
-
validationInvalidInput: "VALIDATION_INVALID_INPUT",
|
|
25
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { type AppError } from "./errors.js";
|
|
2
|
-
import type { CliRuntimeErrorPayload } from "./types.js";
|
|
3
|
-
interface PresentAppErrorOptions {
|
|
4
|
-
contextDiagnostics?: Record<string, unknown>;
|
|
5
|
-
includeDebug: boolean;
|
|
6
|
-
}
|
|
7
|
-
export declare const presentRuntimeErrorPayload: (error: AppError, options: PresentAppErrorOptions) => CliRuntimeErrorPayload;
|
|
8
|
-
export declare const presentCatalogFailureError: (error: AppError, options: PresentAppErrorOptions) => {
|
|
9
|
-
code: string;
|
|
10
|
-
detail: string;
|
|
11
|
-
diagnostics: Record<string, unknown>;
|
|
12
|
-
related_codes?: string[];
|
|
13
|
-
retryable: boolean;
|
|
14
|
-
title: string;
|
|
15
|
-
};
|
|
16
|
-
export {};
|
|
17
|
-
//# sourceMappingURL=error-presentation.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"error-presentation.d.ts","sourceRoot":"","sources":["../../src/shared/error-presentation.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,QAAQ,EAEd,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEzD,UAAU,sBAAsB;IAC9B,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC7C,YAAY,EAAE,OAAO,CAAC;CACvB;AA+ID,eAAO,MAAM,0BAA0B,GACrC,OAAO,QAAQ,EACf,SAAS,sBAAsB,KAC9B,sBA2BF,CAAC;AAEF,eAAO,MAAM,0BAA0B,GACrC,OAAO,QAAQ,EACf,SAAS,sBAAsB,KAC9B;IACD,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CAWf,CAAC"}
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
import { appErrorDiagnostics, appErrorMeta, appErrorTitle, formatAppError, } from "./errors.js";
|
|
2
|
-
const isRecord = (value) => {
|
|
3
|
-
return typeof value === "object" && value !== null;
|
|
4
|
-
};
|
|
5
|
-
const toHttpCode = (status) => {
|
|
6
|
-
return `HTTP_${status}`;
|
|
7
|
-
};
|
|
8
|
-
const toMcpCode = (code) => {
|
|
9
|
-
return `MCP_${code}`;
|
|
10
|
-
};
|
|
11
|
-
const sanitizeRemoteMessage = (value) => {
|
|
12
|
-
const trimmed = value.trim();
|
|
13
|
-
if (trimmed.length === 0) {
|
|
14
|
-
return undefined;
|
|
15
|
-
}
|
|
16
|
-
if (/^[\w]+Error$/u.test(trimmed)) {
|
|
17
|
-
return undefined;
|
|
18
|
-
}
|
|
19
|
-
const normalized = trimmed.replace(/^[\w]+Error:\s*/u, "").trim();
|
|
20
|
-
return normalized.length > 0 ? normalized : undefined;
|
|
21
|
-
};
|
|
22
|
-
const extractMessageFromRecord = (record) => {
|
|
23
|
-
if (typeof record["message"] === "string") {
|
|
24
|
-
return sanitizeRemoteMessage(record["message"]);
|
|
25
|
-
}
|
|
26
|
-
const nested = record["error"];
|
|
27
|
-
if (isRecord(nested) && typeof nested["message"] === "string") {
|
|
28
|
-
return sanitizeRemoteMessage(nested["message"]);
|
|
29
|
-
}
|
|
30
|
-
return undefined;
|
|
31
|
-
};
|
|
32
|
-
const extractMessageFromBody = (body) => {
|
|
33
|
-
if (typeof body !== "string" || body.length === 0) {
|
|
34
|
-
return undefined;
|
|
35
|
-
}
|
|
36
|
-
const parsed = (() => {
|
|
37
|
-
try {
|
|
38
|
-
return JSON.parse(body);
|
|
39
|
-
}
|
|
40
|
-
catch {
|
|
41
|
-
return null;
|
|
42
|
-
}
|
|
43
|
-
})();
|
|
44
|
-
if (isRecord(parsed)) {
|
|
45
|
-
const fromParsed = extractMessageFromRecord(parsed);
|
|
46
|
-
if (fromParsed !== undefined) {
|
|
47
|
-
return fromParsed;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
return sanitizeRemoteMessage(body);
|
|
51
|
-
};
|
|
52
|
-
const extractRemoteUserMessage = (error) => {
|
|
53
|
-
if (error.source !== "mcp_transport_http" && error.source !== "mcp_jsonrpc") {
|
|
54
|
-
return undefined;
|
|
55
|
-
}
|
|
56
|
-
if (isRecord(error.raw)) {
|
|
57
|
-
const fromRaw = extractMessageFromRecord(error.raw);
|
|
58
|
-
if (fromRaw !== undefined) {
|
|
59
|
-
return fromRaw;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
const fromBody = extractMessageFromBody(error.body);
|
|
63
|
-
if (fromBody !== undefined) {
|
|
64
|
-
return fromBody;
|
|
65
|
-
}
|
|
66
|
-
if (typeof error.mcpData === "string") {
|
|
67
|
-
const fromData = sanitizeRemoteMessage(error.mcpData);
|
|
68
|
-
if (fromData !== undefined) {
|
|
69
|
-
return fromData;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
return undefined;
|
|
73
|
-
};
|
|
74
|
-
const resolvePrimaryCode = (error) => {
|
|
75
|
-
const meta = appErrorMeta(error);
|
|
76
|
-
if (error._tag === "RemoteRequestError") {
|
|
77
|
-
if (typeof error.httpStatus === "number") {
|
|
78
|
-
return toHttpCode(error.httpStatus);
|
|
79
|
-
}
|
|
80
|
-
if (typeof error.mcpCode === "number") {
|
|
81
|
-
return toMcpCode(error.mcpCode);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
return String(meta.code);
|
|
85
|
-
};
|
|
86
|
-
const resolveRelatedCodes = (error, primaryCode) => {
|
|
87
|
-
if (error._tag !== "RemoteRequestError") {
|
|
88
|
-
return undefined;
|
|
89
|
-
}
|
|
90
|
-
const relatedCodes = [
|
|
91
|
-
...(typeof error.httpStatus === "number" ? [toHttpCode(error.httpStatus)] : []),
|
|
92
|
-
...(typeof error.mcpCode === "number" ? [toMcpCode(error.mcpCode)] : []),
|
|
93
|
-
].filter((code, index, array) => {
|
|
94
|
-
return code !== primaryCode && array.indexOf(code) === index;
|
|
95
|
-
});
|
|
96
|
-
return relatedCodes.length > 0 ? relatedCodes : undefined;
|
|
97
|
-
};
|
|
98
|
-
const defaultDiagnostics = (error) => {
|
|
99
|
-
if (error._tag !== "RemoteRequestError") {
|
|
100
|
-
return {};
|
|
101
|
-
}
|
|
102
|
-
return {
|
|
103
|
-
source: error.source,
|
|
104
|
-
...(error.operation === undefined ? {} : { operation: error.operation }),
|
|
105
|
-
};
|
|
106
|
-
};
|
|
107
|
-
const resolveDetail = (error) => {
|
|
108
|
-
if (error._tag === "RemoteRequestError") {
|
|
109
|
-
const userMessage = extractRemoteUserMessage(error);
|
|
110
|
-
if (userMessage !== undefined) {
|
|
111
|
-
return userMessage;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
return formatAppError(error);
|
|
115
|
-
};
|
|
116
|
-
export const presentRuntimeErrorPayload = (error, options) => {
|
|
117
|
-
const meta = appErrorMeta(error);
|
|
118
|
-
const primaryCode = resolvePrimaryCode(error);
|
|
119
|
-
const relatedCodes = resolveRelatedCodes(error, primaryCode);
|
|
120
|
-
const diagnostics = options.includeDebug === true
|
|
121
|
-
? {
|
|
122
|
-
tag: error._tag,
|
|
123
|
-
...appErrorDiagnostics(error),
|
|
124
|
-
}
|
|
125
|
-
: {
|
|
126
|
-
...defaultDiagnostics(error),
|
|
127
|
-
};
|
|
128
|
-
if (options.contextDiagnostics !== undefined) {
|
|
129
|
-
Object.assign(diagnostics, options.contextDiagnostics);
|
|
130
|
-
}
|
|
131
|
-
return {
|
|
132
|
-
category: meta.category,
|
|
133
|
-
code: primaryCode,
|
|
134
|
-
detail: resolveDetail(error),
|
|
135
|
-
diagnostics,
|
|
136
|
-
...(relatedCodes === undefined ? {} : { related_codes: relatedCodes }),
|
|
137
|
-
retryable: meta.retryable,
|
|
138
|
-
title: appErrorTitle(error),
|
|
139
|
-
};
|
|
140
|
-
};
|
|
141
|
-
export const presentCatalogFailureError = (error, options) => {
|
|
142
|
-
const payload = presentRuntimeErrorPayload(error, options);
|
|
143
|
-
return {
|
|
144
|
-
code: payload.code,
|
|
145
|
-
detail: payload.detail,
|
|
146
|
-
diagnostics: payload.diagnostics,
|
|
147
|
-
...(payload.related_codes === undefined ? {} : { related_codes: payload.related_codes }),
|
|
148
|
-
retryable: payload.retryable,
|
|
149
|
-
title: payload.title,
|
|
150
|
-
};
|
|
151
|
-
};
|
package/dist/shared/errors.d.ts
DELETED
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
import { ERROR_CODE, type ErrorCategory, type ErrorCode } from "./error-codes.js";
|
|
2
|
-
import { type RecoveryOverride } from "./recovery.js";
|
|
3
|
-
import type { CliNextAction, RemoteErrorDiagnostics, RemoteErrorSource } from "./types.js";
|
|
4
|
-
type AuthErrorCode = typeof ERROR_CODE.authDeviceExpired | typeof ERROR_CODE.authDevicePending | typeof ERROR_CODE.authInvalidCredentials | typeof ERROR_CODE.authRequired;
|
|
5
|
-
type RemoteErrorCode = typeof ERROR_CODE.remoteRateLimited | typeof ERROR_CODE.remoteUnavailable | typeof ERROR_CODE.transportRequestFailed | `HTTP_${number}` | `MCP_${number}`;
|
|
6
|
-
type ValidationErrorCode = typeof ERROR_CODE.toolInputSchemaViolation | typeof ERROR_CODE.validationInvalidInput;
|
|
7
|
-
type ContractMismatchErrorCode = typeof ERROR_CODE.contractVersionUnsupported;
|
|
8
|
-
interface BaseAppErrorFields {
|
|
9
|
-
category: ErrorCategory;
|
|
10
|
-
code: ErrorCode;
|
|
11
|
-
recovery: CliNextAction | undefined;
|
|
12
|
-
retryable: boolean;
|
|
13
|
-
}
|
|
14
|
-
declare const ValidationErrorBase: import("better-result").TaggedErrorClass<"ValidationError", {
|
|
15
|
-
details?: string;
|
|
16
|
-
message: string;
|
|
17
|
-
}>;
|
|
18
|
-
interface ValidationErrorPayload {
|
|
19
|
-
code?: ValidationErrorCode;
|
|
20
|
-
details?: string;
|
|
21
|
-
message: string;
|
|
22
|
-
recovery?: RecoveryOverride;
|
|
23
|
-
}
|
|
24
|
-
export declare class ValidationError extends ValidationErrorBase implements BaseAppErrorFields {
|
|
25
|
-
readonly category: "validation";
|
|
26
|
-
readonly code: ValidationErrorCode;
|
|
27
|
-
readonly recovery: CliNextAction | undefined;
|
|
28
|
-
readonly retryable = false;
|
|
29
|
-
constructor(payload: ValidationErrorPayload);
|
|
30
|
-
}
|
|
31
|
-
declare const AuthErrorBase: import("better-result").TaggedErrorClass<"AuthError", {
|
|
32
|
-
details?: string;
|
|
33
|
-
message: string;
|
|
34
|
-
}>;
|
|
35
|
-
interface AuthErrorPayload {
|
|
36
|
-
code?: AuthErrorCode;
|
|
37
|
-
details?: string;
|
|
38
|
-
message: string;
|
|
39
|
-
recovery?: RecoveryOverride;
|
|
40
|
-
retryable?: boolean;
|
|
41
|
-
}
|
|
42
|
-
export declare class AuthError extends AuthErrorBase implements BaseAppErrorFields {
|
|
43
|
-
readonly category: "auth";
|
|
44
|
-
readonly code: AuthErrorCode;
|
|
45
|
-
readonly recovery: CliNextAction | undefined;
|
|
46
|
-
readonly retryable: boolean;
|
|
47
|
-
constructor(payload: AuthErrorPayload);
|
|
48
|
-
}
|
|
49
|
-
declare const NotFoundErrorBase: import("better-result").TaggedErrorClass<"NotFoundError", {
|
|
50
|
-
message: string;
|
|
51
|
-
resource: string;
|
|
52
|
-
}>;
|
|
53
|
-
interface NotFoundErrorPayload {
|
|
54
|
-
code?: typeof ERROR_CODE.toolNotFound;
|
|
55
|
-
message: string;
|
|
56
|
-
recovery?: RecoveryOverride;
|
|
57
|
-
resource: string;
|
|
58
|
-
}
|
|
59
|
-
export declare class NotFoundError extends NotFoundErrorBase implements BaseAppErrorFields {
|
|
60
|
-
readonly category: "not_found";
|
|
61
|
-
readonly code: typeof ERROR_CODE.toolNotFound;
|
|
62
|
-
readonly recovery: CliNextAction | undefined;
|
|
63
|
-
readonly retryable = false;
|
|
64
|
-
constructor(payload: NotFoundErrorPayload);
|
|
65
|
-
}
|
|
66
|
-
declare const RemoteRequestErrorBase: import("better-result").TaggedErrorClass<"RemoteRequestError", {
|
|
67
|
-
body?: string;
|
|
68
|
-
message: string;
|
|
69
|
-
mcpCode?: number;
|
|
70
|
-
mcpData?: unknown;
|
|
71
|
-
operation?: string;
|
|
72
|
-
raw?: unknown;
|
|
73
|
-
source: RemoteErrorSource;
|
|
74
|
-
status?: number;
|
|
75
|
-
}>;
|
|
76
|
-
interface RemoteRequestErrorPayload {
|
|
77
|
-
body?: string;
|
|
78
|
-
code?: RemoteErrorCode;
|
|
79
|
-
diagnostics?: Partial<RemoteErrorDiagnostics>;
|
|
80
|
-
httpStatus?: number;
|
|
81
|
-
mcpCode?: number;
|
|
82
|
-
mcpData?: unknown;
|
|
83
|
-
message: string;
|
|
84
|
-
operation?: string;
|
|
85
|
-
raw?: unknown;
|
|
86
|
-
recovery?: RecoveryOverride;
|
|
87
|
-
retryable?: boolean;
|
|
88
|
-
source?: RemoteErrorSource;
|
|
89
|
-
status?: number;
|
|
90
|
-
}
|
|
91
|
-
export declare class RemoteRequestError extends RemoteRequestErrorBase implements BaseAppErrorFields {
|
|
92
|
-
readonly category: ErrorCategory;
|
|
93
|
-
readonly code: RemoteErrorCode;
|
|
94
|
-
readonly diagnostics: RemoteErrorDiagnostics;
|
|
95
|
-
readonly httpStatus: number | undefined;
|
|
96
|
-
readonly recovery: CliNextAction | undefined;
|
|
97
|
-
readonly retryable: boolean;
|
|
98
|
-
constructor(payload: RemoteRequestErrorPayload);
|
|
99
|
-
}
|
|
100
|
-
declare const ContractMismatchErrorBase: import("better-result").TaggedErrorClass<"ContractMismatchError", {
|
|
101
|
-
details?: string;
|
|
102
|
-
message: string;
|
|
103
|
-
}>;
|
|
104
|
-
interface ContractMismatchErrorPayload {
|
|
105
|
-
code?: ContractMismatchErrorCode;
|
|
106
|
-
details?: string;
|
|
107
|
-
message: string;
|
|
108
|
-
recovery?: RecoveryOverride;
|
|
109
|
-
}
|
|
110
|
-
export declare class ContractMismatchError extends ContractMismatchErrorBase implements BaseAppErrorFields {
|
|
111
|
-
readonly category: "contract_mismatch";
|
|
112
|
-
readonly code: ContractMismatchErrorCode;
|
|
113
|
-
readonly recovery: CliNextAction | undefined;
|
|
114
|
-
readonly retryable = false;
|
|
115
|
-
constructor(payload: ContractMismatchErrorPayload);
|
|
116
|
-
}
|
|
117
|
-
declare const UnexpectedErrorBase: import("better-result").TaggedErrorClass<"UnexpectedError", {
|
|
118
|
-
cause?: unknown;
|
|
119
|
-
message: string;
|
|
120
|
-
}>;
|
|
121
|
-
interface UnexpectedErrorPayload {
|
|
122
|
-
cause?: unknown;
|
|
123
|
-
code?: typeof ERROR_CODE.internalUnexpected;
|
|
124
|
-
message: string;
|
|
125
|
-
recovery?: RecoveryOverride;
|
|
126
|
-
}
|
|
127
|
-
export declare class UnexpectedError extends UnexpectedErrorBase implements BaseAppErrorFields {
|
|
128
|
-
readonly category: "internal";
|
|
129
|
-
readonly code: typeof ERROR_CODE.internalUnexpected;
|
|
130
|
-
readonly recovery: CliNextAction | undefined;
|
|
131
|
-
readonly retryable = false;
|
|
132
|
-
constructor(payload: UnexpectedErrorPayload);
|
|
133
|
-
}
|
|
134
|
-
export type AppError = AuthError | ContractMismatchError | NotFoundError | RemoteRequestError | UnexpectedError | ValidationError;
|
|
135
|
-
export interface AppErrorMeta {
|
|
136
|
-
category: ErrorCategory;
|
|
137
|
-
code: ErrorCode;
|
|
138
|
-
recovery: CliNextAction | undefined;
|
|
139
|
-
retryable: boolean;
|
|
140
|
-
}
|
|
141
|
-
export declare const appErrorMeta: (error: AppError) => AppErrorMeta;
|
|
142
|
-
export declare const appErrorDiagnostics: (error: AppError) => Record<string, unknown>;
|
|
143
|
-
export declare const appErrorTitle: (error: AppError) => string;
|
|
144
|
-
export declare const formatAppError: (error: AppError) => string;
|
|
145
|
-
export {};
|
|
146
|
-
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/shared/errors.ts"],"names":[],"mappings":"AAEA,OAAO,EAAkB,UAAU,EAAE,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClG,OAAO,EAAqB,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,KAAK,EAAE,aAAa,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE3F,KAAK,aAAa,GACd,OAAO,UAAU,CAAC,iBAAiB,GACnC,OAAO,UAAU,CAAC,iBAAiB,GACnC,OAAO,UAAU,CAAC,sBAAsB,GACxC,OAAO,UAAU,CAAC,YAAY,CAAC;AAEnC,KAAK,eAAe,GAChB,OAAO,UAAU,CAAC,iBAAiB,GACnC,OAAO,UAAU,CAAC,iBAAiB,GACnC,OAAO,UAAU,CAAC,sBAAsB,GACxC,QAAQ,MAAM,EAAE,GAChB,OAAO,MAAM,EAAE,CAAC;AAEpB,KAAK,mBAAmB,GACpB,OAAO,UAAU,CAAC,wBAAwB,GAC1C,OAAO,UAAU,CAAC,sBAAsB,CAAC;AAE7C,KAAK,yBAAyB,GAAG,OAAO,UAAU,CAAC,0BAA0B,CAAC;AAE9E,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,aAAa,CAAC;IACxB,IAAI,EAAE,SAAS,CAAC;IAChB,QAAQ,EAAE,aAAa,GAAG,SAAS,CAAC;IACpC,SAAS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