Skip to main content

createAuthoringProtocolServer

@gooi/language-server


@gooi/language-server / features/protocol/create-authoring-protocol-server / createAuthoringProtocolServer

Function: createAuthoringProtocolServer()

createAuthoringProtocolServer(input): AuthoringProtocolServer

Defined in: authoring/language-server/src/features/protocol/create-authoring-protocol-server.ts:39

Creates a protocol server that routes protocol methods to authoring handlers.

Parameters

ParameterType
input{ context: { capabilityIndexSnapshot: { artifactHash: string; artifactVersion: "1.0.0"; capabilities: object[]; catalogIdentity: { catalogHash: string; catalogSource: string; catalogVersion: string; }; sourceHash: string; }; compiledEntrypointBundleIdentity: { artifactHash: string; artifactId: "CompiledEntrypointBundle"; artifactVersion: string; }; documentPath: string; documentText: string; documentUri: string; lockfile: { artifactHash: string; artifactVersion: "1.0.0"; catalogSnapshot: { catalogHash: string; catalogSource: string; catalogVersion: string; }; envelopeVersions: { authoringDiagnosticsEnvelope: "1.0.0"; authoringErrorEnvelope: "1.0.0"; authoringRequestEnvelope: "1.0.0"; authoringResultEnvelope: "1.0.0"; }; remoteSource?: { fetchedAt: string; id: string; url: string; }; requiredArtifacts: { capabilityIndexSnapshot: { artifactHash: string; artifactId: string; artifactVersion: string; }; compiledEntrypointBundle: { artifactHash: string; artifactId: string; artifactVersion: string; }; symbolGraphSnapshot: { artifactHash: string; artifactId: string; artifactVersion: string; }; }; sourceHash: string; sourceKind: "workspace-local"; }; sourceSpec?: unknown; symbolGraphSnapshot: { artifactHash: string; artifactVersion: "1.0.0"; references: object[]; renameConstraints: object[]; sourceHash: string; symbols: object[]; }; }; hooks?: AuthoringProtocolServerHooks; initialVersion?: number; }
input.context{ capabilityIndexSnapshot: { artifactHash: string; artifactVersion: "1.0.0"; capabilities: object[]; catalogIdentity: { catalogHash: string; catalogSource: string; catalogVersion: string; }; sourceHash: string; }; compiledEntrypointBundleIdentity: { artifactHash: string; artifactId: "CompiledEntrypointBundle"; artifactVersion: string; }; documentPath: string; documentText: string; documentUri: string; lockfile: { artifactHash: string; artifactVersion: "1.0.0"; catalogSnapshot: { catalogHash: string; catalogSource: string; catalogVersion: string; }; envelopeVersions: { authoringDiagnosticsEnvelope: "1.0.0"; authoringErrorEnvelope: "1.0.0"; authoringRequestEnvelope: "1.0.0"; authoringResultEnvelope: "1.0.0"; }; remoteSource?: { fetchedAt: string; id: string; url: string; }; requiredArtifacts: { capabilityIndexSnapshot: { artifactHash: string; artifactId: string; artifactVersion: string; }; compiledEntrypointBundle: { artifactHash: string; artifactId: string; artifactVersion: string; }; symbolGraphSnapshot: { artifactHash: string; artifactId: string; artifactVersion: string; }; }; sourceHash: string; sourceKind: "workspace-local"; }; sourceSpec?: unknown; symbolGraphSnapshot: { artifactHash: string; artifactVersion: "1.0.0"; references: object[]; renameConstraints: object[]; sourceHash: string; symbols: object[]; }; }
input.context.capabilityIndexSnapshot{ artifactHash: string; artifactVersion: "1.0.0"; capabilities: object[]; catalogIdentity: { catalogHash: string; catalogSource: string; catalogVersion: string; }; sourceHash: string; }
input.context.capabilityIndexSnapshot.artifactHashstring
input.context.capabilityIndexSnapshot.artifactVersion"1.0.0"
input.context.capabilityIndexSnapshot.capabilitiesobject[]
input.context.capabilityIndexSnapshot.catalogIdentity{ catalogHash: string; catalogSource: string; catalogVersion: string; }
input.context.capabilityIndexSnapshot.catalogIdentity.catalogHashstring
input.context.capabilityIndexSnapshot.catalogIdentity.catalogSourcestring
input.context.capabilityIndexSnapshot.catalogIdentity.catalogVersionstring
input.context.capabilityIndexSnapshot.sourceHashstring
input.context.compiledEntrypointBundleIdentity{ artifactHash: string; artifactId: "CompiledEntrypointBundle"; artifactVersion: string; }
input.context.compiledEntrypointBundleIdentity.artifactHashstring
input.context.compiledEntrypointBundleIdentity.artifactId"CompiledEntrypointBundle"
input.context.compiledEntrypointBundleIdentity.artifactVersionstring
input.context.documentPathstring
input.context.documentTextstring
input.context.documentUristring
input.context.lockfile{ artifactHash: string; artifactVersion: "1.0.0"; catalogSnapshot: { catalogHash: string; catalogSource: string; catalogVersion: string; }; envelopeVersions: { authoringDiagnosticsEnvelope: "1.0.0"; authoringErrorEnvelope: "1.0.0"; authoringRequestEnvelope: "1.0.0"; authoringResultEnvelope: "1.0.0"; }; remoteSource?: { fetchedAt: string; id: string; url: string; }; requiredArtifacts: { capabilityIndexSnapshot: { artifactHash: string; artifactId: string; artifactVersion: string; }; compiledEntrypointBundle: { artifactHash: string; artifactId: string; artifactVersion: string; }; symbolGraphSnapshot: { artifactHash: string; artifactId: string; artifactVersion: string; }; }; sourceHash: string; sourceKind: "workspace-local"; }
input.context.lockfile.artifactHashstring
input.context.lockfile.artifactVersion"1.0.0"
input.context.lockfile.catalogSnapshot{ catalogHash: string; catalogSource: string; catalogVersion: string; }
input.context.lockfile.catalogSnapshot.catalogHashstring
input.context.lockfile.catalogSnapshot.catalogSourcestring
input.context.lockfile.catalogSnapshot.catalogVersionstring
input.context.lockfile.envelopeVersions{ authoringDiagnosticsEnvelope: "1.0.0"; authoringErrorEnvelope: "1.0.0"; authoringRequestEnvelope: "1.0.0"; authoringResultEnvelope: "1.0.0"; }
input.context.lockfile.envelopeVersions.authoringDiagnosticsEnvelope"1.0.0"
input.context.lockfile.envelopeVersions.authoringErrorEnvelope"1.0.0"
input.context.lockfile.envelopeVersions.authoringRequestEnvelope"1.0.0"
input.context.lockfile.envelopeVersions.authoringResultEnvelope"1.0.0"
input.context.lockfile.remoteSource?{ fetchedAt: string; id: string; url: string; }
input.context.lockfile.remoteSource.fetchedAtstring
input.context.lockfile.remoteSource.idstring
input.context.lockfile.remoteSource.urlstring
input.context.lockfile.requiredArtifacts{ capabilityIndexSnapshot: { artifactHash: string; artifactId: string; artifactVersion: string; }; compiledEntrypointBundle: { artifactHash: string; artifactId: string; artifactVersion: string; }; symbolGraphSnapshot: { artifactHash: string; artifactId: string; artifactVersion: string; }; }
input.context.lockfile.requiredArtifacts.capabilityIndexSnapshot{ artifactHash: string; artifactId: string; artifactVersion: string; }
input.context.lockfile.requiredArtifacts.capabilityIndexSnapshot.artifactHashstring
input.context.lockfile.requiredArtifacts.capabilityIndexSnapshot.artifactIdstring
input.context.lockfile.requiredArtifacts.capabilityIndexSnapshot.artifactVersionstring
input.context.lockfile.requiredArtifacts.compiledEntrypointBundle{ artifactHash: string; artifactId: string; artifactVersion: string; }
input.context.lockfile.requiredArtifacts.compiledEntrypointBundle.artifactHashstring
input.context.lockfile.requiredArtifacts.compiledEntrypointBundle.artifactIdstring
input.context.lockfile.requiredArtifacts.compiledEntrypointBundle.artifactVersionstring
input.context.lockfile.requiredArtifacts.symbolGraphSnapshot{ artifactHash: string; artifactId: string; artifactVersion: string; }
input.context.lockfile.requiredArtifacts.symbolGraphSnapshot.artifactHashstring
input.context.lockfile.requiredArtifacts.symbolGraphSnapshot.artifactIdstring
input.context.lockfile.requiredArtifacts.symbolGraphSnapshot.artifactVersionstring
input.context.lockfile.sourceHashstring
input.context.lockfile.sourceKind"workspace-local"
input.context.sourceSpec?unknown
input.context.symbolGraphSnapshot{ artifactHash: string; artifactVersion: "1.0.0"; references: object[]; renameConstraints: object[]; sourceHash: string; symbols: object[]; }
input.context.symbolGraphSnapshot.artifactHashstring
input.context.symbolGraphSnapshot.artifactVersion"1.0.0"
input.context.symbolGraphSnapshot.referencesobject[]
input.context.symbolGraphSnapshot.renameConstraintsobject[]
input.context.symbolGraphSnapshot.sourceHashstring
input.context.symbolGraphSnapshot.symbolsobject[]
input.hooks?AuthoringProtocolServerHooks
input.initialVersion?number

Returns

AuthoringProtocolServer