@dudko.dev/agent 0.0.47 → 0.0.49
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 +343 -37
- package/dist/cli.js +145 -116
- package/dist/index.cjs +104 -97
- package/dist/index.d.cts +563 -61
- package/dist/index.d.ts +563 -61
- package/dist/index.js +104 -97
- package/dist/sandbox-worker.js +6 -6
- package/dist/subagent-worker.js +90 -83
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { OAuthClientProvider, OAuthDiscoveryState } from '@modelcontextprotocol/
|
|
2
|
-
import { FetchLike } from '@modelcontextprotocol/sdk/shared/transport.js';
|
|
1
|
+
import { OAuthClientProvider, FetchLike, OAuthClientMetadata, OAuthClientInformationMixed, OAuthTokens, OAuthDiscoveryState } from '@modelcontextprotocol/client';
|
|
3
2
|
import { Experimental_DecisionModel, ToolSet, Tool, ImageModel, SpeechModel, TranscriptionModel, LanguageModel, SystemModelMessage, ModelMessage } from 'ai';
|
|
4
|
-
import { OAuthClientMetadata, OAuthClientInformationMixed, OAuthTokens } from '@modelcontextprotocol/sdk/shared/auth.js';
|
|
5
3
|
import { JsonWebKey, KeyObject } from 'node:crypto';
|
|
6
4
|
|
|
7
5
|
/**
|
|
@@ -372,9 +370,10 @@ declare const createSafeFetch: (policy?: IEgressPolicy) => SafeFetch;
|
|
|
372
370
|
|
|
373
371
|
/**
|
|
374
372
|
* What the `web_search` tools of the two agent packages share: the result shape and its caps, how
|
|
375
|
-
* a search engine's answer is cleaned before a model reads it, and the built-in
|
|
376
|
-
*
|
|
377
|
-
* is made by each package's own safe
|
|
373
|
+
* a search engine's answer is cleaned before a model reads it, and the one built-in provider
|
|
374
|
+
* (Google Search through Gemini grounding) as a pure request builder and response parser (one
|
|
375
|
+
* HTTP call). Pure, no imports, no clock: the request itself is made by each package's own safe
|
|
376
|
+
* fetch.
|
|
378
377
|
*
|
|
379
378
|
* This file is a COPY, byte for byte, in `@dudko.dev/agent` (`src/web-search-shared.ts`) and
|
|
380
379
|
* `@dudko.dev/agent-web` (`src/tools/web-search-shared.ts`): change both. The Node package's
|
|
@@ -418,11 +417,24 @@ interface ISearchOptions {
|
|
|
418
417
|
* returns is treated like a built-in adapter's answer - cleaned, capped and filtered.
|
|
419
418
|
*/
|
|
420
419
|
type SearchEngine = (query: string, options: ISearchOptions) => Promise<ISearchResult[]>;
|
|
421
|
-
/**
|
|
422
|
-
|
|
420
|
+
/**
|
|
421
|
+
* The built-in provider. One: Google Search through the Gemini API's grounding (`google_search`),
|
|
422
|
+
* which needs a Gemini (Google AI Studio) key and nothing else. Any other search API is the
|
|
423
|
+
* host's `engine` function.
|
|
424
|
+
*/
|
|
425
|
+
type SearchProvider = 'google';
|
|
423
426
|
declare const SEARCH_PROVIDERS: readonly SearchProvider[];
|
|
424
|
-
/** Where
|
|
425
|
-
declare const SEARCH_API_BASE_URL: Record<
|
|
427
|
+
/** Where the provider's API lives (a `baseURL` of the host - a gateway - replaces it). */
|
|
428
|
+
declare const SEARCH_API_BASE_URL: Record<SearchProvider, string>;
|
|
429
|
+
/**
|
|
430
|
+
* The model the grounding call is made with when the host names none: the cheapest one that
|
|
431
|
+
* answered a free-tier key with grounding on the day it was measured (2026-11-26).
|
|
432
|
+
*/
|
|
433
|
+
declare const SEARCH_GOOGLE_DEFAULT_MODEL = "gemini-2.5-flash-lite";
|
|
434
|
+
/** The most of the grounding model's answer a model sees as `summary`. */
|
|
435
|
+
declare const SEARCH_MAX_SUMMARY_CHARS = 1000;
|
|
436
|
+
/** Said in every result of the google provider: what its URLs and its text are. */
|
|
437
|
+
declare const SEARCH_GOOGLE_NOTE: string;
|
|
426
438
|
/** One HTTP call to a search API. The key, if any, is in `headers` only - never in the URL. */
|
|
427
439
|
interface ISearchRequest {
|
|
428
440
|
url: string;
|
|
@@ -437,19 +449,48 @@ interface ISearchRequestInput {
|
|
|
437
449
|
freshness?: SearchFreshness;
|
|
438
450
|
apiKey?: string;
|
|
439
451
|
baseURL?: string;
|
|
452
|
+
/** The Gemini model that makes the grounding call (default SEARCH_GOOGLE_DEFAULT_MODEL). */
|
|
453
|
+
model?: string;
|
|
454
|
+
/** The current time in ms, for `freshness` (this file reads no clock). */
|
|
455
|
+
now?: number;
|
|
456
|
+
}
|
|
457
|
+
/** What a search spent in model tokens, as the API reported it. */
|
|
458
|
+
interface ISearchUsage {
|
|
459
|
+
inputTokens: number;
|
|
460
|
+
outputTokens: number;
|
|
461
|
+
totalTokens: number;
|
|
462
|
+
reasoningTokens: number;
|
|
463
|
+
}
|
|
464
|
+
/** A provider's answer, parsed: raw third-party values until `sanitizeSearchResults`. */
|
|
465
|
+
interface ISearchAnswer {
|
|
466
|
+
results: unknown[];
|
|
467
|
+
/** The grounding model's whole answer (raw). */
|
|
468
|
+
summary?: unknown;
|
|
469
|
+
/** Absent when the API reported none. */
|
|
470
|
+
usage?: ISearchUsage;
|
|
440
471
|
}
|
|
441
472
|
/**
|
|
442
|
-
* The request for one query, per the API's public documentation:
|
|
443
|
-
*
|
|
444
|
-
*
|
|
445
|
-
*
|
|
473
|
+
* The request for one query, per the Gemini API's public documentation:
|
|
474
|
+
* POST {base}/v1beta/models/{model}:generateContent header x-goog-api-key
|
|
475
|
+
* { systemInstruction, contents: [the query], tools: [{ google_search }], generationConfig }
|
|
476
|
+
* The query is the only text of the conversation in it. The API has no result count: the list
|
|
477
|
+
* is cut on the way back.
|
|
446
478
|
*/
|
|
447
479
|
declare const buildSearchRequest: (input: ISearchRequestInput) => ISearchRequest;
|
|
448
480
|
/**
|
|
449
|
-
*
|
|
450
|
-
*
|
|
481
|
+
* What a grounded answer holds, mapped to results of `{ title, url, snippet }` and nothing else,
|
|
482
|
+
* the model's answer, and what the call spent. A source is a `groundingChunks[].web` (`uri` is a
|
|
483
|
+
* Google redirect link, `title` the site's name); its snippet is the pieces of the answer that
|
|
484
|
+
* `groundingSupports` attribute to it (fragments as the API cut them, joined with an ellipsis). Still raw third-party values: `sanitizeSearchResults` is
|
|
485
|
+
* what makes them safe to show.
|
|
486
|
+
*/
|
|
487
|
+
declare const parseSearchResponse: (provider: SearchProvider, json: unknown) => ISearchAnswer;
|
|
488
|
+
/**
|
|
489
|
+
* What a failed call says to the model: the provider, the model, the status, the API's own error
|
|
490
|
+
* code word and what it usually means. Never the error's text: that is third-party text, and may
|
|
491
|
+
* echo what was sent. `body` is the parsed error body, if there was one.
|
|
451
492
|
*/
|
|
452
|
-
declare const
|
|
493
|
+
declare const searchStatusMessage: (provider: SearchProvider, status: number, model?: string, body?: unknown) => string;
|
|
453
494
|
interface ISanitizedSearch {
|
|
454
495
|
results: ISearchResult[];
|
|
455
496
|
/** Results dropped because the host's egress policy does not let the model reach them. */
|
|
@@ -460,18 +501,37 @@ interface ISanitizedSearch {
|
|
|
460
501
|
/**
|
|
461
502
|
* What a model sees of an engine's answer. `raw` is whatever came back - nothing about it is
|
|
462
503
|
* trusted: a result needs a valid http(s) URL, every field is cleaned and capped, duplicates go,
|
|
463
|
-
* `accepts` (the egress policy
|
|
464
|
-
* `maxResults` and at SEARCH_MAX_TOTAL_CHARS.
|
|
504
|
+
* `accepts` (the egress policy; it is also handed the result's raw title) drops links the model
|
|
505
|
+
* could not fetch, and the list stops at `maxResults` and at SEARCH_MAX_TOTAL_CHARS.
|
|
465
506
|
*/
|
|
466
507
|
declare const sanitizeSearchResults: (raw: unknown, options?: {
|
|
467
508
|
maxResults?: number;
|
|
468
|
-
accepts?: (url: URL) => boolean;
|
|
509
|
+
accepts?: (url: URL, title: unknown) => boolean;
|
|
469
510
|
}) => ISanitizedSearch;
|
|
511
|
+
/** What `web_search` returns to the model. */
|
|
512
|
+
interface ISearchToolResult {
|
|
513
|
+
query: string;
|
|
514
|
+
results: ISearchResult[];
|
|
515
|
+
/** The google provider, when no source came with a snippet: the grounding model's answer, cut. */
|
|
516
|
+
summary?: string;
|
|
517
|
+
/** The google provider: what its URLs and its text are. */
|
|
518
|
+
note?: string;
|
|
519
|
+
filtered?: number;
|
|
520
|
+
truncated?: true;
|
|
521
|
+
untrusted: true;
|
|
522
|
+
}
|
|
523
|
+
/**
|
|
524
|
+
* The tool's result, from the cleaned list and - for the google provider - the parsed answer.
|
|
525
|
+
* The model's `summary` is attached only when there are sources, none of them carries a snippet
|
|
526
|
+
* and none was filtered out: a summary cannot be cut to the sources that remain.
|
|
527
|
+
*/
|
|
528
|
+
declare const searchToolResult: (query: string, clean: ISanitizedSearch, answer?: ISearchAnswer) => ISearchToolResult;
|
|
470
529
|
|
|
471
530
|
interface ISearchConfig {
|
|
472
531
|
engine?: SearchEngine;
|
|
473
532
|
provider?: SearchProvider;
|
|
474
533
|
apiKey?: string;
|
|
534
|
+
model?: string;
|
|
475
535
|
baseURL?: string;
|
|
476
536
|
maxResults?: number;
|
|
477
537
|
allowPrivateNetwork?: boolean;
|
|
@@ -603,6 +663,335 @@ interface IMedia {
|
|
|
603
663
|
}
|
|
604
664
|
declare const createMedia: (config: IAgentConfig) => Promise<IMedia | undefined>;
|
|
605
665
|
|
|
666
|
+
/**
|
|
667
|
+
* MCP elicitation, the part the two agent packages share: a server asks the user for input in
|
|
668
|
+
* the middle of a tool call, the HOST answers through a callback, and the call goes on. Pure, no
|
|
669
|
+
* imports: the limits, what a request must look like before a host sees it, what an answer must
|
|
670
|
+
* look like before a server sees it, the one function that asks, and the two ways a tool call
|
|
671
|
+
* with questions is driven (`elicitation/create` requests on the 2025 revisions, `input_required`
|
|
672
|
+
* results on 2026-07-28).
|
|
673
|
+
*
|
|
674
|
+
* A consent boundary. The server's text is third-party data: cleaned and capped here, shown only
|
|
675
|
+
* to the host's callback and in the `mcp.elicitation-requested` event, never put into a prompt.
|
|
676
|
+
* The answer goes to the server that asked and nowhere else: nothing in this file logs, emits or
|
|
677
|
+
* returns a value the user entered - events and errors carry field NAMES only.
|
|
678
|
+
*
|
|
679
|
+
* This file is a COPY, byte for byte, in `@dudko.dev/agent` (`src/mcp-elicitation.ts`) and
|
|
680
|
+
* `@dudko.dev/agent-web` (`src/mcp/elicitation.ts`): change both. The Node package's
|
|
681
|
+
* `tests/mcp-elicitation-shared.test.ts` compares the two files and tests every guard here; each
|
|
682
|
+
* needs a mutation check.
|
|
683
|
+
*/
|
|
684
|
+
/** How long one question waits for the host's answer, by default: a human is reading it. */
|
|
685
|
+
declare const MCP_ELICITATION_TIMEOUT_MS = 300000;
|
|
686
|
+
/** The most questions one tool call may ask, by default. */
|
|
687
|
+
declare const MCP_ELICITATION_MAX_PER_TOOL_CALL = 5;
|
|
688
|
+
/** The most questions one run may be asked, by default (its helpers' calls included). */
|
|
689
|
+
declare const MCP_ELICITATION_MAX_PER_RUN = 20;
|
|
690
|
+
/** One field of a form: the flat subset of JSON Schema the specification allows, nothing else. */
|
|
691
|
+
interface McpElicitationFieldSchema {
|
|
692
|
+
type: 'string' | 'number' | 'integer' | 'boolean' | 'array';
|
|
693
|
+
title?: string;
|
|
694
|
+
description?: string;
|
|
695
|
+
default?: string | number | boolean | string[];
|
|
696
|
+
/** string */
|
|
697
|
+
minLength?: number;
|
|
698
|
+
maxLength?: number;
|
|
699
|
+
format?: 'email' | 'uri' | 'date' | 'date-time';
|
|
700
|
+
/** string: single-select, plain (`enumNames`: the older titled form). */
|
|
701
|
+
enum?: string[];
|
|
702
|
+
enumNames?: string[];
|
|
703
|
+
/** string: single-select with titles. */
|
|
704
|
+
oneOf?: {
|
|
705
|
+
const: string;
|
|
706
|
+
title: string;
|
|
707
|
+
}[];
|
|
708
|
+
/** number / integer */
|
|
709
|
+
minimum?: number;
|
|
710
|
+
maximum?: number;
|
|
711
|
+
/** array: multi-select. */
|
|
712
|
+
minItems?: number;
|
|
713
|
+
maxItems?: number;
|
|
714
|
+
items?: {
|
|
715
|
+
type?: 'string';
|
|
716
|
+
enum?: string[];
|
|
717
|
+
anyOf?: {
|
|
718
|
+
const: string;
|
|
719
|
+
title: string;
|
|
720
|
+
}[];
|
|
721
|
+
};
|
|
722
|
+
}
|
|
723
|
+
/** The form a server asks for, as a host is shown it: checked, cleaned and capped. */
|
|
724
|
+
interface McpElicitationSchema {
|
|
725
|
+
type: 'object';
|
|
726
|
+
properties: Record<string, McpElicitationFieldSchema>;
|
|
727
|
+
required?: string[];
|
|
728
|
+
}
|
|
729
|
+
/** What the host's callback is given. Every string in it is third-party text. */
|
|
730
|
+
interface McpElicitationRequest {
|
|
731
|
+
/** Unique per question; the same id is in the two events. */
|
|
732
|
+
id: string;
|
|
733
|
+
/** The server that asks: its key in the host's configuration. */
|
|
734
|
+
server: string;
|
|
735
|
+
/** The tool call during which it asks: the tool's name as the model called it. */
|
|
736
|
+
tool: string;
|
|
737
|
+
mode: 'form' | 'url';
|
|
738
|
+
/** The server's words, cleaned and capped (MCP_ELICITATION_MESSAGE_MAX_CHARS). */
|
|
739
|
+
message: string;
|
|
740
|
+
/** Form mode: the fields to fill in. */
|
|
741
|
+
requestedSchema?: McpElicitationSchema;
|
|
742
|
+
/**
|
|
743
|
+
* URL mode: the link the server wants the user to open. It is only handed over: nothing in
|
|
744
|
+
* these packages fetches or opens it. https, or http on a loopback host.
|
|
745
|
+
*/
|
|
746
|
+
url?: string;
|
|
747
|
+
/** URL mode on the 2025 revisions: the server's id for this interaction. */
|
|
748
|
+
elicitationId?: string;
|
|
749
|
+
runId?: string;
|
|
750
|
+
/** Set when a helper the model started is the one whose call asks (`elicitation.subagents`). */
|
|
751
|
+
subagent?: {
|
|
752
|
+
id: string;
|
|
753
|
+
depth: number;
|
|
754
|
+
};
|
|
755
|
+
}
|
|
756
|
+
type McpElicitationContent = Record<string, string | number | boolean | string[]>;
|
|
757
|
+
/**
|
|
758
|
+
* The host's answer. `accept` carries the form's values (form mode) or nothing (URL mode: it
|
|
759
|
+
* says the user agreed to open the link); `decline` is a no; `cancel` is "dismissed".
|
|
760
|
+
*/
|
|
761
|
+
type McpElicitationResult = {
|
|
762
|
+
action: 'accept';
|
|
763
|
+
content?: McpElicitationContent;
|
|
764
|
+
} | {
|
|
765
|
+
action: 'decline';
|
|
766
|
+
} | {
|
|
767
|
+
action: 'cancel';
|
|
768
|
+
};
|
|
769
|
+
interface McpElicitationContext {
|
|
770
|
+
/** Aborted when the answer is no longer wanted: the run stopped, or the time ran out. */
|
|
771
|
+
signal: AbortSignal;
|
|
772
|
+
}
|
|
773
|
+
/** `onElicitation`: the host decides, never the model. */
|
|
774
|
+
type McpElicitationHandler = (request: McpElicitationRequest, ctx: McpElicitationContext) => McpElicitationResult | Promise<McpElicitationResult>;
|
|
775
|
+
/** The `elicitation` settings beside `onElicitation`. */
|
|
776
|
+
interface McpElicitationOptions {
|
|
777
|
+
/**
|
|
778
|
+
* How long one question waits for an answer. Default 300 000. `0` or `Infinity` = no limit of
|
|
779
|
+
* its own (the question waits until the run is stopped), and so is a value above 2^31 - 1 (about
|
|
780
|
+
* 24.8 days, the most a timer holds). Negative or NaN: a configuration error.
|
|
781
|
+
*/
|
|
782
|
+
timeoutMs?: number;
|
|
783
|
+
/** Questions one tool call may ask. Default 5. */
|
|
784
|
+
maxPerToolCall?: number;
|
|
785
|
+
/** Questions one run may be asked. Default 20. */
|
|
786
|
+
maxPerRun?: number;
|
|
787
|
+
/** Also accept URL mode (a link to open). Default false: only forms are declared. */
|
|
788
|
+
url?: boolean;
|
|
789
|
+
/**
|
|
790
|
+
* Let a tool call made by a helper (a subagent) ask the user too. Default false: such a
|
|
791
|
+
* question is cancelled without the callback being called.
|
|
792
|
+
*/
|
|
793
|
+
subagents?: boolean;
|
|
794
|
+
}
|
|
795
|
+
/** Why a question was answered without the host deciding. */
|
|
796
|
+
type McpElicitationReason = 'unsupported-schema' | 'unsupported-mode' | 'insecure-url' | 'invalid-request' | 'subagent' | 'cap-per-call' | 'cap-per-run' | 'handler-error' | 'timeout' | 'invalid-answer' | 'aborted' | 'step-timeout' | 'after-failure' | 'no-tool-call';
|
|
797
|
+
type Checked<T> = {
|
|
798
|
+
ok: true;
|
|
799
|
+
value: T;
|
|
800
|
+
} | {
|
|
801
|
+
ok: false;
|
|
802
|
+
reason: string;
|
|
803
|
+
};
|
|
804
|
+
/**
|
|
805
|
+
* The form a server asked for, reduced to what the specification allows a form to be: a flat
|
|
806
|
+
* object of strings, numbers, booleans and selects. Anything else - a nested object, a list of
|
|
807
|
+
* objects, a type union, an unknown format, too many fields or options, a name that could not
|
|
808
|
+
* be sent back verbatim - is refused with a reason (the caller declines the request). Keywords
|
|
809
|
+
* outside the subset are dropped; titles and descriptions are cleaned and capped.
|
|
810
|
+
*/
|
|
811
|
+
declare const normalizeMcpElicitationSchema: (raw: unknown) => Checked<McpElicitationSchema>;
|
|
812
|
+
/**
|
|
813
|
+
* An accepted form, checked against the schema it answers: every value of the type and within
|
|
814
|
+
* the limits its field states, every required field there, and NO field the form did not ask
|
|
815
|
+
* for (what the server did not request is not sent to it). The result is a fresh object holding
|
|
816
|
+
* only the form's own fields. A refusal names the field and the rule, never the value.
|
|
817
|
+
*/
|
|
818
|
+
declare const validateMcpElicitationContent: (schema: McpElicitationSchema, content: unknown) => Checked<McpElicitationContent>;
|
|
819
|
+
|
|
820
|
+
/**
|
|
821
|
+
* What the MCP connectors of the two agent packages share: how a server's `instructions` reach a
|
|
822
|
+
* system prompt, how a tool result's `structuredContent` reaches the model, and what the
|
|
823
|
+
* per-server `protocol` option means. Pure, no imports.
|
|
824
|
+
*
|
|
825
|
+
* This file is a COPY, byte for byte, in `@dudko.dev/agent` (`src/mcp-shared.ts`) and
|
|
826
|
+
* `@dudko.dev/agent-web` (`src/mcp/shared.ts`): change both. The Node package's
|
|
827
|
+
* `tests/mcp-shared.test.ts` compares the two files and tests every cap and guard here.
|
|
828
|
+
*/
|
|
829
|
+
/** The `instructions` one connected MCP server returned in its `initialize` result. */
|
|
830
|
+
interface McpServerInstructions {
|
|
831
|
+
/** The server's name: its key in the host's configuration. */
|
|
832
|
+
server: string;
|
|
833
|
+
instructions: string;
|
|
834
|
+
}
|
|
835
|
+
/** The most one server's instructions take in a system prompt, in characters. */
|
|
836
|
+
declare const MCP_INSTRUCTIONS_MAX_CHARS_PER_SERVER = 2000;
|
|
837
|
+
/** The most all servers' instructions take together, in characters. */
|
|
838
|
+
declare const MCP_INSTRUCTIONS_MAX_CHARS_TOTAL = 8000;
|
|
839
|
+
/**
|
|
840
|
+
* The system-prompt section for the servers' instructions, or '' when no server sent any (the
|
|
841
|
+
* prompt is then exactly what it was). Each server's text is capped
|
|
842
|
+
* (MCP_INSTRUCTIONS_MAX_CHARS_PER_SERVER), so is the sum (MCP_INSTRUCTIONS_MAX_CHARS_TOTAL, in
|
|
843
|
+
* the order given: a server past the total is named as omitted), and every line of it is
|
|
844
|
+
* prefixed with "| ", so a server cannot write something that reads as a heading of this prompt
|
|
845
|
+
* or as another server's note.
|
|
846
|
+
*/
|
|
847
|
+
declare const renderMcpInstructions: (list: readonly McpServerInstructions[] | undefined) => string;
|
|
848
|
+
/**
|
|
849
|
+
* Which revisions of the protocol a connection to one server may use (the server config's
|
|
850
|
+
* `protocol`):
|
|
851
|
+
*
|
|
852
|
+
* - `'legacy'` (default): the 2025 revisions, the `initialize` handshake. Nothing of the 2026
|
|
853
|
+
* revision is sent.
|
|
854
|
+
* - `'auto'`: ask first (`server/discover`); a server that answers with 2026-07-28 is spoken to
|
|
855
|
+
* that way, any other is given the 2025 handshake. Decided once, at connect.
|
|
856
|
+
* - `'modern'`: 2026-07-28 only. A server that does not offer it fails the connect.
|
|
857
|
+
*/
|
|
858
|
+
type McpProtocolMode = 'legacy' | 'auto' | 'modern';
|
|
859
|
+
/** The revision `protocol: 'modern'` pins: the one this connector is tested against. */
|
|
860
|
+
declare const MCP_MODERN_PROTOCOL_VERSION = "2026-07-28";
|
|
861
|
+
/** What a connection negotiated with one server. */
|
|
862
|
+
interface McpServerProtocol {
|
|
863
|
+
/** The server's name: its key in the host's configuration. */
|
|
864
|
+
server: string;
|
|
865
|
+
/** The protocol revision in use, e.g. `2025-11-25` or `2026-07-28`. */
|
|
866
|
+
version: string;
|
|
867
|
+
/** `modern` from 2026-07-28 on (stateless, `server/discover`), `legacy` before. */
|
|
868
|
+
era: 'legacy' | 'modern';
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
/**
|
|
872
|
+
* MCP Skills (the `io.modelcontextprotocol/skills` extension, SEP-2640, Beta; written against
|
|
873
|
+
* base revision 2026-07-28): what the two agent packages share about a server's skills. The
|
|
874
|
+
* rules on a server's entries (`mcpSkillEntryRefusal`), the names a skill gets in the agent's
|
|
875
|
+
* catalog (`assignMcpSkillNames`: namespaced by the host's label of the server), the caps
|
|
876
|
+
* (`selectMcpSkills`), the files of a loaded skill the model may read (`resolveMcpSkillFile`),
|
|
877
|
+
* the preamble a skill's text is loaded under, the mark that carries a server's skills on its
|
|
878
|
+
* tools (`markMcpSkills` / `collectMcpSkillSources`), a skill the model names by URI
|
|
879
|
+
* (`mcpSkillUriRefusal`, `resolveMcpSkillServer`: `skills/get` to that one server only) and the
|
|
880
|
+
* person's consent before a skill's text enters the model's context (`decideMcpSkillConsent`,
|
|
881
|
+
* `mcpSkillConsentView`). Pure, no imports.
|
|
882
|
+
*
|
|
883
|
+
* A server's skills are third-party text. They reach the model only as knowledge, under
|
|
884
|
+
* `mcpSkillPreamble`, and - unless the host vetted the server (`consent: 'never'`) - only after a
|
|
885
|
+
* person saw them and said yes; nothing here (or anywhere) reads a skill's frontmatter beyond its
|
|
886
|
+
* `name` and `description` - `allowed-tools` included - and a file a skill bundles is read as
|
|
887
|
+
* text, never run.
|
|
888
|
+
*
|
|
889
|
+
* This file is a COPY, byte for byte, in `@dudko.dev/agent` (`src/mcp-skills.ts`) and
|
|
890
|
+
* `@dudko.dev/agent-web` (`src/mcp/skills.ts`): change both. The Node package's
|
|
891
|
+
* `tests/mcp-skills-shared.test.ts` compares the two files and tests every rule and cap here.
|
|
892
|
+
*/
|
|
893
|
+
/** The extension's identifier, in the client's and the server's `extensions` capability. */
|
|
894
|
+
declare const MCP_SKILLS_EXTENSION = "io.modelcontextprotocol/skills";
|
|
895
|
+
/** The specification's limits (Limits): files per skill, `SKILL.md` included. */
|
|
896
|
+
declare const MCP_SKILL_MAX_RESOURCES = 512;
|
|
897
|
+
/** The specification's limits (Limits): the sum of `size` over a skill's files, in bytes. */
|
|
898
|
+
declare const MCP_SKILL_MAX_TOTAL_BYTES: number;
|
|
899
|
+
/** The most skills one server puts in the agent's catalog. */
|
|
900
|
+
declare const MCP_SKILLS_MAX_PER_SERVER = 32;
|
|
901
|
+
/** The most skills all servers put in the agent's catalog together. */
|
|
902
|
+
declare const MCP_SKILLS_MAX_TOTAL = 64;
|
|
903
|
+
/** The most a catalog entry (the description and its origin tag) takes, in characters. */
|
|
904
|
+
declare const MCP_SKILL_DESCRIPTION_MAX_CHARS = 300;
|
|
905
|
+
/** The most of a skill's instructions (its `SKILL.md` body) the model is given, in characters. */
|
|
906
|
+
declare const MCP_SKILL_BODY_MAX_CHARS = 16000;
|
|
907
|
+
/** The most of one file of a skill the model is given, in characters. */
|
|
908
|
+
declare const MCP_SKILL_FILE_MAX_CHARS = 32000;
|
|
909
|
+
/**
|
|
910
|
+
* Why the agent does not take a skill entry from a server, or `undefined` when it does. The
|
|
911
|
+
* specification's rules on an entry, checked before anything of the skill is read:
|
|
912
|
+
*
|
|
913
|
+
* - its `uri` is a `SKILL.md` inside a named directory, whose last segment is the skill's
|
|
914
|
+
* frontmatter `name` (Resource Mapping; Frontmatter), and that name follows the Agent Skills
|
|
915
|
+
* naming rules;
|
|
916
|
+
* - a description to show in the catalog;
|
|
917
|
+
* - `resources` is the complete list of its files (Resources): `"dynamic"` content is declined
|
|
918
|
+
* (a host MAY: there is nothing to verify it against), anything else is invalid;
|
|
919
|
+
* - every file is `SKILL.md` or a file inside the skill's directory, listed once, with a
|
|
920
|
+
* `sha256:` digest and a byte size, and `SKILL.md` is listed;
|
|
921
|
+
* - at most {@link MCP_SKILL_MAX_RESOURCES} files and {@link MCP_SKILL_MAX_TOTAL_BYTES} bytes
|
|
922
|
+
* (Limits: "both limits are checkable from the entry alone").
|
|
923
|
+
*/
|
|
924
|
+
declare const mcpSkillEntryRefusal: (entry: unknown) => string | undefined;
|
|
925
|
+
/**
|
|
926
|
+
* How a skill of a server is introduced wherever its text is shown to the model (its
|
|
927
|
+
* instructions, and each file of it): third-party knowledge that cannot change the rules. The
|
|
928
|
+
* wording is the guard.
|
|
929
|
+
*/
|
|
930
|
+
declare const mcpSkillPreamble: (server: string, uri: string) => string;
|
|
931
|
+
/** The longest URI `load_skill` sends to a server, in characters. */
|
|
932
|
+
declare const MCP_SKILL_URI_MAX_CHARS = 512;
|
|
933
|
+
/**
|
|
934
|
+
* Why `load_skill` does not ask a server for the skill at `uri`, or `undefined` when it may. Checked
|
|
935
|
+
* before any request: a `skill://` URI - the conventional scheme; a URI the MODEL hands over (it
|
|
936
|
+
* read it in third-party text) is taken in no other, though a listing may use any - of the
|
|
937
|
+
* `SKILL.md` of a named directory, whose last segment is a skill name, within
|
|
938
|
+
* {@link MCP_SKILL_URI_MAX_CHARS}, with nothing invisible and no space in it.
|
|
939
|
+
*/
|
|
940
|
+
declare const mcpSkillUriRefusal: (uri: unknown) => string | undefined;
|
|
941
|
+
/** When a person is asked before a server's skill enters the model's context. */
|
|
942
|
+
type McpSkillConsent = 'ask' | 'once-per-skill' | 'never';
|
|
943
|
+
/** Every value of {@link McpSkillConsent}. */
|
|
944
|
+
declare const MCP_SKILL_CONSENTS: readonly McpSkillConsent[];
|
|
945
|
+
/**
|
|
946
|
+
* The default: asked the first time a skill would enter the context in the agent's life, and again
|
|
947
|
+
* only when its entry changed - often enough that every text a person did not see is shown, seldom
|
|
948
|
+
* enough that a yes still means something.
|
|
949
|
+
*/
|
|
950
|
+
declare const MCP_SKILL_CONSENT_DEFAULT: McpSkillConsent;
|
|
951
|
+
/** `skills` on a server's config, as an object. */
|
|
952
|
+
interface McpSkillsOptions {
|
|
953
|
+
/**
|
|
954
|
+
* `'once-per-skill'` (default): a person is asked the first time each skill would enter the
|
|
955
|
+
* model's context, and a yes holds for the agent's life while the skill's entry is the same;
|
|
956
|
+
* `'ask'`: asked in every run that loads it; `'never'`: never asked - for a server the host
|
|
957
|
+
* vetted (its skills load as soon as the model asks). Whatever the approval mode says.
|
|
958
|
+
*/
|
|
959
|
+
consent?: McpSkillConsent;
|
|
960
|
+
}
|
|
961
|
+
/** `skills` on a server's config: `true`, or options (on, with them); `false` / absent: off. */
|
|
962
|
+
type McpSkillsSetting = boolean | McpSkillsOptions;
|
|
963
|
+
/**
|
|
964
|
+
* What a person is shown before a server's skill enters the model's context - the request's
|
|
965
|
+
* `skill` (the core's `tool.approval-requested` event). Every string is the SERVER's, cleaned:
|
|
966
|
+
* show it as plain text, captioned as the server's.
|
|
967
|
+
*/
|
|
968
|
+
interface McpSkillConsentView {
|
|
969
|
+
/** The host's label of the server that serves it. */
|
|
970
|
+
server: string;
|
|
971
|
+
/** Its name in the agent's catalog (`<server>/<skill>`). */
|
|
972
|
+
name: string;
|
|
973
|
+
/** Its frontmatter name. */
|
|
974
|
+
skill: string;
|
|
975
|
+
/** The URI of its `SKILL.md` (cleaned, at most 200 characters). */
|
|
976
|
+
uri: string;
|
|
977
|
+
/** The description from its entry, on one line, at most {@link MCP_SKILL_DESCRIPTION_MAX_CHARS}. */
|
|
978
|
+
description: string;
|
|
979
|
+
/** Bytes of its `SKILL.md`, and of all its files. */
|
|
980
|
+
size: number;
|
|
981
|
+
totalSize: number;
|
|
982
|
+
/** Its other files, by path (at most {@link MCP_SKILL_FILES_SHOWN_MAX}), and how many there are. */
|
|
983
|
+
files: string[];
|
|
984
|
+
fileCount: number;
|
|
985
|
+
/** Its instructions exactly as the model would read them ({@link mcpSkillBodyPreview}). */
|
|
986
|
+
body: string;
|
|
987
|
+
/** Named by URI (`skills/get`), not in the server's listing. */
|
|
988
|
+
byUri?: true;
|
|
989
|
+
/** It sits inside this skill of the same server, whose approval does not cover it. */
|
|
990
|
+
nestedIn?: string;
|
|
991
|
+
/** Asked for this run only (`'ask'`) or, on a yes, for the agent's life (`'once-per-skill'`). */
|
|
992
|
+
consent: Exclude<McpSkillConsent, 'never'>;
|
|
993
|
+
}
|
|
994
|
+
|
|
606
995
|
declare const SPAWN_SUBAGENT_TOOL = "spawn_subagent";
|
|
607
996
|
type SubagentDefaultTools = 'read-only' | 'all';
|
|
608
997
|
interface IDynamicSubagentsConfig {
|
|
@@ -740,6 +1129,11 @@ interface ISkill {
|
|
|
740
1129
|
content: string;
|
|
741
1130
|
}[];
|
|
742
1131
|
origin?: ISkillOrigin;
|
|
1132
|
+
mcp?: IMcpSkillOrigin;
|
|
1133
|
+
}
|
|
1134
|
+
interface IMcpSkillOrigin {
|
|
1135
|
+
server: string;
|
|
1136
|
+
uri: string;
|
|
743
1137
|
}
|
|
744
1138
|
interface ISkillOrigin {
|
|
745
1139
|
kind: 'learned';
|
|
@@ -773,6 +1167,11 @@ interface IToolApprovalRequest {
|
|
|
773
1167
|
id: string;
|
|
774
1168
|
depth: number;
|
|
775
1169
|
};
|
|
1170
|
+
mcpSkills?: string[];
|
|
1171
|
+
skill?: McpSkillConsentView;
|
|
1172
|
+
}
|
|
1173
|
+
interface IToolApprovalContext {
|
|
1174
|
+
signal: AbortSignal;
|
|
776
1175
|
}
|
|
777
1176
|
type ToolApprovalDecision = boolean | {
|
|
778
1177
|
approved: boolean;
|
|
@@ -782,7 +1181,7 @@ type ToolApprovalDecision = boolean | {
|
|
|
782
1181
|
interface IToolApprovalConfig {
|
|
783
1182
|
mode?: ToolApprovalMode;
|
|
784
1183
|
rules?: Record<string, ToolPermission>;
|
|
785
|
-
onRequest?: (req: IToolApprovalRequest) => ToolApprovalDecision | Promise<ToolApprovalDecision>;
|
|
1184
|
+
onRequest?: (req: IToolApprovalRequest, ctx: IToolApprovalContext) => ToolApprovalDecision | Promise<ToolApprovalDecision>;
|
|
786
1185
|
timeoutMs?: number;
|
|
787
1186
|
}
|
|
788
1187
|
type PromptCachingSetting = boolean | {
|
|
@@ -802,6 +1201,8 @@ interface IMcpHttpServerConfig {
|
|
|
802
1201
|
authProvider?: OAuthClientProvider;
|
|
803
1202
|
fetch?: FetchLike;
|
|
804
1203
|
connectTimeoutMs?: number;
|
|
1204
|
+
protocol?: McpProtocolMode;
|
|
1205
|
+
skills?: McpSkillsSetting;
|
|
805
1206
|
}
|
|
806
1207
|
interface IMcpStdioServerConfig {
|
|
807
1208
|
command: string;
|
|
@@ -809,6 +1210,8 @@ interface IMcpStdioServerConfig {
|
|
|
809
1210
|
env?: Record<string, string>;
|
|
810
1211
|
cwd?: string;
|
|
811
1212
|
connectTimeoutMs?: number;
|
|
1213
|
+
protocol?: McpProtocolMode;
|
|
1214
|
+
skills?: McpSkillsSetting;
|
|
812
1215
|
}
|
|
813
1216
|
type IMcpServerConfig = IMcpHttpServerConfig | IMcpStdioServerConfig;
|
|
814
1217
|
interface IAgentStageOverride {
|
|
@@ -860,6 +1263,11 @@ interface IAgentConfig {
|
|
|
860
1263
|
toolApproval?: IToolApprovalConfig;
|
|
861
1264
|
toolSearchThreshold?: number;
|
|
862
1265
|
mcpConnectTimeoutMs?: number;
|
|
1266
|
+
onElicitation?: McpElicitationHandler;
|
|
1267
|
+
elicitation?: McpElicitationOptions;
|
|
1268
|
+
mcpSkills?: {
|
|
1269
|
+
consent?: McpSkillConsent;
|
|
1270
|
+
};
|
|
863
1271
|
mcpInstructions?: boolean;
|
|
864
1272
|
promptCaching?: PromptCachingSetting;
|
|
865
1273
|
llmTimeoutMs?: number;
|
|
@@ -922,7 +1330,7 @@ interface IStepResult {
|
|
|
922
1330
|
}
|
|
923
1331
|
type ReplanTrigger = 'failure' | 'always' | ((result: IStepResult) => boolean | Promise<boolean>);
|
|
924
1332
|
type ReplanCause = 'last-step' | 'clean-step' | 'llm-decision' | 'user-message' | 'decision-model';
|
|
925
|
-
type UsagePhase = 'plan' | 'execute' | 'replan' | 'synthesize' | 'compact' | 'subagent' | 'decision' | 'media';
|
|
1333
|
+
type UsagePhase = 'plan' | 'execute' | 'replan' | 'synthesize' | 'compact' | 'subagent' | 'decision' | 'media' | 'search';
|
|
926
1334
|
type AgentEventBody = {
|
|
927
1335
|
type: 'plan.thought-delta';
|
|
928
1336
|
delta: string;
|
|
@@ -1017,6 +1425,7 @@ type AgentEventBody = {
|
|
|
1017
1425
|
type: 'skill.activated';
|
|
1018
1426
|
name: string;
|
|
1019
1427
|
by: 'plan' | 'tool';
|
|
1428
|
+
server?: string;
|
|
1020
1429
|
} | {
|
|
1021
1430
|
type: 'tools.discovered';
|
|
1022
1431
|
step: IPlanStep;
|
|
@@ -1033,6 +1442,8 @@ type AgentEventBody = {
|
|
|
1033
1442
|
id: string;
|
|
1034
1443
|
depth: number;
|
|
1035
1444
|
};
|
|
1445
|
+
mcpSkills?: string[];
|
|
1446
|
+
skill?: McpSkillConsentView;
|
|
1036
1447
|
} | {
|
|
1037
1448
|
type: 'tool.approval-resolved';
|
|
1038
1449
|
id: string;
|
|
@@ -1040,6 +1451,29 @@ type AgentEventBody = {
|
|
|
1040
1451
|
approved: boolean;
|
|
1041
1452
|
reason?: string;
|
|
1042
1453
|
automatic: boolean;
|
|
1454
|
+
} | {
|
|
1455
|
+
type: 'mcp.elicitation-requested';
|
|
1456
|
+
id: string;
|
|
1457
|
+
server: string;
|
|
1458
|
+
tool: string;
|
|
1459
|
+
mode: 'form' | 'url';
|
|
1460
|
+
message: string;
|
|
1461
|
+
requestedSchema?: McpElicitationSchema;
|
|
1462
|
+
url?: string;
|
|
1463
|
+
step?: IPlanStep;
|
|
1464
|
+
subagent?: {
|
|
1465
|
+
id: string;
|
|
1466
|
+
depth: number;
|
|
1467
|
+
};
|
|
1468
|
+
} | {
|
|
1469
|
+
type: 'mcp.elicitation-answered';
|
|
1470
|
+
id: string;
|
|
1471
|
+
server: string;
|
|
1472
|
+
tool: string;
|
|
1473
|
+
action: 'accept' | 'decline' | 'cancel';
|
|
1474
|
+
automatic: boolean;
|
|
1475
|
+
reason?: McpElicitationReason;
|
|
1476
|
+
fields?: string[];
|
|
1043
1477
|
} | {
|
|
1044
1478
|
type: 'subagent.start';
|
|
1045
1479
|
id: string;
|
|
@@ -1206,6 +1640,7 @@ interface IAgent {
|
|
|
1206
1640
|
name: string;
|
|
1207
1641
|
description: string;
|
|
1208
1642
|
learned?: true;
|
|
1643
|
+
server?: string;
|
|
1209
1644
|
}[];
|
|
1210
1645
|
listLearnedSkills: () => ISkill[];
|
|
1211
1646
|
forgetSkill: (name: string) => Promise<boolean>;
|
|
@@ -1230,6 +1665,8 @@ declare class ToolDeniedError extends Error {
|
|
|
1230
1665
|
}
|
|
1231
1666
|
declare const markReadOnly: <T extends object>(tool: T, readOnly?: boolean) => T;
|
|
1232
1667
|
declare const isReadOnlyTool: (tool: unknown) => boolean;
|
|
1668
|
+
declare const markCodeExecution: <T extends object>(tool: T, codeExecution?: boolean) => T;
|
|
1669
|
+
declare const isCodeExecutionTool: (tool: unknown) => boolean;
|
|
1233
1670
|
/**
|
|
1234
1671
|
* The most specific rule matching `name`: an exact key wins, then the
|
|
1235
1672
|
* longest matching '*' glob (ties: the first declared). Pure.
|
|
@@ -1245,18 +1682,26 @@ interface IToolDecisionInput {
|
|
|
1245
1682
|
rules?: Record<string, ToolPermission>;
|
|
1246
1683
|
remembered?: ReadonlySet<string>;
|
|
1247
1684
|
builtIn?: boolean;
|
|
1685
|
+
codeExecution?: boolean;
|
|
1686
|
+
mcpSkills?: readonly string[];
|
|
1248
1687
|
}
|
|
1249
1688
|
interface IToolDecision {
|
|
1250
1689
|
permission: ToolPermission;
|
|
1251
|
-
source: 'builtin' | 'remembered' | 'rule' | 'mode';
|
|
1690
|
+
source: 'builtin' | 'remembered' | 'rule' | 'mode' | 'mcp-skill';
|
|
1252
1691
|
rule?: string;
|
|
1253
1692
|
}
|
|
1254
1693
|
/**
|
|
1255
1694
|
* Decide one call. Pure. Order: built-in -> remembered "always allow" ->
|
|
1256
1695
|
* most specific rule -> mode default (autopilot: allow; read-only: allow if
|
|
1257
1696
|
* readOnly else deny; ask-writes: allow if readOnly else ask; ask-all: ask).
|
|
1697
|
+
* Then one rule that only ever tightens: a call that runs code while the run acts on an MCP
|
|
1698
|
+
* server's skill is asked when it would have been allowed - by the mode, a rule or an "always
|
|
1699
|
+
* allow" alike (the Skills extension: no code runs here on a server's skill without a person's
|
|
1700
|
+
* approval). A deny stays a deny.
|
|
1258
1701
|
*/
|
|
1259
1702
|
declare const decideToolPermission: (input: IToolDecisionInput) => IToolDecision;
|
|
1703
|
+
/** How long a question waits for a decision when `toolApproval.timeoutMs` is not set: 5 minutes. */
|
|
1704
|
+
declare const TOOL_APPROVAL_TIMEOUT_MS = 300000;
|
|
1260
1705
|
|
|
1261
1706
|
declare const REPLAY_NOTE = "[not run again: this exact call already succeeded in an earlier attempt at this step, and its effect is in place. Its result then:]";
|
|
1262
1707
|
declare const isReplayedToolOutput: (output: unknown) => boolean;
|
|
@@ -1292,8 +1737,9 @@ declare const addUsage: (a: IUsage, b: IUsage) => IFilledUsage;
|
|
|
1292
1737
|
* OAuth 2.1 for remote MCP servers, from Node.
|
|
1293
1738
|
*
|
|
1294
1739
|
* The MCP SDK owns the protocol - discovery (RFC 9728), dynamic client
|
|
1295
|
-
* registration (RFC 7591) or a client ID metadata document (CIMD)
|
|
1296
|
-
*
|
|
1740
|
+
* registration (RFC 7591) or a client ID metadata document (CIMD) -
|
|
1741
|
+
* automatically or one of them only (`registration`) - PKCE, the code exchange
|
|
1742
|
+
* and the refresh on 401. What it does not own, and what this
|
|
1297
1743
|
* module supplies, is WHERE the resulting tokens live between processes, HOW an
|
|
1298
1744
|
* operator is asked to authorize, and the check of the `iss` parameter on the
|
|
1299
1745
|
* way back (RFC 9207).
|
|
@@ -1341,6 +1787,25 @@ declare class MemoryOAuthStore implements IOAuthStore {
|
|
|
1341
1787
|
set(key: string, value: string): Promise<void>;
|
|
1342
1788
|
delete(key: string): Promise<void>;
|
|
1343
1789
|
}
|
|
1790
|
+
/**
|
|
1791
|
+
* How the OAuth client is registered with a server's authorization server
|
|
1792
|
+
* (`INodeOAuthProviderOptions.registration`):
|
|
1793
|
+
*
|
|
1794
|
+
* - `'auto'` (the default): by the client ID metadata document (CIMD) when the
|
|
1795
|
+
* authorization server advertises `client_id_metadata_document_supported` and
|
|
1796
|
+
* a `clientMetadataUrl` is set, by dynamic client registration (DCR, RFC 7591)
|
|
1797
|
+
* otherwise. A client already in the store is used as it is.
|
|
1798
|
+
* - `'cimd'`: by the metadata document only. Needs `clientMetadataUrl`. An
|
|
1799
|
+
* authorization server that does not advertise support is refused before
|
|
1800
|
+
* anything is sent to its registration endpoint.
|
|
1801
|
+
* - `'dcr'`: by dynamic registration only, even with a `clientMetadataUrl` set:
|
|
1802
|
+
* the SDK is never shown the URL.
|
|
1803
|
+
*
|
|
1804
|
+
* The browser package has the same option, with the same names; change both.
|
|
1805
|
+
*/
|
|
1806
|
+
type McpOAuthRegistration = 'auto' | 'cimd' | 'dcr';
|
|
1807
|
+
/** How a stored client was registered: see {@link NodeOAuthProvider.registrationKind}. */
|
|
1808
|
+
type McpOAuthRegistrationKind = 'cimd' | 'dcr';
|
|
1344
1809
|
interface INodeOAuthProviderOptions {
|
|
1345
1810
|
/** The MCP endpoint being authorized. */
|
|
1346
1811
|
serverUrl: string;
|
|
@@ -1364,9 +1829,20 @@ interface INodeOAuthProviderOptions {
|
|
|
1364
1829
|
* this URL is used as the `client_id` and no dynamic registration is made;
|
|
1365
1830
|
* otherwise registration runs as before. A registration already in the store
|
|
1366
1831
|
* wins over both. Must be https with a non-root path, and the document served
|
|
1367
|
-
* there must list the same `redirect_uris` as `redirectUrl`.
|
|
1832
|
+
* there must list the same `redirect_uris` as `redirectUrl`. With
|
|
1833
|
+
* `registration: 'dcr'` it is never used as the `client_id`.
|
|
1368
1834
|
*/
|
|
1369
1835
|
clientMetadataUrl?: string;
|
|
1836
|
+
/**
|
|
1837
|
+
* How the client is registered: `'auto'` (default; as described for
|
|
1838
|
+
* `clientMetadataUrl`), `'cimd'` (the metadata document only: needs
|
|
1839
|
+
* `clientMetadataUrl`, and an authorization server without support is refused
|
|
1840
|
+
* before any registration request) or `'dcr'` (dynamic registration only).
|
|
1841
|
+
* A stored client of the other kind is not reused: it is forgotten, with the
|
|
1842
|
+
* tokens issued to it, and the operator authorizes again. See
|
|
1843
|
+
* {@link McpOAuthRegistration}.
|
|
1844
|
+
*/
|
|
1845
|
+
registration?: McpOAuthRegistration;
|
|
1370
1846
|
/** Defaults to a 0600 JSON file under ~/.agent. */
|
|
1371
1847
|
store?: IOAuthStore;
|
|
1372
1848
|
/** Treat the access token as expired this many seconds early. Default 30. */
|
|
@@ -1392,7 +1868,8 @@ interface INodeOAuthProviderOptions {
|
|
|
1392
1868
|
* `authorization_response_iss_parameter_supported: true`;
|
|
1393
1869
|
* - no stored discovery state (a store written by an older version): `iss` is
|
|
1394
1870
|
* compared with the issuer stamped on the stored client information, and with
|
|
1395
|
-
* nothing to compare against the response is accepted.
|
|
1871
|
+
* nothing to compare against the response is accepted. ({@link finishMcpOAuth}
|
|
1872
|
+
* does not exchange a code in that case: see there.)
|
|
1396
1873
|
*
|
|
1397
1874
|
* The browser package carries the same function; change both.
|
|
1398
1875
|
*/
|
|
@@ -1411,20 +1888,65 @@ declare class NodeOAuthProvider implements OAuthClientProvider {
|
|
|
1411
1888
|
private readonly _redirectUrl;
|
|
1412
1889
|
private readonly _clientMetadata;
|
|
1413
1890
|
private readonly _clientMetadataUrl?;
|
|
1891
|
+
private readonly _registration;
|
|
1414
1892
|
private readonly skewMs;
|
|
1415
1893
|
private readonly onAuthorizationUrl?;
|
|
1894
|
+
/** Once per provider: a stored client of the other kind is forgotten (see `settle`). */
|
|
1895
|
+
private settled?;
|
|
1416
1896
|
constructor(opts: INodeOAuthProviderOptions);
|
|
1417
1897
|
get redirectUrl(): string;
|
|
1418
1898
|
get clientMetadata(): OAuthClientMetadata;
|
|
1419
|
-
/**
|
|
1899
|
+
/**
|
|
1900
|
+
* The client ID metadata document URL (CIMD), when one was configured - and
|
|
1901
|
+
* not with `registration: 'dcr'`: the SDK uses this getter to decide, so a
|
|
1902
|
+
* URL it cannot see is a URL it never uses as the `client_id`.
|
|
1903
|
+
*/
|
|
1420
1904
|
get clientMetadataUrl(): string | undefined;
|
|
1905
|
+
/** How this provider registers its client: `'auto'`, `'cimd'` or `'dcr'`. */
|
|
1906
|
+
get registration(): McpOAuthRegistration;
|
|
1421
1907
|
private key;
|
|
1422
1908
|
private readJSON;
|
|
1423
1909
|
state(): Promise<string>;
|
|
1424
1910
|
/** Single-use CSRF check for the value that comes back on the redirect. */
|
|
1425
1911
|
verifyState(returned: string | undefined): Promise<boolean>;
|
|
1912
|
+
/** The stored client, without our stamp, and how it was registered. */
|
|
1913
|
+
private readClient;
|
|
1914
|
+
private kindOf;
|
|
1915
|
+
/**
|
|
1916
|
+
* May this provider use the stored client? Under `'auto'` any; under `'cimd'`
|
|
1917
|
+
* only the configured document itself; under `'dcr'` only one that was not
|
|
1918
|
+
* registered by a document.
|
|
1919
|
+
*/
|
|
1920
|
+
private fits;
|
|
1921
|
+
/** The client and the tokens issued to it go together: a token belongs to a client. */
|
|
1922
|
+
private forgetClient;
|
|
1923
|
+
/**
|
|
1924
|
+
* Under `'cimd'` / `'dcr'`, before the first read of the client or a token: a
|
|
1925
|
+
* stored client of the other kind (registered under another setting) is
|
|
1926
|
+
* forgotten with its tokens, so the setting is never served by the old
|
|
1927
|
+
* client - not even by its access token, which the transport would otherwise
|
|
1928
|
+
* keep sending until it expires. Once per provider (its setting is fixed); a
|
|
1929
|
+
* failure is not remembered.
|
|
1930
|
+
*/
|
|
1931
|
+
private settle;
|
|
1932
|
+
/**
|
|
1933
|
+
* `'cimd'` with no usable client: the SDK is about to choose between the
|
|
1934
|
+
* document and a dynamic registration, by the authorization server metadata
|
|
1935
|
+
* it has just saved (`saveDiscoveryState` comes first). Without support it
|
|
1936
|
+
* would register - so it is stopped HERE, before any request is made, and
|
|
1937
|
+
* what discovery found is forgotten, so the next attempt reads the server's
|
|
1938
|
+
* metadata again (a server that starts supporting CIMD is noticed).
|
|
1939
|
+
*/
|
|
1940
|
+
private assertCimdSupported;
|
|
1426
1941
|
clientInformation(): Promise<OAuthClientInformationMixed | undefined>;
|
|
1427
1942
|
saveClientInformation(info: OAuthClientInformationMixed): Promise<void>;
|
|
1943
|
+
/**
|
|
1944
|
+
* How the stored client was registered: `'cimd'` (its `client_id` is the
|
|
1945
|
+
* client ID metadata document), `'dcr'` (registered dynamically - or saved by
|
|
1946
|
+
* the host), or undefined when there is none this provider would use. Read it
|
|
1947
|
+
* after an authorization to tell the operator which way was taken.
|
|
1948
|
+
*/
|
|
1949
|
+
registrationKind(): Promise<McpOAuthRegistrationKind | undefined>;
|
|
1428
1950
|
tokens(): Promise<OAuthTokens | undefined>;
|
|
1429
1951
|
saveTokens(tokens: OAuthTokens): Promise<void>;
|
|
1430
1952
|
saveCodeVerifier(verifier: string): Promise<void>;
|
|
@@ -1439,9 +1961,11 @@ declare class NodeOAuthProvider implements OAuthClientProvider {
|
|
|
1439
1961
|
redirectToAuthorization(url: URL): Promise<void>;
|
|
1440
1962
|
/**
|
|
1441
1963
|
* Called by the SDK when the server rejects what we hold: `'tokens'` on an
|
|
1442
|
-
* `invalid_grant` (dead refresh token)
|
|
1443
|
-
* AS forgot our dynamic registration)
|
|
1444
|
-
*
|
|
1964
|
+
* `invalid_grant` (dead refresh token); `'client'` and then `'tokens'` on an
|
|
1965
|
+
* `invalid_client` (the AS forgot our dynamic registration) - what discovery
|
|
1966
|
+
* found is kept on purpose, the SDK checks the next callback against it.
|
|
1967
|
+
* `'verifier'` and `'discovery'` are in its type and handled the same way:
|
|
1968
|
+
* one key each. `'all'` is what {@link reset} asks for.
|
|
1445
1969
|
*/
|
|
1446
1970
|
invalidateCredentials(scope: 'all' | 'client' | 'tokens' | 'verifier' | 'discovery'): Promise<void>;
|
|
1447
1971
|
/** True when there is no access token, or it expires within the skew window. */
|
|
@@ -1470,6 +1994,12 @@ declare const beginMcpOAuth: (provider: NodeOAuthProvider, opts?: IOAuthRequestO
|
|
|
1470
1994
|
* issuer (RFC 9207, {@link checkAuthorizationResponseIssuer}), exchanges the
|
|
1471
1995
|
* code with the stored PKCE verifier and persists the tokens. Throws unless the
|
|
1472
1996
|
* exchange fully succeeded.
|
|
1997
|
+
*
|
|
1998
|
+
* A flow whose discovery state is not in the store any more (started by a
|
|
1999
|
+
* version that did not keep it, or cleared in between) is not completed: the
|
|
2000
|
+
* code is bound to the authorization server the operator was sent to, and
|
|
2001
|
+
* without the record of which one that was the SDK refuses the exchange.
|
|
2002
|
+
* Start again with {@link beginMcpOAuth}; stored tokens are not touched.
|
|
1473
2003
|
*/
|
|
1474
2004
|
declare const finishMcpOAuth: (provider: NodeOAuthProvider, callback: {
|
|
1475
2005
|
code: string;
|
|
@@ -1477,34 +2007,6 @@ declare const finishMcpOAuth: (provider: NodeOAuthProvider, callback: {
|
|
|
1477
2007
|
iss?: string;
|
|
1478
2008
|
}, opts?: IOAuthRequestOptions) => Promise<void>;
|
|
1479
2009
|
|
|
1480
|
-
/**
|
|
1481
|
-
* What the MCP connectors of the two agent packages share: how a server's `instructions` reach a
|
|
1482
|
-
* system prompt, and how a tool result's `structuredContent` reaches the model. Pure, no imports.
|
|
1483
|
-
*
|
|
1484
|
-
* This file is a COPY, byte for byte, in `@dudko.dev/agent` (`src/mcp-shared.ts`) and
|
|
1485
|
-
* `@dudko.dev/agent-web` (`src/mcp/shared.ts`): change both. The Node package's
|
|
1486
|
-
* `tests/mcp-shared.test.ts` compares the two files and tests every cap and guard here.
|
|
1487
|
-
*/
|
|
1488
|
-
/** The `instructions` one connected MCP server returned in its `initialize` result. */
|
|
1489
|
-
interface McpServerInstructions {
|
|
1490
|
-
/** The server's name: its key in the host's configuration. */
|
|
1491
|
-
server: string;
|
|
1492
|
-
instructions: string;
|
|
1493
|
-
}
|
|
1494
|
-
/** The most one server's instructions take in a system prompt, in characters. */
|
|
1495
|
-
declare const MCP_INSTRUCTIONS_MAX_CHARS_PER_SERVER = 2000;
|
|
1496
|
-
/** The most all servers' instructions take together, in characters. */
|
|
1497
|
-
declare const MCP_INSTRUCTIONS_MAX_CHARS_TOTAL = 8000;
|
|
1498
|
-
/**
|
|
1499
|
-
* The system-prompt section for the servers' instructions, or '' when no server sent any (the
|
|
1500
|
-
* prompt is then exactly what it was). Each server's text is capped
|
|
1501
|
-
* (MCP_INSTRUCTIONS_MAX_CHARS_PER_SERVER), so is the sum (MCP_INSTRUCTIONS_MAX_CHARS_TOTAL, in
|
|
1502
|
-
* the order given: a server past the total is named as omitted), and every line of it is
|
|
1503
|
-
* prefixed with "| ", so a server cannot write something that reads as a heading of this prompt
|
|
1504
|
-
* or as another server's note.
|
|
1505
|
-
*/
|
|
1506
|
-
declare const renderMcpInstructions: (list: readonly McpServerInstructions[] | undefined) => string;
|
|
1507
|
-
|
|
1508
2010
|
/**
|
|
1509
2011
|
* Enterprise-Managed Authorization for remote MCP servers (the MCP extension
|
|
1510
2012
|
* `io.modelcontextprotocol/enterprise-managed-authorization`, also called Cross
|
|
@@ -2082,5 +2584,5 @@ interface ISubagentToolOptions {
|
|
|
2082
2584
|
*/
|
|
2083
2585
|
declare const createSubagentTool: (opts: ISubagentToolOptions) => Tool;
|
|
2084
2586
|
|
|
2085
|
-
export { DEFAULT_COMPACTION_THRESHOLD_RATIO, DEFAULT_DECISION_CONFIDENCE_THRESHOLD, DEFAULT_DECISION_TIMEOUT_MS, DirSkillStore, ENTERPRISE_MANAGED_AUTHORIZATION_EXTENSION, EgressError, EnterpriseOAuthError, FORGET_SKILL_TOOL, FileOAuthStore, GENERATE_IMAGE_TOOL, GENERATE_SPEECH_TOOL, MCP_INSTRUCTIONS_MAX_CHARS_PER_SERVER, MCP_INSTRUCTIONS_MAX_CHARS_TOTAL, MEDIA_AUDIO_TYPES, MEDIA_DEFAULT_MAX_CALLS, MEDIA_FOLDER, MEDIA_IMAGE_TYPES, MEDIA_MAX_ATTACHED_AUDIO, MEDIA_MAX_AUDIO_INPUT_BYTES, MEDIA_MAX_IMAGE_BYTES, MEDIA_MAX_PROMPT_CHARS, MEDIA_MAX_SPEECH_BYTES, MEDIA_MAX_SPEECH_CHARS, MEDIA_MAX_TRANSCRIPT_CHARS, MEDIA_TIMEOUT_MS, MediaBudgetError, MediaError, MemoryOAuthStore, MemorySkillStore, NodeEnterpriseOAuthProvider, NodeOAuthProvider, PIPELINE_LIMITS, PipelineNodeError, PipelineValidationError, REPLAY_NOTE, RUN_JS_TOOL, SAVE_SKILL_TOOL, SEARCH_API_BASE_URL, SEARCH_DEFAULT_MAX_RESULTS, SEARCH_MAX_QUERY_CHARS, SEARCH_MAX_RESULTS, SEARCH_MAX_SNIPPET_CHARS, SEARCH_MAX_TITLE_CHARS, SEARCH_MAX_TOTAL_CHARS, SEARCH_MAX_URL_CHARS, SEARCH_PROVIDERS, SPAWN_INPUT_SCHEMA, SPAWN_SUBAGENT_TOOL, SUBAGENT_DEFAULTS, SUBAGENT_MAX_DEPTH_LIMIT, SUMMARY_PREFIX, SandboxUnavailableError, SubagentSpawnError, TRANSCRIBE_AUDIO_TOOL, ToolBudgetError, ToolDeniedError, WEB_FETCH_TOOL, WEB_SEARCH_TOOL, acceptMedia, addUsage, adoptSubagentEvent, askDecisionModel, beginMcpOAuth, buildInstructions, buildMediaModelFromStage, buildSearchRequest, checkAuthorizationResponseIssuer, checkEgressUrl, checkLimits, checkRedirect, classifyAddress, compactHistory, createAgent, createEgressTools, createEnterpriseOAuthProvider, createLearning, createMedia, createNodeOAuthProvider, createPipeline, createRunControl, createSafeFetch, createSandboxTool, createSandboxTools, createSearchTools, createSubagentTool, createToolResultClearer, createWebFetchTool, createWebSearchTool, decideToolPermission, decisionModelFromAiSdk, defineSkill, estimateTokens, findSecret, finishMcpOAuth, getCurrentRunId, getCurrentRunSandbox, hostMatches, htmlToText, isReadOnlyTool, isReplayedToolOutput, loadSkillsFromDir, markReadOnly, matchToolRule, mediaUsageOf, mergeProviderOptions, nodeResolver, normalizePipeline, normalizeSkillName, normalizeUsage, parseSearchResponse, parseSkillMarkdown, redactHeaders, renderMcpInstructions, renderPipelineNodeInput, resolveCompaction, resolveDynamicSubagents, resolveEgressPolicy, resolveLimits, resolvePromptCaching, resolveSandboxLimits, resolveThinking, sanitizeSearchResults, searchEgressPolicy, searchTools, sniffMediaType, testPipelineCondition, truncateToolModelOutput, validatePipeline, withRollingBreakpoint, withToolOutputLimit, wrapTranscript };
|
|
2086
|
-
export type { AgentEvent, AgentStage, BudgetKind, DecisionFallbackReason, DecisionPoint, EgressErrorCode, EnterpriseAssertionAlgorithm, EnterpriseAssertionAudience, EnterpriseAssertionType, EnterpriseOAuthHop, EnterpriseOAuthLog, EnterprisePrivateKey, EscalationReason, EventHandler, IAgent, IAgentConfig, IAgentRunOptions, IAgentRunResult, IAgentStageOverride, IAiSdkDecisionOptions, IClearedInfo, ICloseOptions, ICompactHistoryOptions, ICompactHistoryResult, ICompactOptions, ICompactResult, ICompactionConfig, IConversationTurn, IDecisionAnswer, IDecisionCallOptions, IDecisionConfig, IDecisionEvent, IDecisionModel, IDecisionOption, IDecisionOutcome, IDecisionQuestion, IDynamicSubagentsConfig, IEgressPolicy, IEnterpriseIdpOptions, IEnterpriseOAuthProviderOptions, IEscalationConfig, ILearning, ILearningConfig, ILimitBreach, IMcpHttpServerConfig, IMcpServerConfig, IMcpStdioServerConfig, IMedia, IMediaConfig, IMediaFile, IMediaModelSpec, IMediaUsage, INodeOAuthProviderOptions, IOAuthRequestOptions, IOAuthStore, IPersistence, IPlan, IPlanStep, IResolvedAddress, IResolvedDynamicSubagents, IResolvedThinking, IRunFile, IRunSnapshot, ISandboxConfig, ISandboxError, ISandboxLimits, ISandboxResult, ISanitizedSearch, ISaveSkillInput, ISearchConfig, ISearchOptions, ISearchRequest, ISearchResult, ISearchToolsOptions, ISkill, ISkillOrigin, ISkillStore, IStepEscalation, IStepResult, IStepStartInfo, ISubagentProfile, ISubagentToolOptions, ISubagentsConfig, IThinkingConfig, ITokenLimits, IToolApprovalConfig, IToolApprovalRequest, IToolCatalogEntry, IToolDecision, IToolDecisionInput, IToolResultClearing, ITranscription, IUsage, IWebSearchOptions, LogLevel, McpServerInstructions, MediaImageModel, MediaKind, MediaModelKind, MediaSpeechModel, MediaTranscriptionModel, ModelTier, NodeResolverOptions, Pipeline, PipelineCondition, PipelineDefinition, PipelineEdge, PipelineEvent, PipelineIssue, PipelineModelConfig, PipelineNode, PipelineNodeContext, PipelineNodeInput, PipelineNodeOutput, PipelineNodeRunner, PipelineNodeSource, PipelineOptions, PipelineResult, PipelineRoute, PipelineRunOptions, PipelineStop, PipelineTraceEntry, PipelineUsage, PipelineValidation, PromptCachingSetting, ProviderType, ReplanCause, ReplanTrigger, RunControl, SafeFetch, SearchEngine, SearchFreshness, SearchProvider, StepComplexity, SubagentDefaultTools, SubagentInfo, SubagentIsolation, ThinkingLevel, ThinkingSetting, TierReason, TokenLimitKind, ToolApprovalDecision, ToolApprovalMode, ToolPermission, ToolSelectionStrategy, UsagePhase };
|
|
2587
|
+
export { DEFAULT_COMPACTION_THRESHOLD_RATIO, DEFAULT_DECISION_CONFIDENCE_THRESHOLD, DEFAULT_DECISION_TIMEOUT_MS, DirSkillStore, ENTERPRISE_MANAGED_AUTHORIZATION_EXTENSION, EgressError, EnterpriseOAuthError, FORGET_SKILL_TOOL, FileOAuthStore, GENERATE_IMAGE_TOOL, GENERATE_SPEECH_TOOL, MCP_ELICITATION_MAX_PER_RUN, MCP_ELICITATION_MAX_PER_TOOL_CALL, MCP_ELICITATION_TIMEOUT_MS, MCP_INSTRUCTIONS_MAX_CHARS_PER_SERVER, MCP_INSTRUCTIONS_MAX_CHARS_TOTAL, MCP_MODERN_PROTOCOL_VERSION, MCP_SKILLS_EXTENSION, MCP_SKILLS_MAX_PER_SERVER, MCP_SKILLS_MAX_TOTAL, MCP_SKILL_BODY_MAX_CHARS, MCP_SKILL_CONSENTS, MCP_SKILL_CONSENT_DEFAULT, MCP_SKILL_DESCRIPTION_MAX_CHARS, MCP_SKILL_FILE_MAX_CHARS, MCP_SKILL_MAX_RESOURCES, MCP_SKILL_MAX_TOTAL_BYTES, MCP_SKILL_URI_MAX_CHARS, MEDIA_AUDIO_TYPES, MEDIA_DEFAULT_MAX_CALLS, MEDIA_FOLDER, MEDIA_IMAGE_TYPES, MEDIA_MAX_ATTACHED_AUDIO, MEDIA_MAX_AUDIO_INPUT_BYTES, MEDIA_MAX_IMAGE_BYTES, MEDIA_MAX_PROMPT_CHARS, MEDIA_MAX_SPEECH_BYTES, MEDIA_MAX_SPEECH_CHARS, MEDIA_MAX_TRANSCRIPT_CHARS, MEDIA_TIMEOUT_MS, MediaBudgetError, MediaError, MemoryOAuthStore, MemorySkillStore, NodeEnterpriseOAuthProvider, NodeOAuthProvider, PIPELINE_LIMITS, PipelineNodeError, PipelineValidationError, REPLAY_NOTE, RUN_JS_TOOL, SAVE_SKILL_TOOL, SEARCH_API_BASE_URL, SEARCH_DEFAULT_MAX_RESULTS, SEARCH_GOOGLE_DEFAULT_MODEL, SEARCH_GOOGLE_NOTE, SEARCH_MAX_QUERY_CHARS, SEARCH_MAX_RESULTS, SEARCH_MAX_SNIPPET_CHARS, SEARCH_MAX_SUMMARY_CHARS, SEARCH_MAX_TITLE_CHARS, SEARCH_MAX_TOTAL_CHARS, SEARCH_MAX_URL_CHARS, SEARCH_PROVIDERS, SPAWN_INPUT_SCHEMA, SPAWN_SUBAGENT_TOOL, SUBAGENT_DEFAULTS, SUBAGENT_MAX_DEPTH_LIMIT, SUMMARY_PREFIX, SandboxUnavailableError, SubagentSpawnError, TOOL_APPROVAL_TIMEOUT_MS, TRANSCRIBE_AUDIO_TOOL, ToolBudgetError, ToolDeniedError, WEB_FETCH_TOOL, WEB_SEARCH_TOOL, acceptMedia, addUsage, adoptSubagentEvent, askDecisionModel, beginMcpOAuth, buildInstructions, buildMediaModelFromStage, buildSearchRequest, checkAuthorizationResponseIssuer, checkEgressUrl, checkLimits, checkRedirect, classifyAddress, compactHistory, createAgent, createEgressTools, createEnterpriseOAuthProvider, createLearning, createMedia, createNodeOAuthProvider, createPipeline, createRunControl, createSafeFetch, createSandboxTool, createSandboxTools, createSearchTools, createSubagentTool, createToolResultClearer, createWebFetchTool, createWebSearchTool, decideToolPermission, decisionModelFromAiSdk, defineSkill, estimateTokens, findSecret, finishMcpOAuth, getCurrentRunId, getCurrentRunSandbox, hostMatches, htmlToText, isCodeExecutionTool, isReadOnlyTool, isReplayedToolOutput, loadSkillsFromDir, markCodeExecution, markReadOnly, matchToolRule, mcpSkillEntryRefusal, mcpSkillPreamble, mcpSkillUriRefusal, mediaUsageOf, mergeProviderOptions, nodeResolver, normalizeMcpElicitationSchema, normalizePipeline, normalizeSkillName, normalizeUsage, parseSearchResponse, parseSkillMarkdown, redactHeaders, renderMcpInstructions, renderPipelineNodeInput, resolveCompaction, resolveDynamicSubagents, resolveEgressPolicy, resolveLimits, resolvePromptCaching, resolveSandboxLimits, resolveThinking, sanitizeSearchResults, searchEgressPolicy, searchStatusMessage, searchToolResult, searchTools, sniffMediaType, testPipelineCondition, truncateToolModelOutput, validateMcpElicitationContent, validatePipeline, withRollingBreakpoint, withToolOutputLimit, wrapTranscript };
|
|
2588
|
+
export type { AgentEvent, AgentStage, BudgetKind, DecisionFallbackReason, DecisionPoint, EgressErrorCode, EnterpriseAssertionAlgorithm, EnterpriseAssertionAudience, EnterpriseAssertionType, EnterpriseOAuthHop, EnterpriseOAuthLog, EnterprisePrivateKey, EscalationReason, EventHandler, IAgent, IAgentConfig, IAgentRunOptions, IAgentRunResult, IAgentStageOverride, IAiSdkDecisionOptions, IClearedInfo, ICloseOptions, ICompactHistoryOptions, ICompactHistoryResult, ICompactOptions, ICompactResult, ICompactionConfig, IConversationTurn, IDecisionAnswer, IDecisionCallOptions, IDecisionConfig, IDecisionEvent, IDecisionModel, IDecisionOption, IDecisionOutcome, IDecisionQuestion, IDynamicSubagentsConfig, IEgressPolicy, IEnterpriseIdpOptions, IEnterpriseOAuthProviderOptions, IEscalationConfig, ILearning, ILearningConfig, ILimitBreach, IMcpHttpServerConfig, IMcpServerConfig, IMcpSkillOrigin, IMcpStdioServerConfig, IMedia, IMediaConfig, IMediaFile, IMediaModelSpec, IMediaUsage, INodeOAuthProviderOptions, IOAuthRequestOptions, IOAuthStore, IPersistence, IPlan, IPlanStep, IResolvedAddress, IResolvedDynamicSubagents, IResolvedThinking, IRunFile, IRunSnapshot, ISandboxConfig, ISandboxError, ISandboxLimits, ISandboxResult, ISanitizedSearch, ISaveSkillInput, ISearchAnswer, ISearchConfig, ISearchOptions, ISearchRequest, ISearchResult, ISearchToolResult, ISearchToolsOptions, ISearchUsage, ISkill, ISkillOrigin, ISkillStore, IStepEscalation, IStepResult, IStepStartInfo, ISubagentProfile, ISubagentToolOptions, ISubagentsConfig, IThinkingConfig, ITokenLimits, IToolApprovalConfig, IToolApprovalContext, IToolApprovalRequest, IToolCatalogEntry, IToolDecision, IToolDecisionInput, IToolResultClearing, ITranscription, IUsage, IWebSearchOptions, LogLevel, McpElicitationContent, McpElicitationContext, McpElicitationFieldSchema, McpElicitationHandler, McpElicitationOptions, McpElicitationReason, McpElicitationRequest, McpElicitationResult, McpElicitationSchema, McpOAuthRegistration, McpOAuthRegistrationKind, McpProtocolMode, McpServerInstructions, McpServerProtocol, McpSkillConsent, McpSkillConsentView, McpSkillsOptions, McpSkillsSetting, MediaImageModel, MediaKind, MediaModelKind, MediaSpeechModel, MediaTranscriptionModel, ModelTier, NodeResolverOptions, Pipeline, PipelineCondition, PipelineDefinition, PipelineEdge, PipelineEvent, PipelineIssue, PipelineModelConfig, PipelineNode, PipelineNodeContext, PipelineNodeInput, PipelineNodeOutput, PipelineNodeRunner, PipelineNodeSource, PipelineOptions, PipelineResult, PipelineRoute, PipelineRunOptions, PipelineStop, PipelineTraceEntry, PipelineUsage, PipelineValidation, PromptCachingSetting, ProviderType, ReplanCause, ReplanTrigger, RunControl, SafeFetch, SearchEngine, SearchFreshness, SearchProvider, StepComplexity, SubagentDefaultTools, SubagentInfo, SubagentIsolation, ThinkingLevel, ThinkingSetting, TierReason, TokenLimitKind, ToolApprovalDecision, ToolApprovalMode, ToolPermission, ToolSelectionStrategy, UsagePhase };
|