@darqlabs/curator-sdk 0.2.0 → 0.3.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/cjs/errors.d.ts +96 -5
- package/dist/cjs/errors.d.ts.map +1 -1
- package/dist/cjs/errors.js +181 -15
- package/dist/cjs/errors.js.map +1 -1
- package/dist/cjs/http.d.ts.map +1 -1
- package/dist/cjs/http.js +65 -13
- package/dist/cjs/http.js.map +1 -1
- package/dist/cjs/index.d.ts +2 -1
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +5 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/errors.d.ts +96 -5
- package/dist/esm/errors.d.ts.map +1 -1
- package/dist/esm/errors.js +176 -14
- package/dist/esm/errors.js.map +1 -1
- package/dist/esm/http.d.ts.map +1 -1
- package/dist/esm/http.js +66 -14
- package/dist/esm/http.js.map +1 -1
- package/dist/esm/index.d.ts +2 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/http.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.js","sourceRoot":"","sources":["../../src/http.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;;AAEH,
|
|
1
|
+
{"version":3,"file":"http.js","sourceRoot":"","sources":["../../src/http.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;;AAEH,2CASoB;AAwDpB,MAAa,UAAU;IACJ,MAAM,CAAQ;IACd,OAAO,CAAQ;IACf,SAAS,CAAc;IACvB,cAAc,CAAwB;IACtC,kBAAkB,CAAqB;IAExD,YAAY,IAAuB;QACjC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;YACjB,MAAM,IAAI,wBAAY,CAAC,uDAAuD,CAAC,CAAA;QACjF,CAAC;QACD,IAAI,CAAC,MAAM,GAAG,I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,KAAK,CAAC,OAAO,CAAA;IAC7D,CAAC;IACD,IAAI,OAAO,CAAC,CAAC,OAAO,KAAK,QAAQ;QAAE,OAAO,CAAC,CAAC,OAAO,CAAA;IACnD,OAAO,SAAS,CAAA;AAClB,CAAC"}
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -3,7 +3,8 @@ export type { CuratorOptions, AgentLocator } from "./client.js";
|
|
|
3
3
|
export type { EndUserJwtProvider } from "./http.js";
|
|
4
4
|
export { Files } from "./files.js";
|
|
5
5
|
export type { PresignUploadInput, PresignUploadResult, OneShotUploadInput, UploadData, } from "./files.js";
|
|
6
|
-
export { CuratorError, CuratorAuthError, CuratorForbiddenError, CuratorNotFoundError, CuratorDeploymentRetiredError, CuratorRateLimitError, CuratorApprovalRequiredError, CuratorAuthorizationRequiredError, CuratorAgentError, CuratorTimeoutError, } from "./errors.js";
|
|
6
|
+
export { CuratorError, CuratorAuthError, CuratorEndUserAuthError, CuratorForbiddenError, CuratorNotFoundError, CuratorDeploymentRetiredError, CuratorRateLimitError, CuratorServerError, CuratorApprovalRequiredError, CuratorAuthorizationRequiredError, CuratorAgentError, CuratorTimeoutError, DEFAULT_USER_MESSAGE, parseDelegationFailureCode, } from "./errors.js";
|
|
7
|
+
export type { DelegationFailureCode } from "./errors.js";
|
|
7
8
|
export type { AssistantMessage, UserMessage, ToolMessage, ConversationMessage, Environment, FileAttachment, ApprovalDetails, AuthorizationDetails, AgentFailureClass, SendOptions, HistoryOptions, HistoryPage, DeploymentConfig, EndUserConnection, } from "./types.js";
|
|
8
9
|
export { Integrations, GmailIntegration } from "./integrations.js";
|
|
9
10
|
export type { StreamEvent, StreamDelta, StreamToolCallStarted, StreamToolCallCompleted, StreamState, StreamPlanProgress, StreamDone, StreamError, StreamPausedForApproval, StreamPausedForAuthorization, } from "./streamEvents.js";
|
package/dist/cjs/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClD,YAAY,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC/D,YAAY,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,YAAY,EACV,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,UAAU,GACX,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,qBAAqB,EACrB,oBAAoB,EACpB,6BAA6B,EAC7B,qBAAqB,EACrB,4BAA4B,EAC5B,iCAAiC,EACjC,iBAAiB,EACjB,mBAAmB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClD,YAAY,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC/D,YAAY,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,YAAY,EACV,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,UAAU,GACX,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,uBAAuB,EACvB,qBAAqB,EACrB,oBAAoB,EACpB,6BAA6B,EAC7B,qBAAqB,EACrB,kBAAkB,EAClB,4BAA4B,EAC5B,iCAAiC,EACjC,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EACpB,0BAA0B,GAC3B,MAAM,aAAa,CAAA;AACpB,YAAY,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AACxD,YAAY,EACV,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,mBAAmB,EACnB,WAAW,EACX,cAAc,EACd,eAAe,EACf,oBAAoB,EACpB,iBAAiB,EACjB,WAAW,EACX,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAClE,YAAY,EACV,WAAW,EACX,WAAW,EACX,qBAAqB,EACrB,uBAAuB,EACvB,WAAW,EACX,kBAAkB,EAClB,UAAU,EACV,WAAW,EACX,uBAAuB,EACvB,4BAA4B,GAC7B,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAA"}
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isTerminalStreamEvent = exports.GmailIntegration = exports.Integrations = exports.CuratorTimeoutError = exports.CuratorAgentError = exports.CuratorAuthorizationRequiredError = exports.CuratorApprovalRequiredError = exports.CuratorRateLimitError = exports.CuratorDeploymentRetiredError = exports.CuratorNotFoundError = exports.CuratorForbiddenError = exports.CuratorAuthError = exports.CuratorError = exports.Files = exports.Chat = exports.Agent = exports.Curator = void 0;
|
|
3
|
+
exports.isTerminalStreamEvent = exports.GmailIntegration = exports.Integrations = exports.parseDelegationFailureCode = exports.DEFAULT_USER_MESSAGE = exports.CuratorTimeoutError = exports.CuratorAgentError = exports.CuratorAuthorizationRequiredError = exports.CuratorApprovalRequiredError = exports.CuratorServerError = exports.CuratorRateLimitError = exports.CuratorDeploymentRetiredError = exports.CuratorNotFoundError = exports.CuratorForbiddenError = exports.CuratorEndUserAuthError = exports.CuratorAuthError = exports.CuratorError = exports.Files = exports.Chat = exports.Agent = exports.Curator = void 0;
|
|
4
4
|
var client_js_1 = require("./client.js");
|
|
5
5
|
Object.defineProperty(exports, "Curator", { enumerable: true, get: function () { return client_js_1.Curator; } });
|
|
6
6
|
Object.defineProperty(exports, "Agent", { enumerable: true, get: function () { return client_js_1.Agent; } });
|
|
@@ -10,14 +10,18 @@ Object.defineProperty(exports, "Files", { enumerable: true, get: function () { r
|
|
|
10
10
|
var errors_js_1 = require("./errors.js");
|
|
11
11
|
Object.defineProperty(exports, "CuratorError", { enumerable: true, get: function () { return errors_js_1.CuratorError; } });
|
|
12
12
|
Object.defineProperty(exports, "CuratorAuthError", { enumerable: true, get: function () { return errors_js_1.CuratorAuthError; } });
|
|
13
|
+
Object.defineProperty(exports, "CuratorEndUserAuthError", { enumerable: true, get: function () { return errors_js_1.CuratorEndUserAuthError; } });
|
|
13
14
|
Object.defineProperty(exports, "CuratorForbiddenError", { enumerable: true, get: function () { return errors_js_1.CuratorForbiddenError; } });
|
|
14
15
|
Object.defineProperty(exports, "CuratorNotFoundError", { enumerable: true, get: function () { return errors_js_1.CuratorNotFoundError; } });
|
|
15
16
|
Object.defineProperty(exports, "CuratorDeploymentRetiredError", { enumerable: true, get: function () { return errors_js_1.CuratorDeploymentRetiredError; } });
|
|
16
17
|
Object.defineProperty(exports, "CuratorRateLimitError", { enumerable: true, get: function () { return errors_js_1.CuratorRateLimitError; } });
|
|
18
|
+
Object.defineProperty(exports, "CuratorServerError", { enumerable: true, get: function () { return errors_js_1.CuratorServerError; } });
|
|
17
19
|
Object.defineProperty(exports, "CuratorApprovalRequiredError", { enumerable: true, get: function () { return errors_js_1.CuratorApprovalRequiredError; } });
|
|
18
20
|
Object.defineProperty(exports, "CuratorAuthorizationRequiredError", { enumerable: true, get: function () { return errors_js_1.CuratorAuthorizationRequiredError; } });
|
|
19
21
|
Object.defineProperty(exports, "CuratorAgentError", { enumerable: true, get: function () { return errors_js_1.CuratorAgentError; } });
|
|
20
22
|
Object.defineProperty(exports, "CuratorTimeoutError", { enumerable: true, get: function () { return errors_js_1.CuratorTimeoutError; } });
|
|
23
|
+
Object.defineProperty(exports, "DEFAULT_USER_MESSAGE", { enumerable: true, get: function () { return errors_js_1.DEFAULT_USER_MESSAGE; } });
|
|
24
|
+
Object.defineProperty(exports, "parseDelegationFailureCode", { enumerable: true, get: function () { return errors_js_1.parseDelegationFailureCode; } });
|
|
21
25
|
var integrations_js_1 = require("./integrations.js");
|
|
22
26
|
Object.defineProperty(exports, "Integrations", { enumerable: true, get: function () { return integrations_js_1.Integrations; } });
|
|
23
27
|
Object.defineProperty(exports, "GmailIntegration", { enumerable: true, get: function () { return integrations_js_1.GmailIntegration; } });
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,yCAAkD;AAAzC,oGAAA,OAAO,OAAA;AAAE,kGAAA,KAAK,OAAA;AAAE,iGAAA,IAAI,OAAA;AAG7B,uCAAkC;AAAzB,iGAAA,KAAK,OAAA;AAOd,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,yCAAkD;AAAzC,oGAAA,OAAO,OAAA;AAAE,kGAAA,KAAK,OAAA;AAAE,iGAAA,IAAI,OAAA;AAG7B,uCAAkC;AAAzB,iGAAA,KAAK,OAAA;AAOd,yCAeoB;AAdlB,yGAAA,YAAY,OAAA;AACZ,6GAAA,gBAAgB,OAAA;AAChB,oHAAA,uBAAuB,OAAA;AACvB,kHAAA,qBAAqB,OAAA;AACrB,iHAAA,oBAAoB,OAAA;AACpB,0HAAA,6BAA6B,OAAA;AAC7B,kHAAA,qBAAqB,OAAA;AACrB,+GAAA,kBAAkB,OAAA;AAClB,yHAAA,4BAA4B,OAAA;AAC5B,8HAAA,iCAAiC,OAAA;AACjC,8GAAA,iBAAiB,OAAA;AACjB,gHAAA,mBAAmB,OAAA;AACnB,iHAAA,oBAAoB,OAAA;AACpB,uHAAA,0BAA0B,OAAA;AAmB5B,qDAAkE;AAAzD,+GAAA,YAAY,OAAA;AAAE,mHAAA,gBAAgB,OAAA;AAavC,qDAAyD;AAAhD,wHAAA,qBAAqB,OAAA"}
|
package/dist/esm/errors.d.ts
CHANGED
|
@@ -10,31 +10,99 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import type { AssistantMessage, ApprovalDetails, AuthorizationDetails, AgentFailureClass } from "./types.js";
|
|
12
12
|
export declare class CuratorError extends Error {
|
|
13
|
+
/**
|
|
14
|
+
* What an END USER may be shown.
|
|
15
|
+
*
|
|
16
|
+
* `message` is for developers — it can name the request, the status, and the
|
|
17
|
+
* server's own wording. That is the wrong text to put in a chat bubble, and
|
|
18
|
+
* shipping it there is not a hypothetical: a 500 rendered as
|
|
19
|
+
* `HTTP 500 from https://api.../agents/<slug>/conversations: …`, exposing the
|
|
20
|
+
* deployment's URL to whoever was chatting, and an end-user token failure
|
|
21
|
+
* rendered as "End-user JWT could not be verified", which tells the person
|
|
22
|
+
* nothing they can act on and leaks the auth mechanism.
|
|
23
|
+
*
|
|
24
|
+
* Every subclass sets this to something safe and actionable. `renderError` in
|
|
25
|
+
* the React bindings prefers it and never falls back to `message`, so a new
|
|
26
|
+
* error type is safe-by-default rather than leaky-by-default.
|
|
27
|
+
*/
|
|
28
|
+
readonly userMessage: string;
|
|
29
|
+
/** HTTP status, when this came from a response. */
|
|
30
|
+
readonly status: number | null;
|
|
31
|
+
/** Server error code (`error.code`), when present. */
|
|
32
|
+
readonly code: string | null;
|
|
33
|
+
/**
|
|
34
|
+
* Correlation id from `x-request-id` / `correlationId`. The one detail worth
|
|
35
|
+
* showing a user on an unexpected failure — it is what support can trace,
|
|
36
|
+
* and it says nothing about the system's shape.
|
|
37
|
+
*/
|
|
38
|
+
readonly requestId: string | null;
|
|
39
|
+
/**
|
|
40
|
+
* Request URL, as a PROPERTY rather than part of `message`. Available for
|
|
41
|
+
* logs and bug reports without riding along into anything user-visible.
|
|
42
|
+
*/
|
|
43
|
+
readonly url: string | null;
|
|
13
44
|
constructor(message: string, options?: {
|
|
14
45
|
cause?: unknown;
|
|
46
|
+
userMessage?: string;
|
|
47
|
+
status?: number | null;
|
|
48
|
+
code?: string | null;
|
|
49
|
+
requestId?: string | null;
|
|
50
|
+
url?: string | null;
|
|
15
51
|
});
|
|
16
52
|
}
|
|
53
|
+
/** Last-resort user-facing text. Deliberately says nothing about the system. */
|
|
54
|
+
export declare const DEFAULT_USER_MESSAGE = "Something went wrong. Please try again.";
|
|
55
|
+
/** Appends a correlation id when there is one, so support has a handle. */
|
|
56
|
+
export declare function withRequestId(text: string, requestId: string | null): string;
|
|
57
|
+
type HttpContext = {
|
|
58
|
+
status?: number | null;
|
|
59
|
+
code?: string | null;
|
|
60
|
+
requestId?: string | null;
|
|
61
|
+
url?: string | null;
|
|
62
|
+
};
|
|
17
63
|
/** HTTP 401 from the API — your API key is missing, invalid, or revoked. */
|
|
18
64
|
export declare class CuratorAuthError extends CuratorError {
|
|
19
|
-
constructor(message?: string);
|
|
65
|
+
constructor(message?: string, ctx?: HttpContext);
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* HTTP 401 specifically because the END-USER token was missing, expired, or
|
|
69
|
+
* unverifiable — distinct from `CuratorAuthError`, which is about the
|
|
70
|
+
* integrator's API key.
|
|
71
|
+
*
|
|
72
|
+
* Separate because the remediation is completely different: an API-key failure
|
|
73
|
+
* needs a developer, whereas this one is usually a stale session the user fixes
|
|
74
|
+
* by signing in again. Collapsing them produced "Authentication failed. Check
|
|
75
|
+
* your API key." in response to an expired user token, which sends the reader
|
|
76
|
+
* after the wrong thing entirely.
|
|
77
|
+
*/
|
|
78
|
+
export declare class CuratorEndUserAuthError extends CuratorError {
|
|
79
|
+
constructor(message?: string, ctx?: HttpContext);
|
|
20
80
|
}
|
|
21
81
|
/** HTTP 403 from the API — your API key doesn't have permission for this action. */
|
|
22
82
|
export declare class CuratorForbiddenError extends CuratorError {
|
|
23
|
-
constructor(message?: string);
|
|
83
|
+
constructor(message?: string, ctx?: HttpContext);
|
|
24
84
|
}
|
|
25
85
|
/** HTTP 404 from the API — the deployment slug or conversation id wasn't found. */
|
|
26
86
|
export declare class CuratorNotFoundError extends CuratorError {
|
|
27
|
-
constructor(message?: string);
|
|
87
|
+
constructor(message?: string, ctx?: HttpContext);
|
|
28
88
|
}
|
|
29
89
|
/** HTTP 410 from the API — the deployment was retired. */
|
|
30
90
|
export declare class CuratorDeploymentRetiredError extends CuratorError {
|
|
31
91
|
readonly retiredAt: string | null;
|
|
32
|
-
constructor(message: string, retiredAt: string | null);
|
|
92
|
+
constructor(message: string, retiredAt: string | null, ctx?: HttpContext);
|
|
33
93
|
}
|
|
34
94
|
/** HTTP 429 from the API — back off. */
|
|
35
95
|
export declare class CuratorRateLimitError extends CuratorError {
|
|
36
96
|
readonly retryAfterSeconds: number | null;
|
|
37
|
-
constructor(message?: string, retryAfterSeconds?: number | null);
|
|
97
|
+
constructor(message?: string, retryAfterSeconds?: number | null, ctx?: HttpContext);
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* HTTP 5xx. The server already returns a generic body plus a `correlationId`
|
|
101
|
+
* for unexpected failures, so the useful thing to surface is that id — not the
|
|
102
|
+
* status line and URL the SDK used to build into `message`.
|
|
103
|
+
*/
|
|
104
|
+
export declare class CuratorServerError extends CuratorError {
|
|
105
|
+
constructor(message: string, ctx?: HttpContext);
|
|
38
106
|
}
|
|
39
107
|
/**
|
|
40
108
|
* Run paused waiting for human approval. Approval resolution is not
|
|
@@ -69,6 +137,22 @@ export declare class CuratorAuthorizationRequiredError extends CuratorError {
|
|
|
69
137
|
runId: string;
|
|
70
138
|
});
|
|
71
139
|
}
|
|
140
|
+
/**
|
|
141
|
+
* Delegated-identity failure codes, mirroring the server's taxonomy in
|
|
142
|
+
* `delegationFailure.ts`. Four outcomes because each implies a DIFFERENT next
|
|
143
|
+
* action, and collapsing them is what makes "why did this fail only after the
|
|
144
|
+
* approval?" unanswerable.
|
|
145
|
+
*
|
|
146
|
+
* `AgentFailureClass` has no delegated variant, and the errored payload carries
|
|
147
|
+
* no structured code — the server prefixes the failure MESSAGE with the code
|
|
148
|
+
* instead. So this is recovered by parsing that prefix, which is a real
|
|
149
|
+
* coupling: if the server stops prefixing, `delegationCode` silently goes null
|
|
150
|
+
* and the user gets the generic agent-error text. The durable fix is a
|
|
151
|
+
* first-class field on the errored event; until then the prefix is the contract.
|
|
152
|
+
*/
|
|
153
|
+
export type DelegationFailureCode = "DELEGATED_IDENTITY_EXPIRED" | "DELEGATED_IDENTITY_REVOKED" | "DELEGATED_TOKEN_EXCHANGE_FAILED" | "DOWNSTREAM_AUTH_REJECTED" | "DELEGATED_AUTH_NOT_CONFIGURED";
|
|
154
|
+
/** Recover the delegated-failure code from a server message prefix. */
|
|
155
|
+
export declare function parseDelegationFailureCode(message: string | undefined): DelegationFailureCode | null;
|
|
72
156
|
/**
|
|
73
157
|
* The agent run reached a terminal error state (LLM quota, auth, 5xx
|
|
74
158
|
* exhausted retries, etc.). `failureClass` and `isPermanent` mirror the
|
|
@@ -80,6 +164,12 @@ export declare class CuratorAgentError extends CuratorError {
|
|
|
80
164
|
readonly conversationId: string;
|
|
81
165
|
readonly runId: string;
|
|
82
166
|
readonly stepId: string | null;
|
|
167
|
+
/**
|
|
168
|
+
* Set when the run failed on delegated identity. Distinct from
|
|
169
|
+
* `failureClass`, which has no delegated variant — see
|
|
170
|
+
* {@link DelegationFailureCode}.
|
|
171
|
+
*/
|
|
172
|
+
readonly delegationCode: DelegationFailureCode | null;
|
|
83
173
|
constructor(args: {
|
|
84
174
|
message: string;
|
|
85
175
|
failureClass: AgentFailureClass;
|
|
@@ -104,4 +194,5 @@ export declare class CuratorTimeoutError extends CuratorError {
|
|
|
104
194
|
continueWaiting: (timeoutMs?: number) => Promise<AssistantMessage>;
|
|
105
195
|
});
|
|
106
196
|
}
|
|
197
|
+
export {};
|
|
107
198
|
//# sourceMappingURL=errors.d.ts.map
|
package/dist/esm/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EACf,oBAAoB,EACpB,iBAAiB,EAClB,MAAM,YAAY,CAAA;AAEnB,qBAAa,YAAa,SAAQ,KAAK;
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EACf,oBAAoB,EACpB,iBAAiB,EAClB,MAAM,YAAY,CAAA;AAEnB,qBAAa,YAAa,SAAQ,KAAK;IACrC;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,mDAAmD;IACnD,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,sDAAsD;IACtD,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B;;;;OAIG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACjC;;;OAGG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;gBAGzB,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE;QACR,KAAK,CAAC,EAAE,OAAO,CAAA;QACf,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;QACtB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;QACpB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;QACzB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;KACpB;CAcJ;AAED,gFAAgF;AAChF,eAAO,MAAM,oBAAoB,4CACU,CAAA;AAE3C,2EAA2E;AAC3E,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,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,YAAY,EAAE,iBAAiB,CAAA;QAC/B,WAAW,EAAE,OAAO,CAAA;QACpB,cAAc,EAAE,MAAM,CAAA;QACtB,KAAK,EAAE,MAAM,CAAA;QACb,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;KACvB;CAuBF;AAED;;;;GAIG;AACH,qBAAa,mBAAoB,SAAQ,YAAY;IACnD,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;IAC/B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,eAAe,EAAE,CAAC,SAAS,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAA;gBAE/D,IAAI,EAAE;QAChB,cAAc,EAAE,MAAM,CAAA;QACtB,KAAK,EAAE,MAAM,CAAA;QACb,eAAe,EAAE,CAAC,SAAS,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAA;KACnE;CAUF"}
|
package/dist/esm/errors.js
CHANGED
|
@@ -9,9 +9,45 @@
|
|
|
9
9
|
* backstop.
|
|
10
10
|
*/
|
|
11
11
|
export class CuratorError extends Error {
|
|
12
|
+
/**
|
|
13
|
+
* What an END USER may be shown.
|
|
14
|
+
*
|
|
15
|
+
* `message` is for developers — it can name the request, the status, and the
|
|
16
|
+
* server's own wording. That is the wrong text to put in a chat bubble, and
|
|
17
|
+
* shipping it there is not a hypothetical: a 500 rendered as
|
|
18
|
+
* `HTTP 500 from https://api.../agents/<slug>/conversations: …`, exposing the
|
|
19
|
+
* deployment's URL to whoever was chatting, and an end-user token failure
|
|
20
|
+
* rendered as "End-user JWT could not be verified", which tells the person
|
|
21
|
+
* nothing they can act on and leaks the auth mechanism.
|
|
22
|
+
*
|
|
23
|
+
* Every subclass sets this to something safe and actionable. `renderError` in
|
|
24
|
+
* the React bindings prefers it and never falls back to `message`, so a new
|
|
25
|
+
* error type is safe-by-default rather than leaky-by-default.
|
|
26
|
+
*/
|
|
27
|
+
userMessage;
|
|
28
|
+
/** HTTP status, when this came from a response. */
|
|
29
|
+
status;
|
|
30
|
+
/** Server error code (`error.code`), when present. */
|
|
31
|
+
code;
|
|
32
|
+
/**
|
|
33
|
+
* Correlation id from `x-request-id` / `correlationId`. The one detail worth
|
|
34
|
+
* showing a user on an unexpected failure — it is what support can trace,
|
|
35
|
+
* and it says nothing about the system's shape.
|
|
36
|
+
*/
|
|
37
|
+
requestId;
|
|
38
|
+
/**
|
|
39
|
+
* Request URL, as a PROPERTY rather than part of `message`. Available for
|
|
40
|
+
* logs and bug reports without riding along into anything user-visible.
|
|
41
|
+
*/
|
|
42
|
+
url;
|
|
12
43
|
constructor(message, options) {
|
|
13
44
|
super(message);
|
|
14
45
|
this.name = "CuratorError";
|
|
46
|
+
this.userMessage = options?.userMessage ?? DEFAULT_USER_MESSAGE;
|
|
47
|
+
this.status = options?.status ?? null;
|
|
48
|
+
this.code = options?.code ?? null;
|
|
49
|
+
this.requestId = options?.requestId ?? null;
|
|
50
|
+
this.url = options?.url ?? null;
|
|
15
51
|
// Preserve the underlying error if the runtime supports it.
|
|
16
52
|
if (options?.cause !== undefined) {
|
|
17
53
|
;
|
|
@@ -19,32 +55,65 @@ export class CuratorError extends Error {
|
|
|
19
55
|
}
|
|
20
56
|
}
|
|
21
57
|
}
|
|
58
|
+
/** Last-resort user-facing text. Deliberately says nothing about the system. */
|
|
59
|
+
export const DEFAULT_USER_MESSAGE = "Something went wrong. Please try again.";
|
|
60
|
+
/** Appends a correlation id when there is one, so support has a handle. */
|
|
61
|
+
export function withRequestId(text, requestId) {
|
|
62
|
+
return requestId ? `${text} (reference: ${requestId})` : text;
|
|
63
|
+
}
|
|
22
64
|
/** HTTP 401 from the API — your API key is missing, invalid, or revoked. */
|
|
23
65
|
export class CuratorAuthError extends CuratorError {
|
|
24
|
-
constructor(message = "Invalid or revoked API key") {
|
|
25
|
-
|
|
66
|
+
constructor(message = "Invalid or revoked API key", ctx = {}) {
|
|
67
|
+
// The API key is the INTEGRATOR's credential. An end user can do nothing
|
|
68
|
+
// about it and should not be told which credential failed.
|
|
69
|
+
super(message, { ...ctx, userMessage: "This chat isn't available right now. Please try again later." });
|
|
26
70
|
this.name = "CuratorAuthError";
|
|
27
71
|
}
|
|
28
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* HTTP 401 specifically because the END-USER token was missing, expired, or
|
|
75
|
+
* unverifiable — distinct from `CuratorAuthError`, which is about the
|
|
76
|
+
* integrator's API key.
|
|
77
|
+
*
|
|
78
|
+
* Separate because the remediation is completely different: an API-key failure
|
|
79
|
+
* needs a developer, whereas this one is usually a stale session the user fixes
|
|
80
|
+
* by signing in again. Collapsing them produced "Authentication failed. Check
|
|
81
|
+
* your API key." in response to an expired user token, which sends the reader
|
|
82
|
+
* after the wrong thing entirely.
|
|
83
|
+
*/
|
|
84
|
+
export class CuratorEndUserAuthError extends CuratorError {
|
|
85
|
+
constructor(message = "End-user token could not be verified", ctx = {}) {
|
|
86
|
+
super(message, {
|
|
87
|
+
...ctx,
|
|
88
|
+
userMessage: "Your session has expired. Please sign in again to continue.",
|
|
89
|
+
});
|
|
90
|
+
this.name = "CuratorEndUserAuthError";
|
|
91
|
+
}
|
|
92
|
+
}
|
|
29
93
|
/** HTTP 403 from the API — your API key doesn't have permission for this action. */
|
|
30
94
|
export class CuratorForbiddenError extends CuratorError {
|
|
31
|
-
constructor(message = "Permission denied") {
|
|
32
|
-
super(message);
|
|
95
|
+
constructor(message = "Permission denied", ctx = {}) {
|
|
96
|
+
super(message, { ...ctx, userMessage: "You don't have access to this." });
|
|
33
97
|
this.name = "CuratorForbiddenError";
|
|
34
98
|
}
|
|
35
99
|
}
|
|
36
100
|
/** HTTP 404 from the API — the deployment slug or conversation id wasn't found. */
|
|
37
101
|
export class CuratorNotFoundError extends CuratorError {
|
|
38
|
-
constructor(message = "Resource not found") {
|
|
39
|
-
|
|
102
|
+
constructor(message = "Resource not found", ctx = {}) {
|
|
103
|
+
// Says nothing about WHICH resource: on a 404 the slug is often the thing
|
|
104
|
+
// that is wrong, and echoing it back tells a prober they guessed close.
|
|
105
|
+
super(message, { ...ctx, userMessage: "This chat isn't available." });
|
|
40
106
|
this.name = "CuratorNotFoundError";
|
|
41
107
|
}
|
|
42
108
|
}
|
|
43
109
|
/** HTTP 410 from the API — the deployment was retired. */
|
|
44
110
|
export class CuratorDeploymentRetiredError extends CuratorError {
|
|
45
111
|
retiredAt;
|
|
46
|
-
constructor(message, retiredAt) {
|
|
47
|
-
super(message
|
|
112
|
+
constructor(message, retiredAt, ctx = {}) {
|
|
113
|
+
super(message, {
|
|
114
|
+
...ctx,
|
|
115
|
+
userMessage: "This assistant is no longer available.",
|
|
116
|
+
});
|
|
48
117
|
this.name = "CuratorDeploymentRetiredError";
|
|
49
118
|
this.retiredAt = retiredAt;
|
|
50
119
|
}
|
|
@@ -52,12 +121,31 @@ export class CuratorDeploymentRetiredError extends CuratorError {
|
|
|
52
121
|
/** HTTP 429 from the API — back off. */
|
|
53
122
|
export class CuratorRateLimitError extends CuratorError {
|
|
54
123
|
retryAfterSeconds;
|
|
55
|
-
constructor(message = "Rate limit exceeded", retryAfterSeconds = null) {
|
|
56
|
-
super(message
|
|
124
|
+
constructor(message = "Rate limit exceeded", retryAfterSeconds = null, ctx = {}) {
|
|
125
|
+
super(message, {
|
|
126
|
+
...ctx,
|
|
127
|
+
userMessage: retryAfterSeconds
|
|
128
|
+
? `Too many messages. Please wait ${retryAfterSeconds} seconds and try again.`
|
|
129
|
+
: "Too many messages. Please wait a moment and try again.",
|
|
130
|
+
});
|
|
57
131
|
this.name = "CuratorRateLimitError";
|
|
58
132
|
this.retryAfterSeconds = retryAfterSeconds;
|
|
59
133
|
}
|
|
60
134
|
}
|
|
135
|
+
/**
|
|
136
|
+
* HTTP 5xx. The server already returns a generic body plus a `correlationId`
|
|
137
|
+
* for unexpected failures, so the useful thing to surface is that id — not the
|
|
138
|
+
* status line and URL the SDK used to build into `message`.
|
|
139
|
+
*/
|
|
140
|
+
export class CuratorServerError extends CuratorError {
|
|
141
|
+
constructor(message, ctx = {}) {
|
|
142
|
+
super(message, {
|
|
143
|
+
...ctx,
|
|
144
|
+
userMessage: withRequestId("Something went wrong on our end. Please try again.", ctx.requestId ?? null),
|
|
145
|
+
});
|
|
146
|
+
this.name = "CuratorServerError";
|
|
147
|
+
}
|
|
148
|
+
}
|
|
61
149
|
/**
|
|
62
150
|
* Run paused waiting for human approval. Approval resolution is not
|
|
63
151
|
* exposed to API consumers — pauses are routed through the dashboard
|
|
@@ -71,7 +159,10 @@ export class CuratorApprovalRequiredError extends CuratorError {
|
|
|
71
159
|
runId;
|
|
72
160
|
constructor(args) {
|
|
73
161
|
super(`Run paused for approval — the '${args.approval.tool_name}' tool needs an administrator to review it. ` +
|
|
74
|
-
"Contact your administrator to resolve this in the Curator dashboard."
|
|
162
|
+
"Contact your administrator to resolve this in the Curator dashboard.", {
|
|
163
|
+
userMessage: `That action needs administrator approval. Someone has been asked to review the ` +
|
|
164
|
+
`"${args.approval.tool_name}" request.`,
|
|
165
|
+
});
|
|
75
166
|
this.name = "CuratorApprovalRequiredError";
|
|
76
167
|
this.approval = args.approval;
|
|
77
168
|
this.conversationId = args.conversationId;
|
|
@@ -92,13 +183,62 @@ export class CuratorAuthorizationRequiredError extends CuratorError {
|
|
|
92
183
|
super(`Run paused for authorization — connect ${args.authorization.provider} to continue. ` +
|
|
93
184
|
(args.authorization.connect_url
|
|
94
185
|
? `Connect at ${args.authorization.connect_url}, then resume the conversation.`
|
|
95
|
-
: "Connect the provider, then resume the conversation.")
|
|
186
|
+
: "Connect the provider, then resume the conversation."), {
|
|
187
|
+
// `reason` is authored for the end user by the integration; prefer it.
|
|
188
|
+
userMessage: args.authorization.reason ||
|
|
189
|
+
`Connect your ${args.authorization.provider} account to continue.`,
|
|
190
|
+
});
|
|
96
191
|
this.name = "CuratorAuthorizationRequiredError";
|
|
97
192
|
this.authorization = args.authorization;
|
|
98
193
|
this.conversationId = args.conversationId;
|
|
99
194
|
this.runId = args.runId;
|
|
100
195
|
}
|
|
101
196
|
}
|
|
197
|
+
const DELEGATION_CODES = [
|
|
198
|
+
"DELEGATED_IDENTITY_EXPIRED",
|
|
199
|
+
"DELEGATED_IDENTITY_REVOKED",
|
|
200
|
+
"DELEGATED_TOKEN_EXCHANGE_FAILED",
|
|
201
|
+
"DOWNSTREAM_AUTH_REJECTED",
|
|
202
|
+
"DELEGATED_AUTH_NOT_CONFIGURED",
|
|
203
|
+
];
|
|
204
|
+
/** Recover the delegated-failure code from a server message prefix. */
|
|
205
|
+
export function parseDelegationFailureCode(message) {
|
|
206
|
+
if (!message)
|
|
207
|
+
return null;
|
|
208
|
+
for (const code of DELEGATION_CODES) {
|
|
209
|
+
if (message.startsWith(`${code}:`))
|
|
210
|
+
return code;
|
|
211
|
+
}
|
|
212
|
+
return null;
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* End-user text per delegated-failure code. The split that matters is WHO can
|
|
216
|
+
* fix it: expiry is the user's to resolve by re-authenticating, revocation and
|
|
217
|
+
* scope gaps need an administrator, and the exchange/config failures are ours
|
|
218
|
+
* and must not be phrased as the user's fault.
|
|
219
|
+
*/
|
|
220
|
+
function delegationUserMessage(code) {
|
|
221
|
+
switch (code) {
|
|
222
|
+
case "DELEGATED_IDENTITY_EXPIRED":
|
|
223
|
+
// The common one: a run paused past the assertion's lifetime. Retrying
|
|
224
|
+
// the same request is futile, so the text must ask for a NEW session
|
|
225
|
+
// rather than inviting another attempt.
|
|
226
|
+
return "Your session expired before that could finish. Please sign in again and retry.";
|
|
227
|
+
case "DELEGATED_IDENTITY_REVOKED":
|
|
228
|
+
// Server-side this pages someone — it means a context was crossed or
|
|
229
|
+
// probed. Never hint at the mechanism; the user just lacks authority.
|
|
230
|
+
return "You don't have permission to complete that action. Please contact your administrator.";
|
|
231
|
+
case "DOWNSTREAM_AUTH_REJECTED":
|
|
232
|
+
// Exchange worked; the resource server said no. A scope/permission gap on
|
|
233
|
+
// the customer's side, so an administrator is the right destination.
|
|
234
|
+
return "Your account doesn't have access to what that action needed. Please contact your administrator.";
|
|
235
|
+
case "DELEGATED_TOKEN_EXCHANGE_FAILED":
|
|
236
|
+
case "DELEGATED_AUTH_NOT_CONFIGURED":
|
|
237
|
+
// Ours to fix. Do not tell the user to sign in — it will not help, and it
|
|
238
|
+
// sends them chasing a problem they cannot see.
|
|
239
|
+
return "That action isn't available right now. Please try again later.";
|
|
240
|
+
}
|
|
241
|
+
}
|
|
102
242
|
/**
|
|
103
243
|
* The agent run reached a terminal error state (LLM quota, auth, 5xx
|
|
104
244
|
* exhausted retries, etc.). `failureClass` and `isPermanent` mirror the
|
|
@@ -110,9 +250,29 @@ export class CuratorAgentError extends CuratorError {
|
|
|
110
250
|
conversationId;
|
|
111
251
|
runId;
|
|
112
252
|
stepId;
|
|
253
|
+
/**
|
|
254
|
+
* Set when the run failed on delegated identity. Distinct from
|
|
255
|
+
* `failureClass`, which has no delegated variant — see
|
|
256
|
+
* {@link DelegationFailureCode}.
|
|
257
|
+
*/
|
|
258
|
+
delegationCode;
|
|
113
259
|
constructor(args) {
|
|
114
|
-
|
|
260
|
+
const delegationCode = parseDelegationFailureCode(args.message);
|
|
261
|
+
super(args.message, {
|
|
262
|
+
// NOT `args.message`: the run's failure text is written for an operator
|
|
263
|
+
// and can name providers, quotas, or step ids. A delegated failure gets
|
|
264
|
+
// its own text because the server already told us who can fix it —
|
|
265
|
+
// throwing that away and falling back to `isPermanent` is how an expired
|
|
266
|
+
// session became "couldn't complete that request", which is true and
|
|
267
|
+
// useless when "sign in again" was the answer.
|
|
268
|
+
userMessage: delegationCode
|
|
269
|
+
? delegationUserMessage(delegationCode)
|
|
270
|
+
: args.isPermanent
|
|
271
|
+
? "The assistant couldn't complete that request. Please try rephrasing, or contact support."
|
|
272
|
+
: "The assistant hit a temporary problem. Please try again.",
|
|
273
|
+
});
|
|
115
274
|
this.name = "CuratorAgentError";
|
|
275
|
+
this.delegationCode = delegationCode;
|
|
116
276
|
this.failureClass = args.failureClass;
|
|
117
277
|
this.isPermanent = args.isPermanent;
|
|
118
278
|
this.conversationId = args.conversationId;
|
|
@@ -130,7 +290,9 @@ export class CuratorTimeoutError extends CuratorError {
|
|
|
130
290
|
runId;
|
|
131
291
|
continueWaiting;
|
|
132
292
|
constructor(args) {
|
|
133
|
-
super("Timed out waiting for the agent to reply — the run is still in progress."
|
|
293
|
+
super("Timed out waiting for the agent to reply — the run is still in progress.", {
|
|
294
|
+
userMessage: "This is taking longer than usual. It may still finish — check back in a moment.",
|
|
295
|
+
});
|
|
134
296
|
this.name = "CuratorTimeoutError";
|
|
135
297
|
this.conversationId = args.conversationId;
|
|
136
298
|
this.runId = args.runId;
|
package/dist/esm/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AASH,MAAM,OAAO,YAAa,SAAQ,KAAK;IACrC,
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AASH,MAAM,OAAO,YAAa,SAAQ,KAAK;IACrC;;;;;;;;;;;;;;OAcG;IACM,WAAW,CAAQ;IAC5B,mDAAmD;IAC1C,MAAM,CAAe;IAC9B,sDAAsD;IAC7C,IAAI,CAAe;IAC5B;;;;OAIG;IACM,SAAS,CAAe;IACjC;;;OAGG;IACM,GAAG,CAAe;IAE3B,YACE,OAAe,EACf,OAOC;QAED,KAAK,CAAC,OAAO,CAAC,CAAA;QACd,IAAI,CAAC,IAAI,GAAG,cAAc,CAAA;QAC1B,IAAI,CAAC,WAAW,GAAG,OAAO,EAAE,WAAW,IAAI,oBAAoB,CAAA;QAC/D,IAAI,CAAC,MAAM,GAAG,OAAO,EAAE,MAAM,IAAI,IAAI,CAAA;QACrC,IAAI,CAAC,IAAI,GAAG,OAAO,EAAE,IAAI,IAAI,IAAI,CAAA;QACjC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F"}
|
package/dist/esm/http.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/http.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;
|
|
1
|
+
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/http.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAYH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAE7C;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,SAAS,GAAG,QAAQ,CAAA;IAC1B,yCAAyC;IACzC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,yCAAyC;IACzC,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB,UAAU,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;;;;;GAUG;AACH,MAAM,MAAM,kBAAkB,GAC1B,MAAM,GACN,CAAC,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC,CAAA;AAEvD,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,gEAAgE;IAChE,KAAK,CAAC,EAAE,OAAO,KAAK,CAAA;IACpB,8DAA8D;IAC9D,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACvC;;;;OAIG;IACH,UAAU,CAAC,EAAE,kBAAkB,CAAA;CAChC;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,QAAQ,CAAA;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC,CAAA;IAC7D,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,oEAAoE;IACpE,eAAe,CAAC,EAAE,MAAM,C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