@plurnk/plurnk-contracts 1.24.0 → 1.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/SPEC.md +80 -84
- package/dist/conformance/agui-v1.json +11 -1
- package/dist/schema/ApplicationOperationEvent.json +27 -0
- package/dist/schema/FunctionalityCandidate.json +1 -10
- package/dist/schema/FunctionalityDefinitionState.json +6 -2
- package/dist/schema/FunctionalityDiscoverQuery.json +1 -1
- package/dist/schema/FunctionalityPreparationActivity.json +15 -0
- package/dist/schema/FunctionalityProvenance.json +14 -0
- package/dist/schema/McpOAuth.json +64 -0
- package/dist/schema/McpServerDefinition.json +97 -148
- package/dist/schema/SkillDefinition.json +13 -7
- package/dist/src/ApplicationPort.d.ts +4 -2
- package/dist/src/ApplicationPort.d.ts.map +1 -1
- package/dist/src/Functionality.d.ts +10 -2
- package/dist/src/Functionality.d.ts.map +1 -1
- package/dist/src/Validator.d.ts +4 -8
- package/dist/src/Validator.d.ts.map +1 -1
- package/dist/src/Validator.js +27 -28
- package/dist/src/Validator.js.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/types.generated.d.ts +238 -267
- package/dist/src/types.generated.d.ts.map +1 -1
- package/package.json +1 -1
- package/plurnk.md +12 -12
- package/dist/schema/McpConfigurationOverlay.json +0 -12
- package/dist/schema/McpServerOptions.json +0 -36
|
@@ -149,73 +149,17 @@ export interface MimetypeDisplayCapability {
|
|
|
149
149
|
mimetype: string;
|
|
150
150
|
display: CapabilityDisplay;
|
|
151
151
|
}
|
|
152
|
-
export
|
|
153
|
-
/**
|
|
154
|
-
* An operation keyword, or a runtime tag: an execution's operation is its runtime.
|
|
155
|
-
*/
|
|
156
|
-
operation: "FIND" | "READ" | "EDIT" | "COPY" | "MOVE" | "SEND" | "BARE" | "WORK" | "FORK" | "KILL" | Lowercase<string>;
|
|
157
|
-
scheme?: string;
|
|
158
|
-
runtime?: string;
|
|
159
|
-
tool?: string;
|
|
160
|
-
access: ("observe" | "mutate" | "execute" | "interact" | "control");
|
|
161
|
-
traits: string[];
|
|
162
|
-
}
|
|
163
|
-
export interface CapabilityPolicy {
|
|
164
|
-
only?: CapabilitySelector[];
|
|
165
|
-
deny?: CapabilitySelector[];
|
|
166
|
-
}
|
|
167
|
-
/**
|
|
168
|
-
* One exact, conjunctive selector over a routed PLURNK capability demand. Omitted fields are wildcards; at least one field is required.
|
|
169
|
-
*/
|
|
170
|
-
export interface CapabilitySelector {
|
|
171
|
-
/**
|
|
172
|
-
* An operation keyword, or a runtime tag: an execution's operation is its runtime.
|
|
173
|
-
*/
|
|
174
|
-
operation?: "FIND" | "READ" | "EDIT" | "COPY" | "MOVE" | "SEND" | "BARE" | "WORK" | "FORK" | "KILL" | Lowercase<string>;
|
|
175
|
-
scheme?: string;
|
|
176
|
-
runtime?: string;
|
|
177
|
-
tool?: string;
|
|
178
|
-
access?: ("observe" | "mutate" | "execute" | "interact" | "control");
|
|
179
|
-
/**
|
|
180
|
-
* @minItems 1
|
|
181
|
-
*/
|
|
182
|
-
traits?: [string, ...(string)[]];
|
|
183
|
-
}
|
|
184
|
-
export interface CapabilityProjection {
|
|
185
|
-
service: CapabilityPolicy;
|
|
186
|
-
workspace: CapabilityPolicy;
|
|
187
|
-
effective: CapabilityPolicy;
|
|
188
|
-
}
|
|
189
|
-
/**
|
|
190
|
-
* One purely subtractive capability-policy layer. Deny wins; when only is present, a demand must match at least one selector.
|
|
191
|
-
*/
|
|
192
|
-
export interface ClientInteractionProjection {
|
|
193
|
-
interactionId: number;
|
|
152
|
+
export type ApplicationOperationEvent = {
|
|
194
153
|
workerId: number;
|
|
195
154
|
loopId: number;
|
|
196
155
|
turnId: number;
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
arguments: {
|
|
205
|
-
[k: string]: unknown;
|
|
206
|
-
};
|
|
207
|
-
message?: string;
|
|
208
|
-
responseSchema: {
|
|
209
|
-
[k: string]: unknown;
|
|
210
|
-
};
|
|
211
|
-
}
|
|
212
|
-
export type ClientInteractionResolution = ({
|
|
213
|
-
status: "resolved";
|
|
214
|
-
payload?: unknown;
|
|
215
|
-
} | {
|
|
216
|
-
status: "cancelled";
|
|
217
|
-
});
|
|
218
|
-
export type ClientStatement = (PlurnkStatement | LookStatement);
|
|
156
|
+
sequence: number;
|
|
157
|
+
origin: ("model" | "client" | "_plurnk" | "plugin");
|
|
158
|
+
projectRoot: (string | null);
|
|
159
|
+
statement: PlurnkStatement;
|
|
160
|
+
phase: ("started" | "settled");
|
|
161
|
+
result?: OperationResult;
|
|
162
|
+
};
|
|
219
163
|
/**
|
|
220
164
|
* The parsed AST union for one protocol statement, discriminated by `op`. Every variant has fixed signal, target, metadata, lineMarker, aside, body, and source-position fields, and the text and log operations add a matcher lifted from the `pattern` option; operation-specific schemas constrain their types. A null field records an omitted tolerated slot and does not satisfy runtime requirements by itself.
|
|
221
165
|
*/
|
|
@@ -228,11 +172,28 @@ export type ParsedPath = (LocalPath | UrlPath);
|
|
|
228
172
|
* Parsed single-line body of a matcher-bearing statement, discriminated on `dialect`. The dialect is determined by the body's leading characters (`//` xpath, `/` regex, `$` jsonpath, `~` full-text, `&` graph, else glob). The regex variant carries pattern and flags split out of the `/pattern/flags` literal; every variant remains JSON-serializable.
|
|
229
173
|
*/
|
|
230
174
|
export type MatcherBody = (XPathBody | RegexBody | JsonPathBody | FtsBody | GraphBody | GlobBody);
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
export type
|
|
235
|
-
|
|
175
|
+
/**
|
|
176
|
+
* Universal PLURNK operation result. Producer-owned metadata is open, but failures always carry one RFC 9457 Problem Details object and never a parallel error field.
|
|
177
|
+
*/
|
|
178
|
+
export type OperationResult = ({
|
|
179
|
+
status: number;
|
|
180
|
+
problem?: ProblemDetails;
|
|
181
|
+
range?: RangeExtent;
|
|
182
|
+
error?: never;
|
|
183
|
+
[k: string]: unknown;
|
|
184
|
+
} & {
|
|
185
|
+
status?: number;
|
|
186
|
+
});
|
|
187
|
+
/**
|
|
188
|
+
* @minItems 2
|
|
189
|
+
* @maxItems 2
|
|
190
|
+
*/
|
|
191
|
+
export type RequestedRange = [number, number];
|
|
192
|
+
/**
|
|
193
|
+
* @minItems 2
|
|
194
|
+
* @maxItems 2
|
|
195
|
+
*/
|
|
196
|
+
export type ReturnedRange = [number, number];
|
|
236
197
|
export interface FindStatement {
|
|
237
198
|
op: "FIND";
|
|
238
199
|
aside: (string | null);
|
|
@@ -522,39 +483,6 @@ export interface NoteStatement {
|
|
|
522
483
|
body: (string | null);
|
|
523
484
|
position: Position;
|
|
524
485
|
}
|
|
525
|
-
export interface LookStatement {
|
|
526
|
-
op: "LOOK";
|
|
527
|
-
aside: AsideOrNull;
|
|
528
|
-
metadata: SchemeMetadataOrNull;
|
|
529
|
-
target: PathOrNull;
|
|
530
|
-
lineMarker: TextLineMarkerOrNull;
|
|
531
|
-
body: MatcherBodyOrNull;
|
|
532
|
-
position: Position;
|
|
533
|
-
}
|
|
534
|
-
export type Effort = ("off" | "adaptive" | "low" | "medium" | "high" | "xhigh" | "max");
|
|
535
|
-
export type EntryReadResult = ({
|
|
536
|
-
status: 200;
|
|
537
|
-
entry: ClientEntry;
|
|
538
|
-
} | {
|
|
539
|
-
status: number;
|
|
540
|
-
problem: ProblemDetails;
|
|
541
|
-
entry: null;
|
|
542
|
-
});
|
|
543
|
-
export interface ClientEntry {
|
|
544
|
-
entryId: number;
|
|
545
|
-
target: string;
|
|
546
|
-
channels: {
|
|
547
|
-
[k: string]: ClientEntryChannel;
|
|
548
|
-
};
|
|
549
|
-
}
|
|
550
|
-
export interface ClientEntryChannel {
|
|
551
|
-
content: string;
|
|
552
|
-
contentOffset: number;
|
|
553
|
-
contentLength: number;
|
|
554
|
-
mimetype: string;
|
|
555
|
-
weight: number;
|
|
556
|
-
state: ("static" | "active" | "closed" | "errored");
|
|
557
|
-
}
|
|
558
486
|
/**
|
|
559
487
|
* PLURNK operation failure using RFC 9457 Problem Details. Extension members are permitted so an owning boundary can add structured causal and recovery facts without inventing a second error envelope.
|
|
560
488
|
*/
|
|
@@ -593,6 +521,126 @@ export interface ProblemDetails {
|
|
|
593
521
|
retryable?: boolean;
|
|
594
522
|
[k: string]: unknown;
|
|
595
523
|
}
|
|
524
|
+
/**
|
|
525
|
+
* A compact projection of one line or ordered-result selection. Requested and returned positions are inclusive; total is the complete available cardinality.
|
|
526
|
+
*/
|
|
527
|
+
export interface RangeExtent {
|
|
528
|
+
unit: ("line" | "result" | "resource" | "matchLocation" | "byte");
|
|
529
|
+
total: number;
|
|
530
|
+
requested: RequestedRange;
|
|
531
|
+
returned?: ReturnedRange;
|
|
532
|
+
}
|
|
533
|
+
export interface CapabilityDescriptor {
|
|
534
|
+
/**
|
|
535
|
+
* An operation keyword, or a runtime tag: an execution's operation is its runtime.
|
|
536
|
+
*/
|
|
537
|
+
operation: "FIND" | "READ" | "EDIT" | "COPY" | "MOVE" | "SEND" | "BARE" | "WORK" | "FORK" | "KILL" | Lowercase<string>;
|
|
538
|
+
scheme?: string;
|
|
539
|
+
runtime?: string;
|
|
540
|
+
tool?: string;
|
|
541
|
+
access: ("observe" | "mutate" | "execute" | "interact" | "control");
|
|
542
|
+
traits: string[];
|
|
543
|
+
}
|
|
544
|
+
export interface CapabilityPolicy {
|
|
545
|
+
only?: CapabilitySelector[];
|
|
546
|
+
deny?: CapabilitySelector[];
|
|
547
|
+
}
|
|
548
|
+
/**
|
|
549
|
+
* One exact, conjunctive selector over a routed PLURNK capability demand. Omitted fields are wildcards; at least one field is required.
|
|
550
|
+
*/
|
|
551
|
+
export interface CapabilitySelector {
|
|
552
|
+
/**
|
|
553
|
+
* An operation keyword, or a runtime tag: an execution's operation is its runtime.
|
|
554
|
+
*/
|
|
555
|
+
operation?: "FIND" | "READ" | "EDIT" | "COPY" | "MOVE" | "SEND" | "BARE" | "WORK" | "FORK" | "KILL" | Lowercase<string>;
|
|
556
|
+
scheme?: string;
|
|
557
|
+
runtime?: string;
|
|
558
|
+
tool?: string;
|
|
559
|
+
access?: ("observe" | "mutate" | "execute" | "interact" | "control");
|
|
560
|
+
/**
|
|
561
|
+
* @minItems 1
|
|
562
|
+
*/
|
|
563
|
+
traits?: [string, ...(string)[]];
|
|
564
|
+
}
|
|
565
|
+
export interface CapabilityProjection {
|
|
566
|
+
service: CapabilityPolicy;
|
|
567
|
+
workspace: CapabilityPolicy;
|
|
568
|
+
effective: CapabilityPolicy;
|
|
569
|
+
}
|
|
570
|
+
/**
|
|
571
|
+
* One purely subtractive capability-policy layer. Deny wins; when only is present, a demand must match at least one selector.
|
|
572
|
+
*/
|
|
573
|
+
export interface ClientInteractionProjection {
|
|
574
|
+
interactionId: number;
|
|
575
|
+
workerId: number;
|
|
576
|
+
loopId: number;
|
|
577
|
+
turnId: number;
|
|
578
|
+
request: ClientInteractionRequest;
|
|
579
|
+
}
|
|
580
|
+
/**
|
|
581
|
+
* A runtime-neutral request for one client-owned interaction. The owner supplies the standard tool presentation and response contract; protocol-private continuation state is excluded.
|
|
582
|
+
*/
|
|
583
|
+
export interface ClientInteractionRequest {
|
|
584
|
+
toolName: string;
|
|
585
|
+
arguments: {
|
|
586
|
+
[k: string]: unknown;
|
|
587
|
+
};
|
|
588
|
+
message?: string;
|
|
589
|
+
responseSchema: {
|
|
590
|
+
[k: string]: unknown;
|
|
591
|
+
};
|
|
592
|
+
}
|
|
593
|
+
export type ClientInteractionResolution = ({
|
|
594
|
+
status: "resolved";
|
|
595
|
+
payload?: unknown;
|
|
596
|
+
} | {
|
|
597
|
+
status: "cancelled";
|
|
598
|
+
});
|
|
599
|
+
export type ClientStatement = (PlurnkStatement | LookStatement);
|
|
600
|
+
/**
|
|
601
|
+
* The parsed AST union for one protocol statement, discriminated by `op`. Every variant has fixed signal, target, metadata, lineMarker, aside, body, and source-position fields, and the text and log operations add a matcher lifted from the `pattern` option; operation-specific schemas constrain their types. A null field records an omitted tolerated slot and does not satisfy runtime requirements by itself.
|
|
602
|
+
*/
|
|
603
|
+
export type AsideOrNull = (string | null);
|
|
604
|
+
export type SchemeMetadataOrNull = (string[] | null);
|
|
605
|
+
export type PathOrNull = (ParsedPath | null);
|
|
606
|
+
export type TextLineMarkerOrNull = (TextLineMarker | null);
|
|
607
|
+
export type MatcherBodyOrNull = (MatcherBody | null);
|
|
608
|
+
export interface LookStatement {
|
|
609
|
+
op: "LOOK";
|
|
610
|
+
aside: AsideOrNull;
|
|
611
|
+
metadata: SchemeMetadataOrNull;
|
|
612
|
+
target: PathOrNull;
|
|
613
|
+
lineMarker: TextLineMarkerOrNull;
|
|
614
|
+
body: MatcherBodyOrNull;
|
|
615
|
+
position: Position;
|
|
616
|
+
}
|
|
617
|
+
export type Effort = ("off" | "adaptive" | "low" | "medium" | "high" | "xhigh" | "max");
|
|
618
|
+
export type EntryReadResult = ({
|
|
619
|
+
status: 200;
|
|
620
|
+
entry: ClientEntry;
|
|
621
|
+
} | {
|
|
622
|
+
status: number;
|
|
623
|
+
problem: ProblemDetails;
|
|
624
|
+
entry: null;
|
|
625
|
+
});
|
|
626
|
+
export interface ClientEntry {
|
|
627
|
+
entryId: number;
|
|
628
|
+
target: string;
|
|
629
|
+
channels: {
|
|
630
|
+
[k: string]: ClientEntryChannel;
|
|
631
|
+
};
|
|
632
|
+
}
|
|
633
|
+
export interface ClientEntryChannel {
|
|
634
|
+
content: string;
|
|
635
|
+
contentOffset: number;
|
|
636
|
+
contentLength: number;
|
|
637
|
+
mimetype: string;
|
|
638
|
+
weight: number;
|
|
639
|
+
state: ("static" | "active" | "closed" | "errored");
|
|
640
|
+
}
|
|
641
|
+
/**
|
|
642
|
+
* PLURNK operation failure using RFC 9457 Problem Details. Extension members are permitted so an owning boundary can add structured causal and recovery facts without inventing a second error envelope.
|
|
643
|
+
*/
|
|
596
644
|
export interface FunctionalityCandidate {
|
|
597
645
|
/**
|
|
598
646
|
* The alias the candidate would take if added; a suggestion, never authority.
|
|
@@ -603,11 +651,15 @@ export interface FunctionalityCandidate {
|
|
|
603
651
|
* The exact family definition, conforming to the family's definition schema.
|
|
604
652
|
*/
|
|
605
653
|
definition: {};
|
|
606
|
-
provenance:
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
654
|
+
provenance: FunctionalityProvenance;
|
|
655
|
+
}
|
|
656
|
+
/**
|
|
657
|
+
* The input supplying a definition or discovery candidate, separate from ownership, preparation and authority.
|
|
658
|
+
*/
|
|
659
|
+
export interface FunctionalityProvenance {
|
|
660
|
+
kind: string;
|
|
661
|
+
source: string;
|
|
662
|
+
reference?: string;
|
|
611
663
|
}
|
|
612
664
|
export type FunctionalityDefinitionState = {
|
|
613
665
|
alias: string;
|
|
@@ -616,10 +668,11 @@ export type FunctionalityDefinitionState = {
|
|
|
616
668
|
*/
|
|
617
669
|
origin: ("service" | "workspace" | "worker");
|
|
618
670
|
/**
|
|
619
|
-
* disabled: available, model-invisible. active: enabled and prepared. unavailable: enabled but preparation has an exact Problem. authorization-required: enabled and awaiting a protocol continuation.
|
|
671
|
+
* disabled: available, model-invisible. dormant: enabled without a resident publication. active: enabled and prepared. unavailable: enabled but preparation has an exact Problem. authorization-required: enabled and awaiting a protocol continuation.
|
|
620
672
|
*/
|
|
621
|
-
state: ("disabled" | "active" | "unavailable" | "authorization-required");
|
|
673
|
+
state: ("disabled" | "dormant" | "active" | "unavailable" | "authorization-required");
|
|
622
674
|
definition?: {};
|
|
675
|
+
provenance?: FunctionalityProvenance;
|
|
623
676
|
/**
|
|
624
677
|
* The Worker this entry was copied from when this Worker was created (WORK or FORK), preserved across generations until this Worker changes the entry. Absent for an entry this Worker set itself. Worker-scoped families only.
|
|
625
678
|
*/
|
|
@@ -634,13 +687,13 @@ export type FunctionalityDefinitionState = {
|
|
|
634
687
|
};
|
|
635
688
|
};
|
|
636
689
|
/**
|
|
637
|
-
*
|
|
690
|
+
* The winning configuration input, when supplied by a source reader. Independent of origin and readiness; absent for locally owned definitions or host-provided resources without a configuration input.
|
|
638
691
|
*/
|
|
639
692
|
export interface FunctionalityDiscoverQuery {
|
|
640
693
|
query?: string;
|
|
641
694
|
source?: string;
|
|
642
695
|
/**
|
|
643
|
-
* Caller-supplied configuration material the family interprets as candidates (a client's own
|
|
696
|
+
* Caller-supplied configuration material the family interprets as candidates (a client's own PLURNK_A2A_* environment, a local directory list). It contributes candidates with client-configuration provenance; it never becomes durable authority.
|
|
644
697
|
*/
|
|
645
698
|
configuration?: {};
|
|
646
699
|
}
|
|
@@ -656,7 +709,7 @@ export interface FunctionalityListResult {
|
|
|
656
709
|
definitions: FunctionalityDefinitionState[];
|
|
657
710
|
}
|
|
658
711
|
/**
|
|
659
|
-
*
|
|
712
|
+
* The winning configuration input, when supplied by a source reader. Independent of origin and readiness; absent for locally owned definitions or host-provided resources without a configuration input.
|
|
660
713
|
*/
|
|
661
714
|
export interface FunctionalityMutationResult {
|
|
662
715
|
status: (200 | 201 | 202);
|
|
@@ -666,8 +719,14 @@ export interface FunctionalityMutationResult {
|
|
|
666
719
|
removed?: true;
|
|
667
720
|
}
|
|
668
721
|
/**
|
|
669
|
-
*
|
|
722
|
+
* The winning configuration input, when supplied by a source reader. Independent of origin and readiness; absent for locally owned definitions or host-provided resources without a configuration input.
|
|
670
723
|
*/
|
|
724
|
+
export interface FunctionalityPreparationActivity {
|
|
725
|
+
family: string;
|
|
726
|
+
alias: (string | null);
|
|
727
|
+
phase: ("preparing" | "publishing");
|
|
728
|
+
since: string;
|
|
729
|
+
}
|
|
671
730
|
export interface LoopPolicy {
|
|
672
731
|
/**
|
|
673
732
|
* review holds a proposal for a client's answer; accept applies it and reject refuses it inside the loop.
|
|
@@ -688,98 +747,7 @@ export interface LoopPolicyRequest {
|
|
|
688
747
|
*/
|
|
689
748
|
attended?: boolean;
|
|
690
749
|
}
|
|
691
|
-
export
|
|
692
|
-
[k: string]: string;
|
|
693
|
-
}
|
|
694
|
-
export type McpServerDefinition = {
|
|
695
|
-
/**
|
|
696
|
-
* Server alias: the runtime tag whose fence invokes it, and its resource scheme.
|
|
697
|
-
*/
|
|
698
|
-
name: string;
|
|
699
|
-
/**
|
|
700
|
-
* stdio launches a local command; http connects to a remote MCP endpoint.
|
|
701
|
-
*/
|
|
702
|
-
transport: ("stdio" | "http");
|
|
703
|
-
/**
|
|
704
|
-
* Executable to launch for stdio; arguments belong in args.
|
|
705
|
-
*/
|
|
706
|
-
command?: string;
|
|
707
|
-
/**
|
|
708
|
-
* Arguments passed to the stdio executable in order.
|
|
709
|
-
*/
|
|
710
|
-
args?: string[];
|
|
711
|
-
/**
|
|
712
|
-
* Working directory for the stdio process.
|
|
713
|
-
*/
|
|
714
|
-
cwd?: string;
|
|
715
|
-
/**
|
|
716
|
-
* Environment overrides for the stdio process; values may reference ${ENV_NAME}.
|
|
717
|
-
*/
|
|
718
|
-
env?: {
|
|
719
|
-
[k: string]: string;
|
|
720
|
-
};
|
|
721
|
-
/**
|
|
722
|
-
* HTTP MCP endpoint URL.
|
|
723
|
-
*/
|
|
724
|
-
url?: string;
|
|
725
|
-
/**
|
|
726
|
-
* HTTP request headers; values may reference ${ENV_NAME}. Authorization cannot also be configured here when authorization is set.
|
|
727
|
-
*/
|
|
728
|
-
headers?: {
|
|
729
|
-
[k: string]: string;
|
|
730
|
-
};
|
|
731
|
-
/**
|
|
732
|
-
* HTTP authentication. Secret fields reference the operator environment rather than embedding credentials.
|
|
733
|
-
*/
|
|
734
|
-
authorization?: ({
|
|
735
|
-
type: "bearer";
|
|
736
|
-
token: EnvironmentReference;
|
|
737
|
-
} | {
|
|
738
|
-
type: "oauth";
|
|
739
|
-
redirectUrl: string;
|
|
740
|
-
clientMetadataUrl: string;
|
|
741
|
-
scope?: string;
|
|
742
|
-
} | {
|
|
743
|
-
type: "oauth";
|
|
744
|
-
redirectUrl: string;
|
|
745
|
-
clientId: string;
|
|
746
|
-
clientSecret: EnvironmentReference;
|
|
747
|
-
scope?: string;
|
|
748
|
-
} | {
|
|
749
|
-
type: "oauth";
|
|
750
|
-
redirectUrl: string;
|
|
751
|
-
scope?: string;
|
|
752
|
-
} | {
|
|
753
|
-
type: "client-credentials";
|
|
754
|
-
clientId: string;
|
|
755
|
-
clientSecret: EnvironmentReference;
|
|
756
|
-
scope?: string;
|
|
757
|
-
issuer?: string;
|
|
758
|
-
});
|
|
759
|
-
/**
|
|
760
|
-
* Exact enabled tool names; omitted enables all tools, an empty array enables none.
|
|
761
|
-
*/
|
|
762
|
-
tools?: string[];
|
|
763
|
-
/**
|
|
764
|
-
* Exact tool names the operator designates as read effects rather than host effects requiring proposal review.
|
|
765
|
-
*/
|
|
766
|
-
read?: string[];
|
|
767
|
-
};
|
|
768
|
-
/**
|
|
769
|
-
* An operator environment variable reference such as ${GITEA_TOKEN}, never a literal secret.
|
|
770
|
-
*/
|
|
771
|
-
export type EnvironmentReference = string;
|
|
772
|
-
export type McpServerArguments = string[];
|
|
773
|
-
/**
|
|
774
|
-
* HTTP authentication. Secret fields reference the operator environment rather than embedding credentials.
|
|
775
|
-
*/
|
|
776
|
-
export type McpServerAuthorization = ({
|
|
777
|
-
type: "bearer";
|
|
778
|
-
/**
|
|
779
|
-
* An operator environment variable reference such as ${GITEA_TOKEN}, never a literal secret.
|
|
780
|
-
*/
|
|
781
|
-
token: string;
|
|
782
|
-
} | {
|
|
750
|
+
export type McpOAuth = ({
|
|
783
751
|
type: "oauth";
|
|
784
752
|
redirectUrl: string;
|
|
785
753
|
clientMetadataUrl: string;
|
|
@@ -788,10 +756,7 @@ export type McpServerAuthorization = ({
|
|
|
788
756
|
type: "oauth";
|
|
789
757
|
redirectUrl: string;
|
|
790
758
|
clientId: string;
|
|
791
|
-
|
|
792
|
-
* An operator environment variable reference such as ${GITEA_TOKEN}, never a literal secret.
|
|
793
|
-
*/
|
|
794
|
-
clientSecret: string;
|
|
759
|
+
clientSecret: EnvironmentReference;
|
|
795
760
|
scope?: string;
|
|
796
761
|
} | {
|
|
797
762
|
type: "oauth";
|
|
@@ -800,44 +765,74 @@ export type McpServerAuthorization = ({
|
|
|
800
765
|
} | {
|
|
801
766
|
type: "client-credentials";
|
|
802
767
|
clientId: string;
|
|
803
|
-
|
|
804
|
-
* An operator environment variable reference such as ${GITEA_TOKEN}, never a literal secret.
|
|
805
|
-
*/
|
|
806
|
-
clientSecret: string;
|
|
768
|
+
clientSecret: EnvironmentReference;
|
|
807
769
|
scope?: string;
|
|
808
770
|
issuer?: string;
|
|
809
771
|
});
|
|
810
772
|
/**
|
|
811
|
-
*
|
|
773
|
+
* An operator environment variable reference such as ${GITEA_TOKEN}, never a literal secret.
|
|
774
|
+
*/
|
|
775
|
+
export type EnvironmentReference = string;
|
|
776
|
+
export type McpServerDefinition = (McpStdioServerDefinition | McpStreamableHttpServerDefinition);
|
|
777
|
+
/**
|
|
778
|
+
* The server's alias: the runtime tag whose fence invokes it and its resource scheme.
|
|
812
779
|
*/
|
|
813
|
-
export type
|
|
780
|
+
export type McpServerName = string;
|
|
814
781
|
/**
|
|
815
|
-
*
|
|
782
|
+
* This endpoint's bearer or OAuth configuration. Secrets remain symbolic environment references.
|
|
816
783
|
*/
|
|
817
|
-
export type
|
|
818
|
-
|
|
819
|
-
args?: McpServerArguments;
|
|
784
|
+
export type McpAuthorization = ({
|
|
785
|
+
type: "bearer";
|
|
820
786
|
/**
|
|
821
|
-
*
|
|
787
|
+
* An operator environment variable reference such as ${GITEA_TOKEN}, never a literal secret.
|
|
822
788
|
*/
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
headers?: McpServerHeaders;
|
|
826
|
-
authorization?: McpServerAuthorization;
|
|
827
|
-
tools?: McpServerToolNames;
|
|
828
|
-
read?: McpServerReadTools;
|
|
829
|
-
}
|
|
789
|
+
token: string;
|
|
790
|
+
} | McpOAuth);
|
|
830
791
|
/**
|
|
831
|
-
*
|
|
792
|
+
* OAuth configuration within one Streamable HTTP MCP server definition. Every secret is a ${NAME} reference to the operator environment.
|
|
832
793
|
*/
|
|
833
|
-
export interface
|
|
834
|
-
|
|
794
|
+
export interface McpStdioServerDefinition {
|
|
795
|
+
name: McpServerName;
|
|
796
|
+
/**
|
|
797
|
+
* A local server: a subprocess speaking MCP over its standard input and output.
|
|
798
|
+
*/
|
|
799
|
+
type: "stdio";
|
|
800
|
+
/**
|
|
801
|
+
* An executable name or path, without a shell. Relative paths resolve against the working directory.
|
|
802
|
+
*/
|
|
803
|
+
command: string;
|
|
804
|
+
/**
|
|
805
|
+
* Exact arguments; ${NAME} environment references expand once.
|
|
806
|
+
*/
|
|
807
|
+
args?: string[];
|
|
808
|
+
/**
|
|
809
|
+
* Process environment additions; ${NAME} references resolve against the workspace-composed operator environment.
|
|
810
|
+
*/
|
|
811
|
+
env?: {
|
|
812
|
+
[k: string]: string;
|
|
813
|
+
};
|
|
814
|
+
/**
|
|
815
|
+
* An absolute working directory, optionally using ${NAME} references. When absent the host supplies a workspace-owned state directory outside the project.
|
|
816
|
+
*/
|
|
817
|
+
cwd?: string;
|
|
835
818
|
}
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
819
|
+
export interface McpStreamableHttpServerDefinition {
|
|
820
|
+
name: McpServerName;
|
|
821
|
+
/**
|
|
822
|
+
* A remote server: an MCP endpoint over Streamable HTTP.
|
|
823
|
+
*/
|
|
824
|
+
type: "streamable-http";
|
|
825
|
+
/**
|
|
826
|
+
* The explicitly configured HTTP(S) MCP endpoint. OAuth has its own transport-security requirements.
|
|
827
|
+
*/
|
|
828
|
+
url: string;
|
|
829
|
+
/**
|
|
830
|
+
* Headers sent only to this endpoint; ${NAME} references expand at connection time. Protocol-owned headers are supplied by the client. Authorization cannot also be declared as a header when authorization is configured.
|
|
831
|
+
*/
|
|
832
|
+
headers?: {
|
|
833
|
+
[k: string]: string;
|
|
834
|
+
};
|
|
835
|
+
authorization?: McpAuthorization;
|
|
841
836
|
}
|
|
842
837
|
export interface ModelCatalogPage {
|
|
843
838
|
/**
|
|
@@ -953,34 +948,6 @@ export interface LogCoordinate {
|
|
|
953
948
|
*/
|
|
954
949
|
op?: string;
|
|
955
950
|
}
|
|
956
|
-
export type OperationResult = ({
|
|
957
|
-
status: number;
|
|
958
|
-
problem?: ProblemDetails;
|
|
959
|
-
range?: RangeExtent;
|
|
960
|
-
error?: never;
|
|
961
|
-
[k: string]: unknown;
|
|
962
|
-
} & {
|
|
963
|
-
status?: number;
|
|
964
|
-
});
|
|
965
|
-
/**
|
|
966
|
-
* @minItems 2
|
|
967
|
-
* @maxItems 2
|
|
968
|
-
*/
|
|
969
|
-
export type RequestedRange = [number, number];
|
|
970
|
-
/**
|
|
971
|
-
* @minItems 2
|
|
972
|
-
* @maxItems 2
|
|
973
|
-
*/
|
|
974
|
-
export type ReturnedRange = [number, number];
|
|
975
|
-
/**
|
|
976
|
-
* PLURNK operation failure using RFC 9457 Problem Details. Extension members are permitted so an owning boundary can add structured causal and recovery facts without inventing a second error envelope.
|
|
977
|
-
*/
|
|
978
|
-
export interface RangeExtent {
|
|
979
|
-
unit: ("line" | "result" | "resource" | "matchLocation" | "byte");
|
|
980
|
-
total: number;
|
|
981
|
-
requested: RequestedRange;
|
|
982
|
-
returned?: ReturnedRange;
|
|
983
|
-
}
|
|
984
951
|
export type LineMarkerOrNull = (LineMarker | null);
|
|
985
952
|
/**
|
|
986
953
|
* Parsed single-line body of a matcher-bearing statement, discriminated on `dialect`. The dialect is determined by the body's leading characters (`//` xpath, `/` regex, `$` jsonpath, `~` full-text, `&` graph, else glob). The regex variant carries pattern and flags split out of the `/pattern/flags` literal; every variant remains JSON-serializable.
|
|
@@ -1108,13 +1075,17 @@ export interface SkillDefinition {
|
|
|
1108
1075
|
*/
|
|
1109
1076
|
name: string;
|
|
1110
1077
|
/**
|
|
1111
|
-
*
|
|
1078
|
+
* A local skill folder or its SKILL.md (read in place), a Git remote, or an archive (materialized into workspace storage). Required for configured and added skills; omitted only for a host-provided tree.
|
|
1112
1079
|
*/
|
|
1113
|
-
|
|
1080
|
+
source?: string;
|
|
1114
1081
|
/**
|
|
1115
|
-
* The
|
|
1082
|
+
* The branch or tag of a git source; the remote's default branch when absent.
|
|
1116
1083
|
*/
|
|
1117
|
-
|
|
1084
|
+
ref?: string;
|
|
1085
|
+
/**
|
|
1086
|
+
* The commit a git source's ref named when the skill was added. The service records it; a client never supplies it.
|
|
1087
|
+
*/
|
|
1088
|
+
commit?: string;
|
|
1118
1089
|
}
|
|
1119
1090
|
export interface TextRegion {
|
|
1120
1091
|
startLine: number;
|