@orkestrel/scaffold 0.0.115 → 0.0.116
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/bin/main.js +137 -15
- package/dist/bin/main.js.map +1 -1
- package/dist/host/agents/skills/orkestrel-publish/references/wave.md +1 -1
- package/dist/host/claude/agents/orkestrel.md +1 -1
- package/dist/host/claude/rules/names.md +3 -1
- package/dist/host/guides/abort.md +17 -17
- package/dist/host/guides/agent.md +445 -445
- package/dist/host/guides/brief.md +143 -143
- package/dist/host/guides/browser.md +731 -731
- package/dist/host/guides/budget.md +39 -39
- package/dist/host/guides/capture.md +298 -298
- package/dist/host/guides/console.md +109 -109
- package/dist/host/guides/contract.md +335 -335
- package/dist/host/guides/csv.md +30 -30
- package/dist/host/guides/database.md +163 -163
- package/dist/host/guides/emitter.md +17 -17
- package/dist/host/guides/form.md +99 -99
- package/dist/host/guides/guide.md +361 -183
- package/dist/host/guides/html.md +49 -49
- package/dist/host/guides/indexeddb.md +40 -40
- package/dist/host/guides/interpret.md +139 -139
- package/dist/host/guides/lsp.md +114 -114
- package/dist/host/guides/markdown.md +68 -68
- package/dist/host/guides/mcp.md +3745 -3745
- package/dist/host/guides/middleware.md +170 -170
- package/dist/host/guides/msg.md +95 -95
- package/dist/host/guides/ndjson.md +8 -8
- package/dist/host/guides/ollama.md +56 -56
- package/dist/host/guides/pool.md +21 -21
- package/dist/host/guides/probe.md +82 -82
- package/dist/host/guides/process.md +99 -99
- package/dist/host/guides/program.md +98 -96
- package/dist/host/guides/qualifier.md +70 -70
- package/dist/host/guides/queue.md +37 -37
- package/dist/host/guides/rater.md +38 -38
- package/dist/host/guides/reason.md +308 -308
- package/dist/host/guides/relation.md +50 -50
- package/dist/host/guides/router.md +58 -58
- package/dist/host/guides/scaffold.md +554 -419
- package/dist/host/guides/sea.md +128 -128
- package/dist/host/guides/server.md +100 -100
- package/dist/host/guides/sqlite.md +28 -28
- package/dist/host/guides/sse.md +20 -20
- package/dist/host/guides/study.md +444 -444
- package/dist/host/guides/table.md +82 -82
- package/dist/host/guides/template.md +41 -41
- package/dist/host/guides/terminal.md +121 -121
- package/dist/host/guides/test.md +273 -273
- package/dist/host/guides/timeout.md +18 -18
- package/dist/host/guides/tool.md +27 -27
- package/dist/host/guides/toolbox.md +166 -166
- package/dist/host/guides/websocket.md +54 -54
- package/dist/host/guides/worker.md +24 -24
- package/dist/host/guides/workflow.md +187 -187
- package/dist/host/guides/workspace.md +55 -55
- package/dist/host/manifest.json +55 -55
- package/dist/host/tests/setupPolicy.ts +5 -3
- package/dist/src/core/index.cjs +89 -3
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +229 -144
- package/dist/src/core/index.d.ts +229 -144
- package/dist/src/core/index.js +87 -4
- package/dist/src/core/index.js.map +1 -1
- package/dist/src/server/index.cjs +292 -66
- package/dist/src/server/index.cjs.map +1 -1
- package/dist/src/server/index.d.cts +188 -6
- package/dist/src/server/index.d.ts +188 -6
- package/dist/src/server/index.js +287 -69
- package/dist/src/server/index.js.map +1 -1
- package/package.json +4 -3
package/dist/host/guides/lsp.md
CHANGED
|
@@ -378,12 +378,12 @@ The server surface provides these exports.
|
|
|
378
378
|
|
|
379
379
|
A `Shape` cell holds an interface's data members as bare names in braces, `?` marking an optional member and `plus` introducing its call-signature members, and a type alias's own type literal with a union's arms escaped as `\|`. An extended interface's name comes before `plus`, with the members it adds after. A function row's `Shape` cell holds its signature, and a guard row's the type it narrows to. A class row's `Shape` cell holds the interface it implements, or its constructor signature where it implements none.
|
|
380
380
|
|
|
381
|
-
|
|
|
382
|
-
| ------------------------------- | --------- |
|
|
383
|
-
| `StdioClientTransport` | class | `StdioClientTransportInterface`
|
|
384
|
-
| `createStdioClientTransport` | function | `(options: StdioClientTransportOptions) => StdioClientTransportInterface`
|
|
385
|
-
| `StdioClientTransportInterface` | interface | `
|
|
386
|
-
| `StdioClientTransportOptions` | interface | `{ on?, error?, server, grace? }`
|
|
381
|
+
| Name | Kind | Signature | Summary |
|
|
382
|
+
| ------------------------------- | --------- | ----------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
|
|
383
|
+
| `StdioClientTransport` | class | `new (options: StdioClientTransportOptions) => StdioClientTransportInterface` | Streams Language Server Protocol bytes between a client and a child process over stdio. |
|
|
384
|
+
| `createStdioClientTransport` | function | `(options: StdioClientTransportOptions) => StdioClientTransportInterface` | Creates a byte transport over a Language Server Protocol child process. |
|
|
385
|
+
| `StdioClientTransportInterface` | interface | `{ pid }` | Defines the stdio transport's own surface beyond the byte transport it carries. |
|
|
386
|
+
| `StdioClientTransportOptions` | interface | `{ on?, error?, server, grace? }` | Configures a Language Server Protocol child process reached over its standard streams. |
|
|
387
387
|
|
|
388
388
|
### Client and transport contracts
|
|
389
389
|
|
|
@@ -391,19 +391,19 @@ The client surface provides these entities and configuration contracts.
|
|
|
391
391
|
|
|
392
392
|
A `Shape` cell holds an interface's data members as bare names in braces, `?` marking an optional member and `plus` introducing its call-signature members, and a type alias's own type literal with a union's arms escaped as `\|`. A function row's `Shape` cell holds its signature, and a guard row's the type it narrows to. A class row's `Shape` cell holds the interface it implements, or its constructor signature where it implements none.
|
|
393
393
|
|
|
394
|
-
|
|
|
395
|
-
| ----------------------- | --------- |
|
|
396
|
-
| `LSPClient` | class | `LSPClientInterface`
|
|
397
|
-
| `createLSPClient` | function | `(options: LSPClientOptions) => LSPClientInterface`
|
|
398
|
-
| `LSPClientInterface` | interface | `{ emitter, capabilities, encoding
|
|
399
|
-
| `LSPClientOptions` | interface | `{ on?, error?, transport, workspace, timeout?, signal? }`
|
|
400
|
-
| `LSPOpenOptions` | interface | `{ signal }`
|
|
401
|
-
| `LSPClientEventMap` | type | `{ notification
|
|
402
|
-
| `LSPClientLifecycle` | type | `{ phase: 'idle' } \| { phase: 'starting'
|
|
403
|
-
| `LSPClientCapabilities` | interface | `{ general?, textDocument? }`
|
|
404
|
-
| `LSPTransportInterface` | interface | `{ emitter
|
|
405
|
-
| `LSPTransportEventMap` | type | `{ chunk
|
|
406
|
-
| `LSPPending` | interface | `{ resolve, reject, signal, abort }`
|
|
394
|
+
| Name | Kind | Signature | Summary |
|
|
395
|
+
| ----------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
|
|
396
|
+
| `LSPClient` | class | `new (options: LSPClientOptions) => LSPClientInterface` | Drives a Language Server Protocol peer through an injected byte transport. |
|
|
397
|
+
| `createLSPClient` | function | `(options: LSPClientOptions) => LSPClientInterface` | Creates a transport-agnostic Language Server Protocol client. |
|
|
398
|
+
| `LSPClientInterface` | interface | `{ emitter, capabilities, encoding, start(), open(), close(), destroy() }` | Defines the document-oriented behavior exposed by an LSP client. |
|
|
399
|
+
| `LSPClientOptions` | interface | `{ on?, error?, transport, workspace, timeout?, signal? }` | Configures an LSP client and its transport. |
|
|
400
|
+
| `LSPOpenOptions` | interface | `{ signal }` | Configures a document inspection with the signal that bounds its diagnostics wait. |
|
|
401
|
+
| `LSPClientEventMap` | type | `{ readonly notification: readonly [message: JSONRPCNotification]; readonly exit: readonly [exit: LSPExit]; readonly error: readonly [error: unknown]; }` | Maps client event names to their listener arguments. |
|
|
402
|
+
| `LSPClientLifecycle` | type | `{ readonly phase: 'idle'; } \| { readonly phase: 'starting'; readonly promise: Promise<void>; readonly generation: number; } \| { readonly phase: 'ready'; readonly generation: number; } \| { readonly phase: 'closed'; } \| { readonly phase: 'destroying'; readonly promise: Promise<void>; readonly generation?: number; } \| { readonly phase: 'destroyed'; }` | Describes the lifecycle state that gates client operations and transport generations. |
|
|
403
|
+
| `LSPClientCapabilities` | interface | `{ general?, textDocument? }` | Describes the Language Server Protocol features this client advertises. |
|
|
404
|
+
| `LSPTransportInterface` | interface | `{ emitter, start(), send(), close() }` | Defines the byte transport required by an LSP client. |
|
|
405
|
+
| `LSPTransportEventMap` | type | `{ readonly chunk: readonly [chunk: Uint8Array]; readonly exit: readonly [exit: LSPExit]; readonly error: readonly [error: unknown]; }` | Maps transport event names to their listener arguments. |
|
|
406
|
+
| `LSPPending` | interface | `{ resolve, reject, signal, abort }` | Describes one settlement record a client holds for an operation awaiting its outcome. |
|
|
407
407
|
|
|
408
408
|
### Framing, timing, and errors
|
|
409
409
|
|
|
@@ -416,22 +416,22 @@ when their members conform, and message arrays are checked by index without runn
|
|
|
416
416
|
|
|
417
417
|
A `Shape` cell holds an interface's data members as bare names in braces, `?` marking an optional member and `plus` introducing its call-signature members, and a type alias's own type literal with a union's arms escaped as `\|`. A function row's `Shape` cell holds its signature, and a guard row's the type it narrows to. A class row's `Shape` cell holds the interface it implements, or its constructor signature where it implements none.
|
|
418
418
|
|
|
419
|
-
|
|
|
420
|
-
| ------------------ | --------- |
|
|
421
|
-
| `encodeLSPMessage` | function | `(message: JSONRPCMessage) => Uint8Array`
|
|
422
|
-
| `parseLSPMessages` | function | `(chunk: Uint8Array, state?: LSPDecodeState) => readonly [messages: readonly JSONRPCMessage[], state: LSPDecodeState \| undefined]`
|
|
423
|
-
| `LSPDecodeState` | type | `{ bytes
|
|
424
|
-
| `buildLSPSegment` | function | `(state: LSPDecodeState \| undefined, chunk: Uint8Array) => LSPDecodeState \| undefined`
|
|
425
|
-
| `LSPChain` | class | `IterableIterator<LSPDecodeState>`
|
|
426
|
-
| `scanLSPBoundary` | function | `(bytes: Uint8Array) => number \| undefined`
|
|
427
|
-
| `readLSPHeader` | function | `(header: Uint8Array, messages?: readonly JSONRPCMessage[]) => number`
|
|
428
|
-
| `readLSPBody` | function | `(body: Uint8Array, messages?: readonly JSONRPCMessage[]) => JSONRPCMessage`
|
|
429
|
-
| `waitForDeadline` | function | `(timeout: number) => Promise<void>`
|
|
430
|
-
| `LSPError` | class | `new (message: string, options: LSPErrorOptions) => LSPError`
|
|
431
|
-
| `isLSPError` | function | `LSPError`
|
|
432
|
-
| `LSPErrorCode` | type | `
|
|
433
|
-
| `LSPErrorContext` | interface | `{ code?, messages?, value? }`
|
|
434
|
-
| `LSPErrorOptions` | interface | `{ code, context?, cause? }`
|
|
419
|
+
| Name | Kind | Signature | Summary |
|
|
420
|
+
| ------------------ | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
|
|
421
|
+
| `encodeLSPMessage` | function | `(message: JSONRPCMessage) => Uint8Array` | Encodes a JSON-RPC message as one byte-accurate LSP base-protocol frame. |
|
|
422
|
+
| `parseLSPMessages` | function | `(chunk: Uint8Array, state?: LSPDecodeState) => readonly [messages: readonly JSONRPCMessage[], state: LSPDecodeState \| undefined]` | Parses a byte chunk into complete LSP base-protocol messages and retained decode state. |
|
|
423
|
+
| `LSPDecodeState` | type | `{ readonly bytes: Uint8Array; readonly previous?: LSPDecodeState; readonly size: number; readonly boundary?: never; readonly length?: never; } \| { readonly bytes: Uint8Array; readonly previous?: LSPDecodeState; readonly size: number; readonly boundary: number; readonly length: number; }` | Retains incremental base-protocol bytes and resolved framing metadata between decode calls. |
|
|
424
|
+
| `buildLSPSegment` | function | `(state: LSPDecodeState \| undefined, chunk: Uint8Array) => LSPDecodeState \| undefined` | Appends an owned byte segment while retaining the preceding framing metadata. |
|
|
425
|
+
| `LSPChain` | class | `new (state: LSPDecodeState) => IterableIterator<LSPDecodeState>` | Walks retained decode segments newest first and copies their bytes in arrival order. |
|
|
426
|
+
| `scanLSPBoundary` | function | `(bytes: Uint8Array) => number \| undefined` | Finds the first base-protocol header boundary in a flat buffer. |
|
|
427
|
+
| `readLSPHeader` | function | `(header: Uint8Array, messages?: readonly JSONRPCMessage[]) => number` | Reads one base-protocol header block and returns the content length it declares. |
|
|
428
|
+
| `readLSPBody` | function | `(body: Uint8Array, messages?: readonly JSONRPCMessage[]) => JSONRPCMessage` | Reads one base-protocol content body as a validated JSON-RPC message. |
|
|
429
|
+
| `waitForDeadline` | function | `(timeout: number) => Promise<void>` | Waits for a deadline to elapse without holding the host event loop open. |
|
|
430
|
+
| `LSPError` | class | `new (message: string, options: LSPErrorOptions) => LSPError` | Reports a package failure with a stable machine-readable category. |
|
|
431
|
+
| `isLSPError` | function | `(value: unknown) => value is LSPError` | Checks whether an unknown value is a branded package error. |
|
|
432
|
+
| `LSPErrorCode` | type | `(typeof LSP_ERROR_CODES)[number]` | Identifies a stable package failure category, derived from `LSP_ERROR_CODES`. |
|
|
433
|
+
| `LSPErrorContext` | interface | `{ code?, messages?, value? }` | Describes structured details attached to an `LSPError`. |
|
|
434
|
+
| `LSPErrorOptions` | interface | `{ code, context?, cause? }` | Configures an `LSPError` instance. |
|
|
435
435
|
|
|
436
436
|
### JSON-RPC and initialization
|
|
437
437
|
|
|
@@ -439,21 +439,21 @@ The JSON-RPC and initialization surface provides these payload types.
|
|
|
439
439
|
|
|
440
440
|
A `Shape` cell holds an interface's data members as bare names in braces, `?` marking an optional member and `plus` introducing its call-signature members, and a type alias's own type literal with a union's arms escaped as `\|`.
|
|
441
441
|
|
|
442
|
-
|
|
|
443
|
-
| ----------------------- | --------- |
|
|
444
|
-
| `JSONRPCId` | type | `string \| number`
|
|
445
|
-
| `JSONRPCRequest` | interface | `{ jsonrpc, id, method, params? }`
|
|
446
|
-
| `JSONRPCNotification` | interface | `{ jsonrpc, method, id?, params? }`
|
|
447
|
-
| `JSONRPCError` | interface | `{ code, message, data? }`
|
|
448
|
-
| `JSONRPCResultResponse` | interface | `{ jsonrpc, id, result, error? }`
|
|
449
|
-
| `JSONRPCErrorResponse` | interface | `{ jsonrpc, id, error, result? }`
|
|
450
|
-
| `JSONRPCResponse` | type | `JSONRPCResultResponse \| JSONRPCErrorResponse`
|
|
451
|
-
| `JSONRPCMessage` | type | `JSONRPCRequest \| JSONRPCNotification \| JSONRPCResponse`
|
|
452
|
-
| `LSPIdentity` | interface | `{ name, version? }`
|
|
453
|
-
| `LSPInitializeParams` | interface | `{ processId, clientInfo?, rootUri, capabilities }`
|
|
454
|
-
| `LSPInitializeResult` | interface | `{ capabilities, serverInfo? }`
|
|
455
|
-
| `LSPServerCapabilities` | interface | `{ positionEncoding?, textDocumentSync?, diagnosticProvider
|
|
456
|
-
| `LSPExit` | interface | `{ code, signal }`
|
|
442
|
+
| Name | Kind | Signature | Summary |
|
|
443
|
+
| ----------------------- | --------- | ------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
|
|
444
|
+
| `JSONRPCId` | type | `string \| number` | Identifies a JSON-RPC request and its matching response. |
|
|
445
|
+
| `JSONRPCRequest` | interface | `{ jsonrpc, id, method, params? }` | Describes a JSON-RPC 2.0 method call that requires a response. |
|
|
446
|
+
| `JSONRPCNotification` | interface | `{ jsonrpc, method, id?, params? }` | Describes a JSON-RPC 2.0 method call that permits no response. |
|
|
447
|
+
| `JSONRPCError` | interface | `{ code, message, data? }` | Describes the error payload carried by a JSON-RPC error response. |
|
|
448
|
+
| `JSONRPCResultResponse` | interface | `{ jsonrpc, id, result, error? }` | Describes a successful JSON-RPC 2.0 response. |
|
|
449
|
+
| `JSONRPCErrorResponse` | interface | `{ jsonrpc, id, error, result? }` | Describes a failed JSON-RPC 2.0 response. |
|
|
450
|
+
| `JSONRPCResponse` | type | `JSONRPCResultResponse \| JSONRPCErrorResponse` | Describes either outcome of a JSON-RPC 2.0 request. |
|
|
451
|
+
| `JSONRPCMessage` | type | `JSONRPCRequest \| JSONRPCNotification \| JSONRPCResponse` | Describes one complete JSON-RPC 2.0 wire message. |
|
|
452
|
+
| `LSPIdentity` | interface | `{ name, version? }` | Describes the name and optional version of an LSP peer. |
|
|
453
|
+
| `LSPInitializeParams` | interface | `{ processId, clientInfo?, rootUri, capabilities }` | Describes the initialization members sent by this client. |
|
|
454
|
+
| `LSPInitializeResult` | interface | `{ capabilities, serverInfo? }` | Describes the successful result of an initialize request. |
|
|
455
|
+
| `LSPServerCapabilities` | interface | `{ positionEncoding?, textDocumentSync?, diagnosticProvider?, readonly [capability: string]: unknown }` | Describes the known and extension capabilities returned by a language server. |
|
|
456
|
+
| `LSPExit` | interface | `{ code, signal }` | Describes how a transport process ended. |
|
|
457
457
|
|
|
458
458
|
### Documents and diagnostics
|
|
459
459
|
|
|
@@ -461,27 +461,27 @@ The document and diagnostic surface provides these payload types.
|
|
|
461
461
|
|
|
462
462
|
A `Shape` cell holds an interface's data members as bare names in braces, `?` marking an optional member and `plus` introducing its call-signature members, and a type alias's own type literal with a union's arms escaped as `\|`.
|
|
463
463
|
|
|
464
|
-
|
|
|
465
|
-
| ----------------------------- | --------- |
|
|
466
|
-
| `LSPDocumentURI` | type | `string`
|
|
467
|
-
| `LSPPosition` | interface | `{ line, character }`
|
|
468
|
-
| `LSPRange` | interface | `{ start, end }`
|
|
469
|
-
| `LSPLocation` | interface | `{ uri, range }`
|
|
470
|
-
| `LSPTextDocumentIdentifier` | interface | `{ uri }`
|
|
471
|
-
| `LSPTextDocumentItem` | interface | `{ uri, languageId, version, text }`
|
|
472
|
-
| `LSPDiagnosticSeverity` | type | `
|
|
473
|
-
| `LSPDiagnosticTag` | type | `
|
|
474
|
-
| `LSPCodeDescription` | interface | `{ href }`
|
|
475
|
-
| `LSPDiagnosticRelated` | interface | `{ location, message }`
|
|
476
|
-
| `LSPDiagnostic` | interface | `{ range, severity?, code?, codeDescription?, source?, message, tags?, relatedInformation?, data? }`
|
|
477
|
-
| `LSPPublishDiagnosticsParams` | interface | `{ uri, version?, diagnostics }`
|
|
478
|
-
| `LSPDocumentDiagnosticParams` | interface | `{ textDocument, identifier?, previousResultId? }`
|
|
479
|
-
| `LSPDocumentDiagnosticReport` | type | `{ kind: 'full'
|
|
480
|
-
| `LSPPositionEncoding` | type | `string`
|
|
481
|
-
| `LSPTextDocumentSyncKind` | type | `
|
|
482
|
-
| `LSPTextDocumentSyncOptions` | interface | `{ openClose?, change? }`
|
|
483
|
-
| `LSPTextDocumentSync` | type | `LSPTextDocumentSyncKind \| LSPTextDocumentSyncOptions`
|
|
484
|
-
| `LSPDiagnosticOptions` | interface | `{ identifier?, interFileDependencies, workspaceDiagnostics }`
|
|
464
|
+
| Name | Kind | Signature | Summary |
|
|
465
|
+
| ----------------------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
|
|
466
|
+
| `LSPDocumentURI` | type | `string` | Identifies a document by its Language Server Protocol URI. |
|
|
467
|
+
| `LSPPosition` | interface | `{ line, character }` | Describes a zero-based position inside a text document. |
|
|
468
|
+
| `LSPRange` | interface | `{ start, end }` | Describes a half-open span inside a text document. |
|
|
469
|
+
| `LSPLocation` | interface | `{ uri, range }` | Describes a document URI and range pair. |
|
|
470
|
+
| `LSPTextDocumentIdentifier` | interface | `{ uri }` | Identifies a text document in a Language Server Protocol message. |
|
|
471
|
+
| `LSPTextDocumentItem` | interface | `{ uri, languageId, version, text }` | Describes the complete text and identity of a document being opened. |
|
|
472
|
+
| `LSPDiagnosticSeverity` | type | `(typeof LSP_DIAGNOSTIC_SEVERITIES)[number]` | Identifies the standard severity assigned to a diagnostic, derived from `LSP_DIAGNOSTIC_SEVERITIES`. |
|
|
473
|
+
| `LSPDiagnosticTag` | type | `(typeof LSP_DIAGNOSTIC_TAGS)[number]` | Identifies a standard tag assigned to a diagnostic, derived from `LSP_DIAGNOSTIC_TAGS`. |
|
|
474
|
+
| `LSPCodeDescription` | interface | `{ href }` | Describes the external resource that explains a diagnostic code. |
|
|
475
|
+
| `LSPDiagnosticRelated` | interface | `{ location, message }` | Describes related diagnostic text at another source location. |
|
|
476
|
+
| `LSPDiagnostic` | interface | `{ range, severity?, code?, codeDescription?, source?, message, tags?, relatedInformation?, data? }` | Describes one Language Server Protocol diagnostic. |
|
|
477
|
+
| `LSPPublishDiagnosticsParams` | interface | `{ uri, version?, diagnostics }` | Describes diagnostics published for one document. |
|
|
478
|
+
| `LSPDocumentDiagnosticParams` | interface | `{ textDocument, identifier?, previousResultId? }` | Describes a request for diagnostics from one document. |
|
|
479
|
+
| `LSPDocumentDiagnosticReport` | type | `{ readonly kind: 'full'; readonly resultId?: string; readonly items: readonly LSPDiagnostic[]; } \| { readonly kind: 'unchanged'; readonly resultId: string; }` | Describes a complete or unchanged document diagnostic report. |
|
|
480
|
+
| `LSPPositionEncoding` | type | `string` | Identifies a position encoding selected by a language server. |
|
|
481
|
+
| `LSPTextDocumentSyncKind` | type | `(typeof LSP_SYNC_KINDS)[number]` | Identifies the text synchronization mode selected by a language server, derived from `LSP_SYNC_KINDS`. |
|
|
482
|
+
| `LSPTextDocumentSyncOptions` | interface | `{ openClose?, change? }` | Describes the text synchronization features selected by a language server. |
|
|
483
|
+
| `LSPTextDocumentSync` | type | `LSPTextDocumentSyncKind \| LSPTextDocumentSyncOptions` | Describes either compact or expanded text synchronization capabilities. |
|
|
484
|
+
| `LSPDiagnosticOptions` | interface | `{ identifier?, interFileDependencies, workspaceDiagnostics }` | Describes the diagnostic provider features selected by a language server. |
|
|
485
485
|
|
|
486
486
|
### Guards
|
|
487
487
|
|
|
@@ -489,28 +489,28 @@ The validation surface provides these guards.
|
|
|
489
489
|
|
|
490
490
|
In a guard table a `Shape` cell holds the type the guard narrows to.
|
|
491
491
|
|
|
492
|
-
|
|
|
493
|
-
| ------------------------------- | -------- |
|
|
494
|
-
| `isJSONRPCError` | function | `JSONRPCError` | Checks whether an unknown value is a JSON-RPC error payload. |
|
|
495
|
-
| `isJSONRPCRequest` | function | `JSONRPCRequest` | Checks whether an unknown value is a JSON-RPC request. |
|
|
496
|
-
| `isJSONRPCNotification` | function | `JSONRPCNotification` | Checks whether an unknown value is a JSON-RPC notification. |
|
|
497
|
-
| `isJSONRPCResponse` | function | `JSONRPCResponse` | Checks whether an unknown value is a JSON-RPC response. |
|
|
498
|
-
| `isLSPPosition` | function | `LSPPosition` | Checks whether an unknown value is an LSP position. |
|
|
499
|
-
| `isLSPRange` | function | `LSPRange` | Checks whether an unknown value is an LSP range. |
|
|
500
|
-
| `isLSPLocation` | function | `LSPLocation` | Checks whether an unknown value is an LSP location. |
|
|
501
|
-
| `isLSPCodeDescription` | function | `LSPCodeDescription` | Checks whether an unknown value is an LSP code description. |
|
|
502
|
-
| `isLSPDiagnosticRelated` | function | `LSPDiagnosticRelated` | Checks whether an unknown value is related diagnostic information. |
|
|
503
|
-
| `isLSPDiagnostic` | function | `LSPDiagnostic` | Checks whether an unknown value is an LSP diagnostic. |
|
|
504
|
-
| `isLSPPublishDiagnosticsParams` | function | `LSPPublishDiagnosticsParams` | Checks whether an unknown value is published diagnostic parameters. |
|
|
505
|
-
| `isLSPDocumentDiagnosticReport` | function | `LSPDocumentDiagnosticReport` | Checks whether an unknown value is a document diagnostic report. |
|
|
506
|
-
| `isLSPIdentity` | function | `LSPIdentity` | Checks whether an unknown value is an LSP identity. |
|
|
507
|
-
| `isLSPDiagnosticSeverity` | const | `LSPDiagnosticSeverity
|
|
508
|
-
| `isLSPDiagnosticTag` | const | `LSPDiagnosticTag
|
|
509
|
-
| `isLSPTextDocumentSyncKind` | const | `LSPTextDocumentSyncKind
|
|
510
|
-
| `isLSPTextDocumentSyncOptions` | function | `LSPTextDocumentSyncOptions` | Checks whether an unknown value is expanded text synchronization options. |
|
|
511
|
-
| `isLSPDiagnosticOptions` | function | `LSPDiagnosticOptions` | Checks whether an unknown value is diagnostic provider options. |
|
|
512
|
-
| `isLSPServerCapabilities` | function | `LSPServerCapabilities` | Checks whether an unknown value is server capabilities this client can consume. |
|
|
513
|
-
| `isLSPInitializeResult` | function | `LSPInitializeResult` | Checks whether an unknown value is a successful initialize result. |
|
|
492
|
+
| Name | Kind | Signature | Summary |
|
|
493
|
+
| ------------------------------- | -------- | ---------------------------------------------------------- | ------------------------------------------------------------------------------- |
|
|
494
|
+
| `isJSONRPCError` | function | `(value: unknown) => value is JSONRPCError` | Checks whether an unknown value is a JSON-RPC error payload. |
|
|
495
|
+
| `isJSONRPCRequest` | function | `(value: unknown) => value is JSONRPCRequest` | Checks whether an unknown value is a JSON-RPC request. |
|
|
496
|
+
| `isJSONRPCNotification` | function | `(value: unknown) => value is JSONRPCNotification` | Checks whether an unknown value is a JSON-RPC notification. |
|
|
497
|
+
| `isJSONRPCResponse` | function | `(value: unknown) => value is JSONRPCResponse` | Checks whether an unknown value is a JSON-RPC response. |
|
|
498
|
+
| `isLSPPosition` | function | `(value: unknown) => value is LSPPosition` | Checks whether an unknown value is an LSP position. |
|
|
499
|
+
| `isLSPRange` | function | `(value: unknown) => value is LSPRange` | Checks whether an unknown value is an LSP range. |
|
|
500
|
+
| `isLSPLocation` | function | `(value: unknown) => value is LSPLocation` | Checks whether an unknown value is an LSP location. |
|
|
501
|
+
| `isLSPCodeDescription` | function | `(value: unknown) => value is LSPCodeDescription` | Checks whether an unknown value is an LSP code description. |
|
|
502
|
+
| `isLSPDiagnosticRelated` | function | `(value: unknown) => value is LSPDiagnosticRelated` | Checks whether an unknown value is related diagnostic information. |
|
|
503
|
+
| `isLSPDiagnostic` | function | `(value: unknown) => value is LSPDiagnostic` | Checks whether an unknown value is an LSP diagnostic. |
|
|
504
|
+
| `isLSPPublishDiagnosticsParams` | function | `(value: unknown) => value is LSPPublishDiagnosticsParams` | Checks whether an unknown value is published diagnostic parameters. |
|
|
505
|
+
| `isLSPDocumentDiagnosticReport` | function | `(value: unknown) => value is LSPDocumentDiagnosticReport` | Checks whether an unknown value is a document diagnostic report. |
|
|
506
|
+
| `isLSPIdentity` | function | `(value: unknown) => value is LSPIdentity` | Checks whether an unknown value is an LSP identity. |
|
|
507
|
+
| `isLSPDiagnosticSeverity` | const | `Guard<LSPDiagnosticSeverity>` | Checks whether an unknown value is a diagnostic severity. |
|
|
508
|
+
| `isLSPDiagnosticTag` | const | `Guard<LSPDiagnosticTag>` | Checks whether an unknown value is a diagnostic tag. |
|
|
509
|
+
| `isLSPTextDocumentSyncKind` | const | `Guard<LSPTextDocumentSyncKind>` | Checks whether an unknown value is a text synchronization mode. |
|
|
510
|
+
| `isLSPTextDocumentSyncOptions` | function | `(value: unknown) => value is LSPTextDocumentSyncOptions` | Checks whether an unknown value is expanded text synchronization options. |
|
|
511
|
+
| `isLSPDiagnosticOptions` | function | `(value: unknown) => value is LSPDiagnosticOptions` | Checks whether an unknown value is diagnostic provider options. |
|
|
512
|
+
| `isLSPServerCapabilities` | function | `(value: unknown) => value is LSPServerCapabilities` | Checks whether an unknown value is server capabilities this client can consume. |
|
|
513
|
+
| `isLSPInitializeResult` | function | `(value: unknown) => value is LSPInitializeResult` | Checks whether an unknown value is a successful initialize result. |
|
|
514
514
|
|
|
515
515
|
### Constants
|
|
516
516
|
|
|
@@ -518,27 +518,27 @@ The constant surface provides these protocol names, advertisements, and limits.
|
|
|
518
518
|
|
|
519
519
|
A `Shape` cell holds the constant's declared type.
|
|
520
520
|
|
|
521
|
-
|
|
|
522
|
-
| --------------------------- | ----- |
|
|
523
|
-
| `LSP_METHODS` | const | `Readonly<
|
|
524
|
-
| `LSP_ENCODINGS` | const | `readonly
|
|
525
|
-
| `LSP_ERROR_CODES` | const | `readonly
|
|
526
|
-
| `LSP_DIAGNOSTIC_SEVERITIES` | const | `readonly
|
|
527
|
-
| `LSP_DIAGNOSTIC_TAGS` | const | `readonly
|
|
528
|
-
| `LSP_SYNC_KINDS` | const | `readonly
|
|
529
|
-
| `LSP_CAPABILITIES` | const | `
|
|
530
|
-
| `LSP_TIMEOUT` | const | `
|
|
531
|
-
| `JSONRPC_PARSE_ERROR` | const | `
|
|
532
|
-
| `JSONRPC_INVALID_REQUEST` | const | `
|
|
533
|
-
| `JSONRPC_METHOD_NOT_FOUND` | const | `
|
|
534
|
-
| `JSONRPC_INVALID_PARAMS` | const | `
|
|
535
|
-
| `JSONRPC_INTERNAL_ERROR` | const | `
|
|
536
|
-
| `LSP_REQUEST_CANCELLED` | const | `
|
|
537
|
-
| `LSP_CONTENT_MODIFIED` | const | `
|
|
538
|
-
| `LSP_SERVER_CANCELLED` | const | `
|
|
539
|
-
| `LSP_REQUEST_FAILED` | const | `
|
|
540
|
-
| `LSP_CONTENT_LIMIT` | const | `
|
|
541
|
-
| `LSP_HEADER_LIMIT` | const | `
|
|
521
|
+
| Name | Kind | Signature | Summary |
|
|
522
|
+
| --------------------------- | ----- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
|
|
523
|
+
| `LSP_METHODS` | const | `Readonly<{ readonly initialize: 'initialize'; readonly initialized: 'initialized'; readonly shutdown: 'shutdown'; readonly exit: 'exit'; readonly cancel: '$/cancelRequest'; readonly open: 'textDocument/didOpen'; readonly close: 'textDocument/didClose'; readonly diagnostic: 'textDocument/diagnostic'; readonly publish: 'textDocument/publishDiagnostics'; }>` | Names the Language Server Protocol methods this client sends or consumes. |
|
|
524
|
+
| `LSP_ENCODINGS` | const | `readonly ["utf-8", "utf-16", "utf-32"]` | Lists the position encodings named by Language Server Protocol 3.18. |
|
|
525
|
+
| `LSP_ERROR_CODES` | const | `readonly ["spawn", "framing", "protocol", "duplicate", "server", "timeout", "aborted", "closed"]` | Lists the machine-readable failure categories an `LSPError` carries, in declaration order. |
|
|
526
|
+
| `LSP_DIAGNOSTIC_SEVERITIES` | const | `readonly [1, 2, 3, 4]` | Lists the diagnostic severities named by the Language Server Protocol, from error to hint. |
|
|
527
|
+
| `LSP_DIAGNOSTIC_TAGS` | const | `readonly [1, 2]` | Lists the diagnostic tags named by the Language Server Protocol. |
|
|
528
|
+
| `LSP_SYNC_KINDS` | const | `readonly [0, 1, 2]` | Lists the text synchronization modes named by the Language Server Protocol. |
|
|
529
|
+
| `LSP_CAPABILITIES` | const | `Readonly<{ general: Readonly<{ positionEncodings: readonly string[]; }>; textDocument: Readonly<{ synchronization: Readonly<{}>; publishDiagnostics: Readonly<{}>; diagnostic: Readonly<{}>; }>; }>` | Describes the capabilities this client advertises in its initialize request. |
|
|
530
|
+
| `LSP_TIMEOUT` | const | `30000` | Names the default request-settlement timeout, `30_000` milliseconds. |
|
|
531
|
+
| `JSONRPC_PARSE_ERROR` | const | `-32700` | Identifies a malformed JSON payload, `-32700`. |
|
|
532
|
+
| `JSONRPC_INVALID_REQUEST` | const | `-32600` | Identifies a structurally invalid JSON-RPC request, `-32600`. |
|
|
533
|
+
| `JSONRPC_METHOD_NOT_FOUND` | const | `-32601` | Identifies a JSON-RPC method that the receiver does not provide, `-32601`. |
|
|
534
|
+
| `JSONRPC_INVALID_PARAMS` | const | `-32602` | Identifies invalid parameters supplied to a JSON-RPC method, `-32602`. |
|
|
535
|
+
| `JSONRPC_INTERNAL_ERROR` | const | `-32603` | Identifies an internal JSON-RPC receiver failure, `-32603`. |
|
|
536
|
+
| `LSP_REQUEST_CANCELLED` | const | `-32800` | Identifies a Language Server Protocol request cancelled by the client, `-32800`. |
|
|
537
|
+
| `LSP_CONTENT_MODIFIED` | const | `-32801` | Identifies a request invalidated by modified document content, `-32801`. |
|
|
538
|
+
| `LSP_SERVER_CANCELLED` | const | `-32802` | Identifies a Language Server Protocol request cancelled by the server, `-32802`. |
|
|
539
|
+
| `LSP_REQUEST_FAILED` | const | `-32803` | Identifies a valid Language Server Protocol request that could not complete, `-32803`. |
|
|
540
|
+
| `LSP_CONTENT_LIMIT` | const | `67108864` | Bounds an accepted base-protocol content body to 64 MiB. |
|
|
541
|
+
| `LSP_HEADER_LIMIT` | const | `65536` | Bounds an accepted base-protocol header to 64 KiB. |
|
|
542
542
|
|
|
543
543
|
## Tests
|
|
544
544
|
|