| ... | @@ -1,15 +1,15 @@ | ... | @@ -1,15 +1,15 @@ |
| 1 | import * as Schema from "effect/Schema"; | 1 | import * as Schema from "effect/Schema"; |
| 2 | import type * as SchemaIssue from "effect/SchemaIssue"; | 2 | import type * as SchemaIssue from "effect/SchemaIssue"; |
| 3 | | 3 | |
| 4 | export const CodexAppServerRequestOperation = Schema.Literals([ | 4 | const CodexAppServerRequestOperation = Schema.Literals([ |
| 5 | "decode-payload", | 5 | "decode-payload", |
| 6 | "encode-payload", | 6 | "encode-payload", |
| 7 | "handle-request", | 7 | "handle-request", |
| 8 | "receive-response", | 8 | "receive-response", |
| 9 | ]); | 9 | ]); |
| 10 | export type CodexAppServerRequestOperation = typeof CodexAppServerRequestOperation.Type; | 10 | type CodexAppServerRequestOperation = typeof CodexAppServerRequestOperation.Type; |
| 11 | | 11 | |
| 12 | export const CodexAppServerSchemaIssueKind = Schema.Literals([ | 12 | const CodexAppServerSchemaIssueKind = Schema.Literals([ |
| 13 | "Filter", | 13 | "Filter", |
| 14 | "Encoding", | 14 | "Encoding", |
| 15 | "Pointer", | 15 | "Pointer", |
| ... | @@ -22,9 +22,9 @@ export const CodexAppServerSchemaIssueKind = Schema.Literals([ | ... | @@ -22,9 +22,9 @@ export const CodexAppServerSchemaIssueKind = Schema.Literals([ |
| 22 | "Forbidden", | 22 | "Forbidden", |
| 23 | "OneOf", | 23 | "OneOf", |
| 24 | ]); | 24 | ]); |
| 25 | export type CodexAppServerSchemaIssueKind = typeof CodexAppServerSchemaIssueKind.Type; | 25 | type CodexAppServerSchemaIssueKind = typeof CodexAppServerSchemaIssueKind.Type; |
| 26 | | 26 | |
| 27 | export interface CodexAppServerSchemaIssueDiagnostics { | 27 | interface CodexAppServerSchemaIssueDiagnostics { |
| 28 | readonly issueCount: number; | 28 | readonly issueCount: number; |
| 29 | readonly issueKinds: ReadonlyArray<CodexAppServerSchemaIssueKind>; | 29 | readonly issueKinds: ReadonlyArray<CodexAppServerSchemaIssueKind>; |
| 30 | readonly maximumPathDepth: number; | 30 | readonly maximumPathDepth: number; |
| ... | @@ -62,7 +62,7 @@ const schemaIssueDiagnostics = (root: SchemaIssue.Issue): CodexAppServerSchemaIs | ... | @@ -62,7 +62,7 @@ const schemaIssueDiagnostics = (root: SchemaIssue.Issue): CodexAppServerSchemaIs |
| 62 | }; | 62 | }; |
| 63 | }; | 63 | }; |
| 64 | | 64 | |
| 65 | export const CodexAppServerPayloadKind = Schema.Literals([ | 65 | const CodexAppServerPayloadKind = Schema.Literals([ |
| 66 | "null", | 66 | "null", |
| 67 | "array", | 67 | "array", |
| 68 | "string", | 68 | "string", |
| ... | @@ -74,7 +74,7 @@ export const CodexAppServerPayloadKind = Schema.Literals([ | ... | @@ -74,7 +74,7 @@ export const CodexAppServerPayloadKind = Schema.Literals([ |
| 74 | "function", | 74 | "function", |
| 75 | "undefined", | 75 | "undefined", |
| 76 | ]); | 76 | ]); |
| 77 | export type CodexAppServerPayloadKind = typeof CodexAppServerPayloadKind.Type; | 77 | type CodexAppServerPayloadKind = typeof CodexAppServerPayloadKind.Type; |
| 78 | | 78 | |
| 79 | const payloadKind = (payload: unknown): CodexAppServerPayloadKind => { | 79 | const payloadKind = (payload: unknown): CodexAppServerPayloadKind => { |
| 80 | if (payload === null) return "null"; | 80 | if (payload === null) return "null"; |
| ... | @@ -84,8 +84,7 @@ const payloadKind = (payload: unknown): CodexAppServerPayloadKind => { | ... | @@ -84,8 +84,7 @@ const payloadKind = (payload: unknown): CodexAppServerPayloadKind => { |
| 84 | | 84 | |
| 85 | const protocolMessageFields = ["id", "method", "params", "result", "error"] as const; | 85 | const protocolMessageFields = ["id", "method", "params", "result", "error"] as const; |
| 86 | | 86 | |
| 87 | export const CodexAppServerProtocolMessageField = Schema.Literals(protocolMessageFields); | 87 | const CodexAppServerProtocolMessageField = Schema.Literals(protocolMessageFields); |
| 88 | export type CodexAppServerProtocolMessageField = typeof CodexAppServerProtocolMessageField.Type; | | |
| 89 | | 88 | |
| 90 | export interface CodexAppServerRequestDiagnostics { | 89 | export interface CodexAppServerRequestDiagnostics { |
| 91 | readonly method?: string; | 90 | readonly method?: string; |