@converge.ai/a13n 0.7.0 → 0.8.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/README.md +27 -144
- package/dist/client.d.ts +32 -14
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +92 -16
- package/dist/client.js.map +1 -1
- package/dist/conversations.d.ts +134 -0
- package/dist/conversations.d.ts.map +1 -0
- package/dist/conversations.js +421 -0
- package/dist/conversations.js.map +1 -0
- package/dist/errors.d.ts +57 -44
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +97 -63
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +25 -16
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -7
- package/dist/index.js.map +1 -1
- package/dist/models.d.ts +42 -0
- package/dist/models.d.ts.map +1 -0
- package/dist/models.js +72 -0
- package/dist/models.js.map +1 -0
- package/dist/public-models.d.ts +673 -0
- package/dist/public-models.d.ts.map +1 -0
- package/dist/public-models.js +2 -0
- package/dist/public-models.js.map +1 -0
- package/dist/realtime/browser.d.ts +16 -0
- package/dist/realtime/browser.d.ts.map +1 -0
- package/dist/realtime/browser.js +97 -0
- package/dist/realtime/browser.js.map +1 -0
- package/dist/realtime/core.d.ts +103 -0
- package/dist/realtime/core.d.ts.map +1 -0
- package/dist/realtime/core.js +240 -0
- package/dist/realtime/core.js.map +1 -0
- package/dist/resources/base.d.ts +43 -36
- package/dist/resources/base.d.ts.map +1 -1
- package/dist/resources/base.js +222 -200
- package/dist/resources/base.js.map +1 -1
- package/dist/resources/generated.d.ts +3909 -7468
- package/dist/resources/generated.d.ts.map +1 -1
- package/dist/resources/generated.js +6478 -5964
- package/dist/resources/generated.js.map +1 -1
- package/dist/resources/interaction.js +2 -2
- package/dist/resources/interaction.js.map +1 -1
- package/dist/schema.d.ts +3623 -2848
- package/dist/schema.d.ts.map +1 -1
- package/dist/session-stream-schema.d.ts +116 -2
- package/dist/session-stream-schema.d.ts.map +1 -1
- package/dist/session-stream-schema.js +10 -1
- package/dist/session-stream-schema.js.map +1 -1
- package/dist/streams/ag-ui.d.ts +114 -0
- package/dist/streams/ag-ui.d.ts.map +1 -0
- package/dist/streams/ag-ui.js +115 -0
- package/dist/streams/ag-ui.js.map +1 -0
- package/dist/streams/session-stream.d.ts +18 -7
- package/dist/streams/session-stream.d.ts.map +1 -1
- package/dist/streams/session-stream.js +95 -19
- package/dist/streams/session-stream.js.map +1 -1
- package/dist/streams/sse.d.ts +2 -2
- package/dist/streams/sse.d.ts.map +1 -1
- package/dist/streams/sse.js +5 -5
- package/dist/streams/sse.js.map +1 -1
- package/dist/streams/thread-stream.d.ts +3 -2
- package/dist/streams/thread-stream.d.ts.map +1 -1
- package/dist/streams/thread-stream.js +12 -12
- package/dist/streams/thread-stream.js.map +1 -1
- package/dist/transport.d.ts +34 -25
- package/dist/transport.d.ts.map +1 -1
- package/dist/transport.js +176 -128
- package/dist/transport.js.map +1 -1
- package/dist/webhooks.d.ts +59 -0
- package/dist/webhooks.d.ts.map +1 -0
- package/dist/webhooks.js +79 -0
- package/dist/webhooks.js.map +1 -0
- package/dist/workflow.d.ts +35 -35
- package/dist/workflow.d.ts.map +1 -1
- package/dist/workflow.js +5 -1
- package/dist/workflow.js.map +1 -1
- package/openapi.json +6632 -1049
- package/package.json +9 -8
- package/THIRD_PARTY_NOTICES.txt +0 -83
- package/dist/dispatch.d.ts +0 -6
- package/dist/dispatch.d.ts.map +0 -1
- package/dist/dispatch.js +0 -19
- package/dist/dispatch.js.map +0 -1
- package/dist/semantic.d.ts +0 -265
- package/dist/semantic.d.ts.map +0 -1
- package/dist/semantic.js +0 -624
- package/dist/semantic.js.map +0 -1
- package/dist/session-stream-validation.d.ts +0 -145
- package/dist/session-stream-validation.d.ts.map +0 -1
- package/dist/session-stream-validation.js +0 -37742
- package/dist/session-stream-validation.js.map +0 -1
- package/dist/workspace-scope.d.ts +0 -2
- package/dist/workspace-scope.d.ts.map +0 -1
- package/dist/workspace-scope.js +0 -361
- package/dist/workspace-scope.js.map +0 -1
package/dist/errors.js
CHANGED
|
@@ -1,89 +1,123 @@
|
|
|
1
|
-
/**
|
|
2
|
-
export class
|
|
1
|
+
/** Stable across bundles, workers and realms. Narrow on `kind` or `status`. */
|
|
2
|
+
export class A13nError extends Error {
|
|
3
|
+
kind;
|
|
3
4
|
status;
|
|
4
5
|
code;
|
|
5
|
-
|
|
6
|
+
reason;
|
|
6
7
|
requestId;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
a13nError = true;
|
|
9
|
+
constructor(message, kind, status = null, code = null, reason = null, requestId = null, options) {
|
|
10
|
+
super(message, options);
|
|
11
|
+
this.kind = kind;
|
|
11
12
|
this.status = status;
|
|
12
13
|
this.code = code;
|
|
13
|
-
this.
|
|
14
|
+
this.reason = reason;
|
|
14
15
|
this.requestId = requestId;
|
|
15
|
-
this.
|
|
16
|
+
this.name = new.target.name;
|
|
16
17
|
}
|
|
17
18
|
}
|
|
18
|
-
export
|
|
19
|
-
|
|
19
|
+
export function isRecord(value) {
|
|
20
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
20
21
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
22
|
+
export function isA13nError(error) {
|
|
23
|
+
return (isRecord(error) &&
|
|
24
|
+
error.a13nError === true &&
|
|
25
|
+
typeof error.kind === "string" &&
|
|
26
|
+
typeof error.message === "string");
|
|
27
|
+
}
|
|
28
|
+
export class APIError extends A13nError {
|
|
29
|
+
}
|
|
30
|
+
export class APIStatusError extends APIError {
|
|
31
|
+
details;
|
|
32
|
+
retryAfter;
|
|
33
|
+
constructor(status, code, message, details, requestId, retryAfter) {
|
|
34
|
+
const current = status === 412 && typeof details.current_etag === "string"
|
|
35
|
+
? ` Refresh the representation (current ETag ${details.current_etag}).`
|
|
36
|
+
: "";
|
|
37
|
+
const hint = status === 428
|
|
38
|
+
? " Pass the current resource ETag as ifMatch."
|
|
39
|
+
: status === 401
|
|
40
|
+
? " Verify the API key or sign in again."
|
|
41
|
+
: "";
|
|
42
|
+
super(`${message}${hint}${current}${requestId ? ` [request ${requestId}]` : ""}`, "api_status", status, code, typeof details.reason === "string" ? details.reason : null, requestId);
|
|
43
|
+
this.details = details;
|
|
44
|
+
this.retryAfter = retryAfter;
|
|
32
45
|
}
|
|
33
46
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
47
|
+
export class BadRequestError extends APIStatusError {
|
|
48
|
+
}
|
|
49
|
+
export class AuthenticationError extends APIStatusError {
|
|
50
|
+
}
|
|
51
|
+
export class PermissionDeniedError extends APIStatusError {
|
|
52
|
+
}
|
|
53
|
+
export class NotFoundError extends APIStatusError {
|
|
54
|
+
}
|
|
55
|
+
export class ConflictError extends APIStatusError {
|
|
56
|
+
}
|
|
57
|
+
export class PreconditionFailedError extends APIStatusError {
|
|
58
|
+
}
|
|
59
|
+
export class UnprocessableEntityError extends APIStatusError {
|
|
60
|
+
}
|
|
61
|
+
export class PreconditionRequiredError extends APIStatusError {
|
|
62
|
+
}
|
|
63
|
+
export class RateLimitError extends APIStatusError {
|
|
64
|
+
}
|
|
65
|
+
export class InternalServerError extends APIStatusError {
|
|
66
|
+
}
|
|
67
|
+
export class APIConnectionError extends APIError {
|
|
68
|
+
constructor(cause) {
|
|
69
|
+
super("Could not reach a13n Service. Verify the Service URL and network connection.", "connection", null, null, null, null, { cause });
|
|
39
70
|
}
|
|
40
71
|
}
|
|
41
|
-
export class
|
|
72
|
+
export class APITimeoutError extends APIError {
|
|
42
73
|
timeoutMs;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
74
|
+
constructor(timeoutMs, cause) {
|
|
75
|
+
super(timeoutMs === undefined
|
|
76
|
+
? "The request timed out."
|
|
77
|
+
: `Observation timed out after ${timeoutMs} ms. Recover using the durable resource ID.`, "timeout", null, null, null, null, { cause });
|
|
46
78
|
this.timeoutMs = timeoutMs;
|
|
47
79
|
}
|
|
48
80
|
}
|
|
49
|
-
export
|
|
50
|
-
|
|
81
|
+
export class UnexpectedResponseError extends A13nError {
|
|
82
|
+
constructor(message, options) {
|
|
83
|
+
super(message, "unexpected_response", null, null, null, null, options);
|
|
84
|
+
}
|
|
51
85
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
export async function requireSuccess(response) {
|
|
58
|
-
if (response.ok)
|
|
59
|
-
return;
|
|
60
|
-
let payload;
|
|
61
|
-
let failure;
|
|
62
|
-
try {
|
|
63
|
-
payload = await response.json();
|
|
86
|
+
export class UnknownOutcomeError extends A13nError {
|
|
87
|
+
idempotencyKey;
|
|
88
|
+
constructor(idempotencyKey, cause, response) {
|
|
89
|
+
super(`The write outcome is unknown. Check the resource before retrying.${idempotencyKey ? ` Retain idempotency key ${idempotencyKey}.` : ""}${response?.headers.get("X-Request-ID") ? ` [request ${response.headers.get("X-Request-ID")}]` : ""}`, "unknown_outcome", response?.status ?? null, null, null, response?.headers.get("X-Request-ID") ?? null, { cause });
|
|
90
|
+
this.idempotencyKey = idempotencyKey;
|
|
64
91
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
92
|
+
}
|
|
93
|
+
export class InboxEntryError extends A13nError {
|
|
94
|
+
entry;
|
|
95
|
+
run;
|
|
96
|
+
constructor(entry, run) {
|
|
97
|
+
super(`Inbox entry ${entry.id} was ${entry.status} without being consumed. Inspect the entry before submitting again.`, "inbox_entry", null, null, entry.status);
|
|
98
|
+
this.entry = entry;
|
|
99
|
+
this.run = run;
|
|
68
100
|
}
|
|
101
|
+
}
|
|
102
|
+
const statusTypes = {
|
|
103
|
+
400: BadRequestError,
|
|
104
|
+
401: AuthenticationError,
|
|
105
|
+
403: PermissionDeniedError,
|
|
106
|
+
404: NotFoundError,
|
|
107
|
+
409: ConflictError,
|
|
108
|
+
412: PreconditionFailedError,
|
|
109
|
+
422: UnprocessableEntityError,
|
|
110
|
+
428: PreconditionRequiredError,
|
|
111
|
+
429: RateLimitError,
|
|
112
|
+
};
|
|
113
|
+
export function statusError(response, payload) {
|
|
69
114
|
const error = isRecord(payload) && isRecord(payload.error) ? payload.error : {};
|
|
70
|
-
const
|
|
71
|
-
|
|
115
|
+
const Constructor = statusTypes[response.status] ??
|
|
116
|
+
(response.status >= 500 ? InternalServerError : APIStatusError);
|
|
117
|
+
return new Constructor(response.status, typeof error.code === "string" ? error.code : "http_error", typeof error.message === "string"
|
|
72
118
|
? error.message
|
|
73
119
|
: `Service request failed (${response.status}).`, isRecord(error.details) ? error.details : {}, typeof error.request_id === "string"
|
|
74
120
|
? error.request_id
|
|
75
|
-
: response.headers.get("X-Request-ID"), response.headers.get("Retry-After")
|
|
76
|
-
if (typeof error.code === "string" &&
|
|
77
|
-
typeof error.message === "string" &&
|
|
78
|
-
isRecord(error.details) &&
|
|
79
|
-
(typeof error.request_id === "string" || error.request_id === null))
|
|
80
|
-
serviceRejections.add(result);
|
|
81
|
-
throw result;
|
|
82
|
-
}
|
|
83
|
-
/** Extract a required representation; 204 operations should await their response directly. */
|
|
84
|
-
export function data(result) {
|
|
85
|
-
if (result.data === undefined)
|
|
86
|
-
throw new ProtocolError("The Service returned no representation.");
|
|
87
|
-
return result.data;
|
|
121
|
+
: response.headers.get("X-Request-ID"), response.headers.get("Retry-After"));
|
|
88
122
|
}
|
|
89
123
|
//# sourceMappingURL=errors.js.map
|
package/dist/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,MAAM,OAAO,SAAU,S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C,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,EACxC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CACpC,CAAC;AACJ,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,18 +1,27 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export type {
|
|
3
|
-
export {
|
|
4
|
-
export type
|
|
5
|
-
export {
|
|
6
|
-
export type {
|
|
7
|
-
export {
|
|
8
|
-
export type {
|
|
9
|
-
export type { SessionStreamFrame, SessionStreamSchemas, } from "./session-stream-schema.js";
|
|
10
|
-
export type { BinaryResult, ResourceResult } from "./resources/base.js";
|
|
11
|
-
export { textPayload } from "./resources/interaction.js";
|
|
1
|
+
export { Client } from "./client.js";
|
|
2
|
+
export type { ClientOptions, LoginSessionOptions } from "./client.js";
|
|
3
|
+
export type { RequestEvent, TransportOptions } from "./transport.js";
|
|
4
|
+
export type * from "./public-models.js";
|
|
5
|
+
export type { OpenString, Binary } from "./schema.js";
|
|
6
|
+
export type { ServiceResources } from "./resources/generated.js";
|
|
7
|
+
export { PagePromise } from "./resources/base.js";
|
|
8
|
+
export type { RawResponse, BinaryBody } from "./resources/base.js";
|
|
12
9
|
export type { WaitOptions } from "./resources/interaction.js";
|
|
13
|
-
export {
|
|
14
|
-
export
|
|
15
|
-
export {
|
|
16
|
-
export type {
|
|
17
|
-
export
|
|
10
|
+
export type { StandardSchema, OutputSchema } from "./models.js";
|
|
11
|
+
export { OutputValidationError } from "./models.js";
|
|
12
|
+
export { A13nError, isA13nError, APIError, APIStatusError, APIConnectionError, APITimeoutError, BadRequestError, AuthenticationError, PermissionDeniedError, NotFoundError, ConflictError, PreconditionFailedError, UnprocessableEntityError, PreconditionRequiredError, RateLimitError, InternalServerError, InboxEntryError, UnknownOutcomeError, UnexpectedResponseError, } from "./errors.js";
|
|
13
|
+
export type { ErrorKind } from "./errors.js";
|
|
14
|
+
export { RunStream } from "./conversations.js";
|
|
15
|
+
export type { InboxEntryHandle, RunHandle, Chat, ChatOptions, AgentMethods, RunEvent, InvocationOptions, RunToolsOptions, AssetUploadOptions, } from "./conversations.js";
|
|
16
|
+
export { asTextMessage, isTextCitationsEvent } from "./streams/ag-ui.js";
|
|
17
|
+
export type { AGUIEvent, UnknownEvent, TextCitationsEvent, Citation, TextMessage, } from "./streams/ag-ui.js";
|
|
18
|
+
export type { ThreadStreamFrame, ThreadEvent, ThreadStreamOptions, } from "./streams/thread-stream.js";
|
|
19
|
+
export type { SessionStreamFrame, SessionStreamEvent, SessionStreamOptions, } from "./streams/session-stream.js";
|
|
20
|
+
export type { SessionStreamSchemas } from "./session-stream-schema.js";
|
|
21
|
+
export type { RealtimeConnectOptions, RealtimeConnection, RealtimeEvent, } from "./realtime/core.js";
|
|
22
|
+
export { asset, text, json, url, approve, deny, returned, failed, } from "./workflow.js";
|
|
23
|
+
export type { MessageInput, InputPart, ResumeOptions, ResumeAnswer, ResumeAnswers, } from "./workflow.js";
|
|
24
|
+
export * as webhooks from "./webhooks.js";
|
|
25
|
+
export type { WebhookEvent } from "./webhooks.js";
|
|
26
|
+
export { WebhookVerificationError } from "./webhooks.js";
|
|
18
27
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,YAAY,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACtE,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACrE,mBAAmB,oBAAoB,CAAC;AACxC,YAAY,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;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vE,YAAY,EACV,sBAAsB,EACtB,kBAAkB,EAClB,aAAa,GACd,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,GAAG,EACH,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,MAAM,GACP,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,YAAY,EACZ,SAAS,EACT,aAAa,EACb,YAAY,EACZ,aAAa,GACd,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,YAAY,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export { text, json, url,
|
|
1
|
+
export { Client } from "./client.js";
|
|
2
|
+
export { PagePromise } from "./resources/base.js";
|
|
3
|
+
export { OutputValidationError } from "./models.js";
|
|
4
|
+
export { A13nError, isA13nError, APIError, APIStatusError, APIConnectionError, APITimeoutError, BadRequestError, AuthenticationError, PermissionDeniedError, NotFoundError, ConflictError, PreconditionFailedError, UnprocessableEntityError, PreconditionRequiredError, RateLimitError, InternalServerError, InboxEntryError, UnknownOutcomeError, UnexpectedResponseError, } from "./errors.js";
|
|
5
|
+
export { RunStream } from "./conversations.js";
|
|
6
|
+
export { asTextMessage, isTextCitationsEvent } from "./streams/ag-ui.js";
|
|
7
|
+
export { asset, text, json, url, approve, deny, returned, failed, } from "./workflow.js";
|
|
8
|
+
export * as webhooks from "./webhooks.js";
|
|
9
|
+
export { WebhookVerificationError } from "./webhooks.js";
|
|
8
10
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAMrC,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAIlD,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EACL,SAAS,EACT,WAAW,EACX,QAAQ,EACR,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,qBAAqB,EACrB,aAAa,EACb,aAAa,EACb,uBAAuB,EACvB,wBAAwB,EACxB,yBAAyB,EACzB,cAAc,EACd,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACnB,uBAAuB,GACxB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAY/C,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAwBzE,OAAO,EACL,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,GAAG,EACH,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,MAAM,GACP,MAAM,eAAe,CAAC;AAQvB,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAE1C,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC"}
|
package/dist/models.d.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { A13nError } from "./errors.js";
|
|
2
|
+
export interface StandardSchema<T> {
|
|
3
|
+
readonly "~standard": {
|
|
4
|
+
readonly validate: (value: unknown) => StandardResult<T> | Promise<StandardResult<T>>;
|
|
5
|
+
};
|
|
6
|
+
}
|
|
7
|
+
type StandardResult<T> = {
|
|
8
|
+
readonly value: T;
|
|
9
|
+
readonly issues?: undefined;
|
|
10
|
+
} | {
|
|
11
|
+
readonly issues: readonly {
|
|
12
|
+
readonly message: string;
|
|
13
|
+
}[];
|
|
14
|
+
};
|
|
15
|
+
export type OutputSchema<T> = StandardSchema<T> | {
|
|
16
|
+
parse(value: unknown): T | Promise<T>;
|
|
17
|
+
};
|
|
18
|
+
export declare class OutputValidationError extends A13nError {
|
|
19
|
+
readonly issues: readonly {
|
|
20
|
+
readonly message: string;
|
|
21
|
+
}[];
|
|
22
|
+
constructor(issues: readonly {
|
|
23
|
+
readonly message: string;
|
|
24
|
+
}[]);
|
|
25
|
+
}
|
|
26
|
+
export declare function outputAs<T>(output: unknown, schema: OutputSchema<T>): Promise<T>;
|
|
27
|
+
export type Projection = string | {
|
|
28
|
+
each: Projection;
|
|
29
|
+
} | {
|
|
30
|
+
alternatives: Projection[];
|
|
31
|
+
} | {
|
|
32
|
+
fields: Record<string, Projection>;
|
|
33
|
+
};
|
|
34
|
+
export interface ModelProjection {
|
|
35
|
+
plan?: Projection;
|
|
36
|
+
etag?: string;
|
|
37
|
+
run?: boolean;
|
|
38
|
+
}
|
|
39
|
+
/** Decorate represented resources without changing their JSON shape or inspecting user payloads. */
|
|
40
|
+
export declare function projectModels(value: unknown, plan: Projection, models: Readonly<Record<string, ModelProjection>>): void;
|
|
41
|
+
export {};
|
|
42
|
+
//# sourceMappingURL=models.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../src/models.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAY,MAAM,aAAa,CAAC;AAElD,MAAM,WAAW,cAAc,CAAC,CAAC;IAC/B,QAAQ,CAAC,WAAW,EAAE;QACpB,QAAQ,CAAC,QAAQ,EAAE,CACjB,KAAK,EAAE,OAAO,KACX,cAAc,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;KACrD,CAAC;CACH;AACD,KAAK,cAAc,CAAC,CAAC,IACjB;IAAE,QAAQ,CAAC,KAAK,EAAE,CAA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@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { A13nError, isRecord } from "./errors.js";
|
|
2
|
+
export class OutputValidationError extends A13nError {
|
|
3
|
+
issues;
|
|
4
|
+
constructor(issues) {
|
|
5
|
+
super("Run output did not match the supplied schema: " +
|
|
6
|
+
issues.map((issue) => issue.message).join("; "), "output_validation");
|
|
7
|
+
this.issues = issues;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export async function outputAs(output, schema) {
|
|
11
|
+
if ("~standard" in schema) {
|
|
12
|
+
const result = await schema["~standard"].validate(output);
|
|
13
|
+
if (result.issues)
|
|
14
|
+
throw new OutputValidationError(result.issues);
|
|
15
|
+
return result.value;
|
|
16
|
+
}
|
|
17
|
+
return schema.parse(output);
|
|
18
|
+
}
|
|
19
|
+
/** Decorate represented resources without changing their JSON shape or inspecting user payloads. */
|
|
20
|
+
export function projectModels(value, plan, models) {
|
|
21
|
+
if (value === null || typeof value !== "object")
|
|
22
|
+
return;
|
|
23
|
+
if (typeof plan === "string") {
|
|
24
|
+
if (!isRecord(value))
|
|
25
|
+
return;
|
|
26
|
+
const model = models[plan];
|
|
27
|
+
if (!model)
|
|
28
|
+
return;
|
|
29
|
+
if (model.plan)
|
|
30
|
+
projectModels(value, model.plan, models);
|
|
31
|
+
if (model.etag &&
|
|
32
|
+
typeof value[model.etag] === "string" &&
|
|
33
|
+
typeof value.version === "number" &&
|
|
34
|
+
!Object.hasOwn(value, "etag")) {
|
|
35
|
+
const id = model.etag;
|
|
36
|
+
Object.defineProperty(value, "etag", {
|
|
37
|
+
get: () => `"${value[id]}:${value.version}"`,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
if (model.run &&
|
|
41
|
+
"output" in value &&
|
|
42
|
+
"pending" in value &&
|
|
43
|
+
!Object.hasOwn(value, "outputAs")) {
|
|
44
|
+
const pending = (field) => isRecord(value.pending) ? (value.pending[field] ?? []) : [];
|
|
45
|
+
Object.defineProperties(value, {
|
|
46
|
+
text: {
|
|
47
|
+
get: () => (typeof value.output === "string" ? value.output : null),
|
|
48
|
+
},
|
|
49
|
+
outputAs: {
|
|
50
|
+
value: (schema) => outputAs(value.output, schema),
|
|
51
|
+
},
|
|
52
|
+
pendingApprovals: { get: () => pending("approvals") },
|
|
53
|
+
pendingCalls: { get: () => pending("calls") },
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
else if ("alternatives" in plan) {
|
|
58
|
+
for (const alternative of plan.alternatives)
|
|
59
|
+
projectModels(value, alternative, models);
|
|
60
|
+
}
|
|
61
|
+
else if ("each" in plan) {
|
|
62
|
+
if (Array.isArray(value))
|
|
63
|
+
for (const item of value)
|
|
64
|
+
projectModels(item, plan.each, models);
|
|
65
|
+
}
|
|
66
|
+
else if (isRecord(value)) {
|
|
67
|
+
for (const [field, child] of Object.entries(plan.fields))
|
|
68
|
+
if (Object.hasOwn(value, field))
|
|
69
|
+
projectModels(value[field], child, models);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=models.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.js","sourceRoot":"","sources":["../src/models.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAelD,MAAM,OAAO,qBAAsB,SAAQ,SAAS;IAC7B;IAArB,YAAqB,MAA+C;QAClE,KAAK,CACH,gDAAgD;YAC9C,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EACjD,mBAAmB,CACpB,CAAC;QALiB,WAAM,GAAN,MAAM,CAAyC;IAMpE,CAAC;CACF;AACD,MAAM,CAAC,KAAK,UAAU,QAAQ,CAC5B,MAAe,EACf,MAAuB;IAEvB,IAAI,WAAW,IAAI,MAAM,EAAE,CAAC;QAC1B,MAAM,MAAM,GAAG,MAAM,MAAM,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