@zyntax/extension-sdk 1.0.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/LICENSE +21 -0
- package/README.md +175 -0
- package/dist/agent/capabilities.d.ts +29 -0
- package/dist/agent/capabilities.d.ts.map +1 -0
- package/dist/agent/capabilities.js +18 -0
- package/dist/agent/capabilities.js.map +1 -0
- package/dist/agent/contributions.d.ts +32 -0
- package/dist/agent/contributions.d.ts.map +1 -0
- package/dist/agent/contributions.js +2 -0
- package/dist/agent/contributions.js.map +1 -0
- package/dist/agent/protocol.d.ts +211 -0
- package/dist/agent/protocol.d.ts.map +1 -0
- package/dist/agent/protocol.js +2 -0
- package/dist/agent/protocol.js.map +1 -0
- package/dist/capabilities.d.ts +17 -0
- package/dist/capabilities.js +17 -0
- package/dist/contract.d.ts +624 -0
- package/dist/contract.d.ts.map +1 -0
- package/dist/contract.js +27 -0
- package/dist/contract.js.map +1 -0
- package/dist/contracts/json.d.ts +6 -0
- package/dist/contracts/json.d.ts.map +1 -0
- package/dist/contracts/json.js +2 -0
- package/dist/contracts/json.js.map +1 -0
- package/dist/contracts/manifest.d.ts +557 -0
- package/dist/contracts/manifest.d.ts.map +1 -0
- package/dist/contracts/manifest.js +4 -0
- package/dist/contracts/manifest.js.map +1 -0
- package/dist/contracts/persistentServices.d.ts +53 -0
- package/dist/contracts/persistentServices.d.ts.map +1 -0
- package/dist/contracts/persistentServices.js +2 -0
- package/dist/contracts/persistentServices.js.map +1 -0
- package/dist/contracts/providerMethods.d.ts +3 -0
- package/dist/contracts/providerMethods.d.ts.map +1 -0
- package/dist/contracts/providerMethods.js +2 -0
- package/dist/contracts/providerMethods.js.map +1 -0
- package/dist/contracts/terminalPackages.d.ts +42 -0
- package/dist/contracts/terminalPackages.d.ts.map +1 -0
- package/dist/contracts/terminalPackages.js +2 -0
- package/dist/contracts/terminalPackages.js.map +1 -0
- package/dist/contracts/workbench.d.ts +219 -0
- package/dist/contracts/workbench.d.ts.map +1 -0
- package/dist/contracts/workbench.js +2 -0
- package/dist/contracts/workbench.js.map +1 -0
- package/dist/extensionFirst.d.ts +463 -0
- package/dist/extensionFirst.d.ts.map +1 -0
- package/dist/extensionFirst.js +2 -0
- package/dist/extensionFirst.js.map +1 -0
- package/dist/index.d.ts +51 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +132 -0
- package/dist/index.js.map +1 -0
- package/dist/managedToolProtocol.d.ts +25 -0
- package/dist/managedToolProtocol.d.ts.map +1 -0
- package/dist/managedToolProtocol.js +4 -0
- package/dist/managedToolProtocol.js.map +1 -0
- package/dist/manifestConstants.d.ts +150 -0
- package/dist/manifestConstants.js +174 -0
- package/dist/providerMethods.d.ts +50 -0
- package/dist/providerMethods.js +45 -0
- package/package.json +62 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Zyntax
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
# Zyntax Extension SDK
|
|
2
|
+
|
|
3
|
+
`@zyntax/extension-sdk` is the canonical public contract for executable Zyntax
|
|
4
|
+
extension providers. It contains plain-data manifest and RPC types, canonical
|
|
5
|
+
capability names, and small authoring helpers. It has no editor, WebView,
|
|
6
|
+
filesystem, network, native-command, or app-private dependencies.
|
|
7
|
+
|
|
8
|
+
Provider code is bundled by the Zyntax extension tooling into a self-contained
|
|
9
|
+
`providers/*.js` module. Import only this package for host DTOs and provider
|
|
10
|
+
helpers; do not import application source or tooling internals.
|
|
11
|
+
|
|
12
|
+
Tooling consumes the `provider-methods`, `manifest-constants`, and `capabilities`
|
|
13
|
+
subpaths so manifest validation and provider bundle validation share one public
|
|
14
|
+
vocabulary.
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
import {
|
|
18
|
+
EXTENSION_API_VERSION,
|
|
19
|
+
defineCompletionProvider,
|
|
20
|
+
type ExtensionCompletionProvider,
|
|
21
|
+
} from "@zyntax/extension-sdk";
|
|
22
|
+
|
|
23
|
+
export const extensionApiVersion = EXTENSION_API_VERSION;
|
|
24
|
+
|
|
25
|
+
export const createCompletionProvider = defineCompletionProvider(
|
|
26
|
+
(): ExtensionCompletionProvider => ({
|
|
27
|
+
provideCompletions(request, cancellation) {
|
|
28
|
+
cancellation.throwIfCancellationRequested();
|
|
29
|
+
return null;
|
|
30
|
+
},
|
|
31
|
+
dispose() {},
|
|
32
|
+
}),
|
|
33
|
+
);
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Manifest validation remains host/tooling-owned. The SDK does not grant
|
|
37
|
+
permissions or platform access.
|
|
38
|
+
|
|
39
|
+
Language-server mappings declare only verified routes. Position routes are
|
|
40
|
+
`completion`, `hover`, `signatureHelp`, `definition`, `implementation`,
|
|
41
|
+
`typeDefinition`, `references`, `rename`, `codeActions`, `typeHierarchy`, and
|
|
42
|
+
`documentHighlights`. Document/workspace routes are `diagnostics`,
|
|
43
|
+
`semanticTokens`, `workspaceSymbols`, `documentSymbols`, `foldingRanges`, and
|
|
44
|
+
`documentFormatting`. The host negotiates the matching standard LSP methods and
|
|
45
|
+
routes parser-owned source or virtual coordinates; it never infers a claim from
|
|
46
|
+
the server, language, filename, or installed package.
|
|
47
|
+
|
|
48
|
+
Declarative TextMate contributions reference exact UTF-8 JSON
|
|
49
|
+
(`syntaxes/*.tmLanguage.json`) or XML plist (`syntaxes/*.tmLanguage`) assets. The
|
|
50
|
+
host validates and loads the declared format directly; extensions do not convert
|
|
51
|
+
or execute grammar assets. A primary grammar declares its sorted canonical
|
|
52
|
+
`languages` bindings; one immutable asset may serve multiple identities when the
|
|
53
|
+
upstream grammar is genuinely shared. Injection-only grammars omit `languages`.
|
|
54
|
+
|
|
55
|
+
The published package contains compiled ESM and declaration files in `dist/`.
|
|
56
|
+
Extension builds never execute TypeScript source directly from `node_modules`.
|
|
57
|
+
|
|
58
|
+
The SDK also defines bounded plain-data contracts for inline completions,
|
|
59
|
+
assisted edits, AI code actions, decorations, document colors, hover, tasks, terminal
|
|
60
|
+
profiles, SCM state, and project templates. A task provider returns one reviewed
|
|
61
|
+
execution plan. A `terminal` plan contains only a command name, literal argument
|
|
62
|
+
array, and project-relative working-directory segments and requires the explicit
|
|
63
|
+
`terminal` permission. A `managedTool` plan contains only an exact manifest-declared
|
|
64
|
+
tool and entrypoint, bounded literal arguments, and project-relative working-directory
|
|
65
|
+
segments and requires `tools.execute`. The host resolves either plan only after
|
|
66
|
+
approval, owns its lifetime and cancellation, and never exposes a native path,
|
|
67
|
+
environment, shell fragment, or process handle to the provider. Terminal-profile
|
|
68
|
+
and project-template providers likewise return descriptors or host-reviewed plans
|
|
69
|
+
while the host owns process launch, filesystem writes, approvals, and transactions.
|
|
70
|
+
Assisted-edit providers expose both bounded unary proposals and one ordered push
|
|
71
|
+
stream. A streaming invocation emits progress or proposal events through the
|
|
72
|
+
host-provided sink, observes the cancellation token, and completes once. The native
|
|
73
|
+
transport owns ordering, byte/count limits, cancellation, and terminal delivery;
|
|
74
|
+
providers never poll or open a second request.
|
|
75
|
+
|
|
76
|
+
Hover providers receive the exact parser-owned source region at the requested
|
|
77
|
+
position and return only bounded plain-text or Markdown content with a
|
|
78
|
+
snapshot-bound source range. The host sanitizes and renders that content in the
|
|
79
|
+
same tooltip surface as LSP hover, suppresses the surface while completion is
|
|
80
|
+
pending or active, and owns pointer and touch activation. Providers cannot
|
|
81
|
+
return HTML, DOM, editor objects, or infer embedded languages from filenames or
|
|
82
|
+
source scans.
|
|
83
|
+
|
|
84
|
+
Managed-tool adapters use the exported `EXTENSION_MANAGED_TOOL_INVOCATION_METHOD`
|
|
85
|
+
and JSON-RPC request/response types over the host's Content-Length-framed stdio
|
|
86
|
+
transport. Extension code selects only a manifest-declared tool and entrypoint;
|
|
87
|
+
it never supplies an executable path, environment, or terminal command.
|
|
88
|
+
|
|
89
|
+
Long-running managed tools use the declarative `persistentServices` contribution and the
|
|
90
|
+
`services.manage` permission. A service selects only a signed tool and entrypoint and declares
|
|
91
|
+
bounded stop, health-probe, and log policy; it cannot declare argv, an environment, a path, or
|
|
92
|
+
shell text. Providers operate only their own symbolic service ids. The host owns the canonical
|
|
93
|
+
workspace/trust decision, process group, health, bounded UTF-8 logs, and exact activation cleanup.
|
|
94
|
+
|
|
95
|
+
Terminal development dependencies use `contributes.developmentStacks` and the independent
|
|
96
|
+
`terminal.packages` permission. A stack contains one to 32 required package symbols from the fixed
|
|
97
|
+
host-known `zyntax` or `termux-main` repository identity. It cannot contain repository URLs, keys,
|
|
98
|
+
versions, package-manager options, commands, paths, environment values, or scripts. The
|
|
99
|
+
`terminal.packages` host API accepts only a declared stack id and `install`, `repair`, or `update`;
|
|
100
|
+
the host resolves signed candidates, presents the complete Package Manager review, owns the one
|
|
101
|
+
durable mutation queue, and returns only a bounded symbolic transaction snapshot. This permission
|
|
102
|
+
does not grant `terminal`, `network`, or `tools.execute`.
|
|
103
|
+
|
|
104
|
+
```json
|
|
105
|
+
{
|
|
106
|
+
"permissions": ["extension.execute", "terminal.packages"],
|
|
107
|
+
"contributes": {
|
|
108
|
+
"developmentStacks": [{
|
|
109
|
+
"id": "web-runtime",
|
|
110
|
+
"label": "Web runtime",
|
|
111
|
+
"packages": [{ "repository": "termux-main", "package": "nodejs-lts" }]
|
|
112
|
+
}]
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Managed execution arguments may contain a signed resource reference instead of
|
|
118
|
+
a literal string. The native host resolves it immediately before launch and the
|
|
119
|
+
path never enters extension-provider code. Node entrypoints may additionally
|
|
120
|
+
declare a sorted `nodeModules` array which binds a valid npm package name to a
|
|
121
|
+
signed package-directory resource. The host projects the entrypoint and those
|
|
122
|
+
packages into one immutable module tree and launches it with normal Node module
|
|
123
|
+
resolution. Manifests never declare `NODE_PATH`, installation directories, or
|
|
124
|
+
package-specific host behavior; each resource package must carry a matching
|
|
125
|
+
`package.json` name.
|
|
126
|
+
|
|
127
|
+
Managed document formatters declare their exact stdio protocol. Use
|
|
128
|
+
`framed-jsonrpc` for an adapter that implements the canonical formatting RPC, or
|
|
129
|
+
`raw-stdio` for a direct CLI which accepts the exact document bytes on stdin and
|
|
130
|
+
returns one bounded UTF-8 document on stdout. Raw formatter arguments are fixed
|
|
131
|
+
manifest strings or signed resource references; the host does not substitute a
|
|
132
|
+
language, URI, option, or shell fragment at runtime. The explicit current-document
|
|
133
|
+
path reference is available only to document formatters. Contribute separate formatter descriptors when a CLI
|
|
134
|
+
requires a different constant argument for each canonical language.
|
|
135
|
+
|
|
136
|
+
Project-template providers return either an atomic UTF-8 file plan or a
|
|
137
|
+
symbolic managed-tool plan. Managed generators run only after host review, in a
|
|
138
|
+
new app-owned staging root, and must produce the declared regular-file markers
|
|
139
|
+
before the host atomically publishes the project. The provider and managed tool
|
|
140
|
+
receive JSON and canonical URIs only; native paths never cross the provider
|
|
141
|
+
boundary.
|
|
142
|
+
|
|
143
|
+
Debugger configuration providers receive the active project and document as
|
|
144
|
+
canonical URIs. Use `debugDocumentPath(documentUri)` for configuration fields
|
|
145
|
+
such as `program`; the host validates that URI against the active project and
|
|
146
|
+
resolves the native path only when it sends the DAP launch or attach request.
|
|
147
|
+
Providers and manifests never contain app-private filesystem paths.
|
|
148
|
+
|
|
149
|
+
For a launch field which the user must select, use
|
|
150
|
+
`debugProjectPath(id, label, kind)`. Zyntax reviews and persists the selected
|
|
151
|
+
canonical document URI per project. The symbolic slot remains in provider
|
|
152
|
+
requests; only the managed DAP host resolves it to a native path immediately
|
|
153
|
+
before adapter launch.
|
|
154
|
+
|
|
155
|
+
Providers with `workspace.read` can query the host-owned project index through
|
|
156
|
+
`findFiles({ include, exclude?, maxResults }, cancellation)`. Globs are relative
|
|
157
|
+
to the open project; a basename-only glob matches at any depth. Results contain
|
|
158
|
+
only canonical document URIs and project-relative paths, are deterministic and
|
|
159
|
+
bounded, and remain subject to the same project-confined `readText` boundary.
|
|
160
|
+
`relativePath(uri, cancellation)` resolves a canonical document URI to its
|
|
161
|
+
project-relative identity, or `null` when the document is outside the open
|
|
162
|
+
project. The isolated provider never receives a native path or direct filesystem
|
|
163
|
+
access.
|
|
164
|
+
|
|
165
|
+
Preview providers may select registered editor languages or declare strict
|
|
166
|
+
project-relative `paths` globs. Path selectors route host-safe previews without
|
|
167
|
+
claiming syntax or language support. Every provider declares one `input` mode.
|
|
168
|
+
`text` receives the bounded canonical text snapshot and may return structured,
|
|
169
|
+
table, text, design-token, or bounded inspector data. `document` receives metadata
|
|
170
|
+
only and may select a declared HTML, SVG, or raster renderer for the exact source
|
|
171
|
+
snapshot; it never receives bytes, resource URLs, markup, DOM, Vue, filesystem or
|
|
172
|
+
native handles, or a WebView. HTML resources declare their script, console, and
|
|
173
|
+
project-subresource policy explicitly. The host validates the bounded result,
|
|
174
|
+
mints and disposes the canonical resource session, confines project resources,
|
|
175
|
+
and owns the renderer.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { AI_MODEL_CAPABILITIES, AI_PROVIDER_CAPABILITIES } from "../capabilities.js";
|
|
2
|
+
export { AI_MODEL_CAPABILITIES, AI_PROVIDER_CAPABILITIES };
|
|
3
|
+
export type AIModelCapability = (typeof AI_MODEL_CAPABILITIES)[number];
|
|
4
|
+
export type AIProviderCapability = (typeof AI_PROVIDER_CAPABILITIES)[number];
|
|
5
|
+
/** Exact capabilities a harness needs from one provider/model pair. */
|
|
6
|
+
export interface AgentProviderRequirements {
|
|
7
|
+
readonly providerCapabilities: readonly AIProviderCapability[];
|
|
8
|
+
readonly modelCapabilities: readonly AIModelCapability[];
|
|
9
|
+
}
|
|
10
|
+
/** Capabilities advertised by a provider contribution before activation. */
|
|
11
|
+
export interface AIProviderCapabilitySelector {
|
|
12
|
+
readonly providerCapabilities: readonly AIProviderCapability[];
|
|
13
|
+
/** Capabilities offered by at least one model exposed by this provider. */
|
|
14
|
+
readonly modelCapabilities: readonly AIModelCapability[];
|
|
15
|
+
}
|
|
16
|
+
export interface AIModelDescriptor {
|
|
17
|
+
readonly id: string;
|
|
18
|
+
readonly label: string;
|
|
19
|
+
readonly capabilities: readonly AIModelCapability[];
|
|
20
|
+
readonly contextWindow?: number;
|
|
21
|
+
readonly maximumOutputTokens?: number;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Capability matching is conjunctive and exact. An unadvertised capability is
|
|
25
|
+
* incompatible; the host never guesses support or substitutes another model.
|
|
26
|
+
*/
|
|
27
|
+
export declare function providerMatchesAgentRequirements(selector: AIProviderCapabilitySelector, requirements: AgentProviderRequirements): boolean;
|
|
28
|
+
export declare function modelMatchesAgentRequirements(model: Pick<AIModelDescriptor, "capabilities">, requirements: Pick<AgentProviderRequirements, "modelCapabilities">): boolean;
|
|
29
|
+
//# sourceMappingURL=capabilities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../src/agent/capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,wBAAwB,EACzB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,CAAC;AAE3D,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvE,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7E,uEAAuE;AACvE,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,oBAAoB,EAAE,SAAS,oBAAoB,EAAE,CAAC;IAC/D,QAAQ,CAAC,iBAAiB,EAAE,SAAS,iBAAiB,EAAE,CAAC;CAC1D;AAED,4EAA4E;AAC5E,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,oBAAoB,EAAE,SAAS,oBAAoB,EAAE,CAAC;IAC/D,2EAA2E;IAC3E,QAAQ,CAAC,iBAAiB,EAAE,SAAS,iBAAiB,EAAE,CAAC;CAC1D;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,YAAY,EAAE,SAAS,iBAAiB,EAAE,CAAC;IACpD,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC;CACvC;AAUD;;;GAGG;AACH,wBAAgB,gCAAgC,CAC9C,QAAQ,EAAE,4BAA4B,EACtC,YAAY,EAAE,yBAAyB,GACtC,OAAO,CAQT;AAED,wBAAgB,6BAA6B,CAC3C,KAAK,EAAE,IAAI,CAAC,iBAAiB,EAAE,cAAc,CAAC,EAC9C,YAAY,EAAE,IAAI,CAAC,yBAAyB,EAAE,mBAAmB,CAAC,GACjE,OAAO,CAET"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AI_MODEL_CAPABILITIES, AI_PROVIDER_CAPABILITIES, } from "../capabilities.js";
|
|
2
|
+
export { AI_MODEL_CAPABILITIES, AI_PROVIDER_CAPABILITIES };
|
|
3
|
+
function containsEvery(available, required) {
|
|
4
|
+
const availableSet = new Set(available);
|
|
5
|
+
return required.every((capability) => availableSet.has(capability));
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Capability matching is conjunctive and exact. An unadvertised capability is
|
|
9
|
+
* incompatible; the host never guesses support or substitutes another model.
|
|
10
|
+
*/
|
|
11
|
+
export function providerMatchesAgentRequirements(selector, requirements) {
|
|
12
|
+
return (containsEvery(selector.providerCapabilities, requirements.providerCapabilities) &&
|
|
13
|
+
containsEvery(selector.modelCapabilities, requirements.modelCapabilities));
|
|
14
|
+
}
|
|
15
|
+
export function modelMatchesAgentRequirements(model, requirements) {
|
|
16
|
+
return containsEvery(model.capabilities, requirements.modelCapabilities);
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=capabilities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capabilities.js","sourceRoot":"","sources":["../../src/agent/capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,CAAC;AA2B3D,SAAS,aAAa,CACpB,SAAuB,EACvB,QAAsB;IAEtB,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,CAAC;IACxC,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC;AACtE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,gCAAgC,CAC9C,QAAsC,EACtC,YAAuC;IAEvC,OAAO,CACL,aAAa,CACX,QAAQ,CAAC,oBAAoB,EAC7B,YAAY,CAAC,oBAAoB,CAClC;QACD,aAAa,CAAC,QAAQ,CAAC,iBAAiB,EAAE,YAAY,CAAC,iBAAiB,CAAC,CAC1E,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,6BAA6B,CAC3C,KAA8C,EAC9C,YAAkE;IAElE,OAAO,aAAa,CAAC,KAAK,CAAC,YAAY,EAAE,YAAY,CAAC,iBAAiB,CAAC,CAAC;AAC3E,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { AgentProviderRequirements, AIProviderCapabilitySelector } from "./capabilities.js";
|
|
2
|
+
export interface AgentHarnessContribution {
|
|
3
|
+
readonly id: string;
|
|
4
|
+
readonly label: string;
|
|
5
|
+
readonly description?: string;
|
|
6
|
+
/** Competing harnesses in the same group require a deterministic selection. */
|
|
7
|
+
readonly group: string;
|
|
8
|
+
readonly priority: number;
|
|
9
|
+
readonly composition: "exclusive";
|
|
10
|
+
/** Symbolic package module resolved from the verified active manifest. */
|
|
11
|
+
readonly module: string;
|
|
12
|
+
readonly export: string;
|
|
13
|
+
readonly providerRequirements: AgentProviderRequirements;
|
|
14
|
+
readonly lifecycle: {
|
|
15
|
+
/** Delay after final session demand ends before the harness is disposed. */
|
|
16
|
+
readonly idleTimeoutMs: number;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export interface AIProviderContribution {
|
|
20
|
+
readonly id: string;
|
|
21
|
+
readonly label: string;
|
|
22
|
+
readonly description?: string;
|
|
23
|
+
/** Competing providers in the same group require a deterministic selection. */
|
|
24
|
+
readonly group: string;
|
|
25
|
+
readonly priority: number;
|
|
26
|
+
readonly composition: "exclusive";
|
|
27
|
+
/** Symbolic package module resolved from the verified active manifest. */
|
|
28
|
+
readonly module: string;
|
|
29
|
+
readonly export: string;
|
|
30
|
+
readonly selector: AIProviderCapabilitySelector;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=contributions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contributions.d.ts","sourceRoot":"","sources":["../../src/agent/contributions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,yBAAyB,EACzB,4BAA4B,EAC7B,MAAM,mBAAmB,CAAC;AAE3B,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,+EAA+E;IAC/E,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAClC,0EAA0E;IAC1E,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,oBAAoB,EAAE,yBAAyB,CAAC;IACzD,QAAQ,CAAC,SAAS,EAAE;QAClB,4EAA4E;QAC5E,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;KAChC,CAAC;CACH;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,+EAA+E;IAC/E,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAClC,0EAA0E;IAC1E,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,4BAA4B,CAAC;CACjD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contributions.js","sourceRoot":"","sources":["../../src/agent/contributions.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import type { ExtensionJsonObject, ExtensionJsonValue } from "../contracts/json.js";
|
|
2
|
+
import type { ExtensionStreamSink } from "../contract.js";
|
|
3
|
+
import type { AIModelDescriptor } from "./capabilities.js";
|
|
4
|
+
export interface AgentContributionReference {
|
|
5
|
+
readonly extensionId: string;
|
|
6
|
+
readonly contributionId: string;
|
|
7
|
+
}
|
|
8
|
+
export type AgentMessageRole = "system" | "user" | "assistant" | "tool";
|
|
9
|
+
export type AgentMessagePart = {
|
|
10
|
+
readonly kind: "text";
|
|
11
|
+
readonly text: string;
|
|
12
|
+
} | {
|
|
13
|
+
readonly kind: "asset";
|
|
14
|
+
/** Host-owned opaque asset reference; never a filesystem path. */
|
|
15
|
+
readonly assetId: string;
|
|
16
|
+
readonly mediaType: string;
|
|
17
|
+
readonly name?: string;
|
|
18
|
+
} | {
|
|
19
|
+
readonly kind: "toolCall";
|
|
20
|
+
readonly callId: string;
|
|
21
|
+
readonly tool: string;
|
|
22
|
+
readonly input: ExtensionJsonObject;
|
|
23
|
+
} | {
|
|
24
|
+
readonly kind: "toolResult";
|
|
25
|
+
readonly callId: string;
|
|
26
|
+
readonly output: ExtensionJsonValue;
|
|
27
|
+
readonly isError: boolean;
|
|
28
|
+
};
|
|
29
|
+
export interface AgentConversationMessage {
|
|
30
|
+
readonly id: string;
|
|
31
|
+
readonly role: AgentMessageRole;
|
|
32
|
+
readonly parts: readonly AgentMessagePart[];
|
|
33
|
+
}
|
|
34
|
+
export interface AgentToolDescriptor {
|
|
35
|
+
readonly name: string;
|
|
36
|
+
readonly description: string;
|
|
37
|
+
readonly inputSchema: ExtensionJsonObject;
|
|
38
|
+
}
|
|
39
|
+
export interface AgentSessionOpenRequest {
|
|
40
|
+
readonly sessionId: string;
|
|
41
|
+
readonly workspaceId: string;
|
|
42
|
+
readonly harness: AgentContributionReference;
|
|
43
|
+
readonly provider: AgentContributionReference;
|
|
44
|
+
readonly modelId: string;
|
|
45
|
+
/** Host-owned persisted transcript supplied as an immutable snapshot. */
|
|
46
|
+
readonly history: readonly AgentConversationMessage[];
|
|
47
|
+
}
|
|
48
|
+
export interface AgentPromptRequest {
|
|
49
|
+
readonly requestId: string;
|
|
50
|
+
readonly sessionId: string;
|
|
51
|
+
readonly message: AgentConversationMessage;
|
|
52
|
+
}
|
|
53
|
+
export type AgentCancellationReason = "user" | "superseded" | "sessionClosed" | "hostShutdown";
|
|
54
|
+
/** Serializable cancellation message sent across the extension boundary. */
|
|
55
|
+
export interface AgentCancellationRequest {
|
|
56
|
+
readonly requestId: string;
|
|
57
|
+
readonly sessionId: string;
|
|
58
|
+
readonly reason: AgentCancellationReason;
|
|
59
|
+
}
|
|
60
|
+
export type AgentSessionCloseReason = "idle" | "user" | "hostShutdown";
|
|
61
|
+
export interface AgentSessionCloseRequest {
|
|
62
|
+
readonly sessionId: string;
|
|
63
|
+
readonly reason: AgentSessionCloseReason;
|
|
64
|
+
}
|
|
65
|
+
export interface AgentHostToolRequest {
|
|
66
|
+
readonly requestId: string;
|
|
67
|
+
readonly sessionId: string;
|
|
68
|
+
readonly tool: string;
|
|
69
|
+
readonly input: ExtensionJsonObject;
|
|
70
|
+
}
|
|
71
|
+
export interface AgentHostToolResult {
|
|
72
|
+
readonly requestId: string;
|
|
73
|
+
readonly output: ExtensionJsonValue;
|
|
74
|
+
readonly isError: boolean;
|
|
75
|
+
}
|
|
76
|
+
export interface AgentWorkspaceTextEdit {
|
|
77
|
+
readonly uri: string;
|
|
78
|
+
readonly version: number;
|
|
79
|
+
readonly edits: readonly {
|
|
80
|
+
readonly from: number;
|
|
81
|
+
readonly to: number;
|
|
82
|
+
readonly text: string;
|
|
83
|
+
}[];
|
|
84
|
+
}
|
|
85
|
+
export interface AgentWorkspaceEditProposalRequest {
|
|
86
|
+
readonly requestId: string;
|
|
87
|
+
readonly sessionId: string;
|
|
88
|
+
readonly summary: string;
|
|
89
|
+
readonly changes: readonly AgentWorkspaceTextEdit[];
|
|
90
|
+
}
|
|
91
|
+
export interface AgentWorkspaceEditProposalResult {
|
|
92
|
+
readonly requestId: string;
|
|
93
|
+
readonly proposalId: string;
|
|
94
|
+
readonly status: "pendingReview";
|
|
95
|
+
}
|
|
96
|
+
export interface AIProviderModelListRequest {
|
|
97
|
+
readonly requestId: string;
|
|
98
|
+
readonly provider: AgentContributionReference;
|
|
99
|
+
}
|
|
100
|
+
export interface AIProviderModelListResult {
|
|
101
|
+
readonly requestId: string;
|
|
102
|
+
readonly models: readonly AIModelDescriptor[];
|
|
103
|
+
}
|
|
104
|
+
export interface AIProviderStreamRequest {
|
|
105
|
+
readonly requestId: string;
|
|
106
|
+
readonly sessionId: string;
|
|
107
|
+
readonly provider: AgentContributionReference;
|
|
108
|
+
readonly modelId: string;
|
|
109
|
+
readonly messages: readonly AgentConversationMessage[];
|
|
110
|
+
readonly tools: readonly AgentToolDescriptor[];
|
|
111
|
+
/** Validated provider-owned settings. Credentials stay in the host vault. */
|
|
112
|
+
readonly settings: ExtensionJsonObject;
|
|
113
|
+
}
|
|
114
|
+
export interface AIProviderUsage {
|
|
115
|
+
readonly inputTokens?: number;
|
|
116
|
+
readonly outputTokens?: number;
|
|
117
|
+
readonly cachedInputTokens?: number;
|
|
118
|
+
readonly reasoningTokens?: number;
|
|
119
|
+
}
|
|
120
|
+
export interface AgentProtocolError {
|
|
121
|
+
readonly code: string;
|
|
122
|
+
readonly message: string;
|
|
123
|
+
readonly retryable: boolean;
|
|
124
|
+
}
|
|
125
|
+
/** JSON-only stream frames emitted independently by a selected provider. */
|
|
126
|
+
export type AIProviderStreamEvent = {
|
|
127
|
+
readonly kind: "started";
|
|
128
|
+
readonly requestId: string;
|
|
129
|
+
} | {
|
|
130
|
+
readonly kind: "textDelta";
|
|
131
|
+
readonly requestId: string;
|
|
132
|
+
readonly delta: string;
|
|
133
|
+
} | {
|
|
134
|
+
readonly kind: "reasoningDelta";
|
|
135
|
+
readonly requestId: string;
|
|
136
|
+
readonly delta: string;
|
|
137
|
+
} | {
|
|
138
|
+
readonly kind: "toolCall";
|
|
139
|
+
readonly requestId: string;
|
|
140
|
+
readonly callId: string;
|
|
141
|
+
readonly tool: string;
|
|
142
|
+
readonly input: ExtensionJsonObject;
|
|
143
|
+
} | {
|
|
144
|
+
readonly kind: "usage";
|
|
145
|
+
readonly requestId: string;
|
|
146
|
+
readonly usage: AIProviderUsage;
|
|
147
|
+
} | {
|
|
148
|
+
readonly kind: "completed";
|
|
149
|
+
readonly requestId: string;
|
|
150
|
+
readonly finishReason: "stop" | "length" | "toolCalls";
|
|
151
|
+
} | {
|
|
152
|
+
readonly kind: "cancelled";
|
|
153
|
+
readonly requestId: string;
|
|
154
|
+
readonly reason: AgentCancellationReason;
|
|
155
|
+
} | {
|
|
156
|
+
readonly kind: "failed";
|
|
157
|
+
readonly requestId: string;
|
|
158
|
+
readonly error: AgentProtocolError;
|
|
159
|
+
};
|
|
160
|
+
export type AgentHarnessStreamEvent = AIProviderStreamEvent | {
|
|
161
|
+
readonly kind: "status";
|
|
162
|
+
readonly requestId: string;
|
|
163
|
+
readonly status: "planning" | "runningTool" | "waitingForApproval";
|
|
164
|
+
readonly label?: string;
|
|
165
|
+
} | {
|
|
166
|
+
readonly kind: "workspaceEdit";
|
|
167
|
+
readonly requestId: string;
|
|
168
|
+
/** Opaque host-staged edit proposal; application remains host-owned. */
|
|
169
|
+
readonly proposalId: string;
|
|
170
|
+
readonly summary: string;
|
|
171
|
+
};
|
|
172
|
+
export type AgentStreamSink<TEvent> = ExtensionStreamSink<TEvent>;
|
|
173
|
+
/** Exact selected-provider route. The host owns dispatch and permissions. */
|
|
174
|
+
export interface AgentAIProviderBroker {
|
|
175
|
+
listModels(request: AIProviderModelListRequest): Promise<AIProviderModelListResult>;
|
|
176
|
+
stream(request: AIProviderStreamRequest, sink: AgentStreamSink<AIProviderStreamEvent>): Promise<void>;
|
|
177
|
+
cancel(request: AgentCancellationRequest): Promise<void>;
|
|
178
|
+
}
|
|
179
|
+
export interface AgentToolBroker {
|
|
180
|
+
invoke(request: AgentHostToolRequest): Promise<AgentHostToolResult>;
|
|
181
|
+
}
|
|
182
|
+
export interface AgentWorkspaceEditBroker {
|
|
183
|
+
stage(request: AgentWorkspaceEditProposalRequest): Promise<AgentWorkspaceEditProposalResult>;
|
|
184
|
+
}
|
|
185
|
+
/** Services mediated by the host; none grants direct native or WebView access. */
|
|
186
|
+
export interface AgentHarnessHostServices {
|
|
187
|
+
readonly provider: AgentAIProviderBroker;
|
|
188
|
+
readonly tools: AgentToolBroker;
|
|
189
|
+
readonly workspaceEdits: AgentWorkspaceEditBroker;
|
|
190
|
+
}
|
|
191
|
+
/** Runtime object returned by the one selected harness contribution. */
|
|
192
|
+
export interface AgentHarnessSession {
|
|
193
|
+
submit(request: AgentPromptRequest, sink: AgentStreamSink<AgentHarnessStreamEvent>): Promise<void>;
|
|
194
|
+
cancel(request: AgentCancellationRequest): Promise<void>;
|
|
195
|
+
dispose(request: AgentSessionCloseRequest): Promise<void>;
|
|
196
|
+
}
|
|
197
|
+
export interface AgentHarnessSessionActivator {
|
|
198
|
+
activate(request: AgentSessionOpenRequest, host: AgentHarnessHostServices): Promise<AgentHarnessSession>;
|
|
199
|
+
}
|
|
200
|
+
/** Package-level harness instance; individual sessions dispose independently. */
|
|
201
|
+
export interface AgentHarnessAdapter extends AgentHarnessSessionActivator {
|
|
202
|
+
dispose(): void | Promise<void>;
|
|
203
|
+
}
|
|
204
|
+
/** Runtime object returned by the one selected provider contribution. */
|
|
205
|
+
export interface AIProviderAdapter {
|
|
206
|
+
listModels(request: AIProviderModelListRequest): Promise<AIProviderModelListResult>;
|
|
207
|
+
stream(request: AIProviderStreamRequest, sink: AgentStreamSink<AIProviderStreamEvent>): Promise<void>;
|
|
208
|
+
cancel(request: AgentCancellationRequest): Promise<void>;
|
|
209
|
+
dispose(): void | Promise<void>;
|
|
210
|
+
}
|
|
211
|
+
//# sourceMappingURL=protocol.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../src/agent/protocol.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAE1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;CACjC;AAED,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,CAAC;AAExE,MAAM,MAAM,gBAAgB,GACxB;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAChD;IACE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,kEAAkE;IAClE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB,GACD;IACE,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,mBAAmB,CAAC;CACrC,GACD;IACE,QAAQ,CAAC,IAAI,EAAE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AE,kBAAkB,EAC3B,IAAI,EAAE,eAAe,CAAC,uBAAuB,CAAC,GAC7C,OAAO,CAAC,IAAI,CAAC,CAAC;IACjB,MAAM,CAAC,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACzD,OAAO,CAAC,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3D;AAED,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CACN,OAAO,EAAE,uBAAuB,EAChC,IAAI,EAAE,wBAAwB,GAC7B,OAAO,CAAC,mBAAmB,CAAC,CAAC;CACjC;AAED,iFAAiF;AACjF,MAAM,WAAW,mBAAoB,SAAQ,4BAA4B;IACvE,OAAO,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACjC;AAED,yEAAyE;AACzE,MAAM,WAAW,iBAAiB;IAChC,UAAU,CAAC,OAAO,EAAE,0BAA0B,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;IACpF,MAAM,CACJ,OAAO,EAAE,uBAAuB,EAChC,IAAI,EAAE,eAAe,CAAC,qBAAqB,CAAC,GAC3C,OAAO,CAAC,IAAI,CAAC,CAAC;IACjB,MAAM,CAAC,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACzD,OAAO,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACjC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../src/agent/protocol.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const AI_MODEL_CAPABILITIES: readonly [
|
|
2
|
+
"text",
|
|
3
|
+
"vision",
|
|
4
|
+
"multipleImages",
|
|
5
|
+
"toolCalling",
|
|
6
|
+
"reasoning",
|
|
7
|
+
"structuredOutput",
|
|
8
|
+
];
|
|
9
|
+
|
|
10
|
+
export declare const AI_PROVIDER_CAPABILITIES: readonly [
|
|
11
|
+
"modelDiscovery",
|
|
12
|
+
"streaming",
|
|
13
|
+
"usage",
|
|
14
|
+
"endpointSelection",
|
|
15
|
+
"serviceTier",
|
|
16
|
+
"providerWebSearch",
|
|
17
|
+
];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export const AI_MODEL_CAPABILITIES = Object.freeze([
|
|
2
|
+
"text",
|
|
3
|
+
"vision",
|
|
4
|
+
"multipleImages",
|
|
5
|
+
"toolCalling",
|
|
6
|
+
"reasoning",
|
|
7
|
+
"structuredOutput",
|
|
8
|
+
]);
|
|
9
|
+
|
|
10
|
+
export const AI_PROVIDER_CAPABILITIES = Object.freeze([
|
|
11
|
+
"modelDiscovery",
|
|
12
|
+
"streaming",
|
|
13
|
+
"usage",
|
|
14
|
+
"endpointSelection",
|
|
15
|
+
"serviceTier",
|
|
16
|
+
"providerWebSearch",
|
|
17
|
+
]);
|