@kybernesis/kyberagent-extension-sdk 0.1.0-alpha

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.
@@ -0,0 +1,666 @@
1
+ import { Schema } from 'effect';
2
+
3
+ declare const ProviderRuntimeProjectionDescriptor: Schema.Struct<{
4
+ target: Schema.Literal<["direct-api", "codex-app-server", "claude-agent-sdk", "pi-agent-core"]>;
5
+ surface: Schema.Literal<["tool-schema", "dynamic-tool", "mcp-server", "skill-context", "host-surface"]>;
6
+ runtimeSourceId: Schema.optional<typeof Schema.String>;
7
+ namespace: Schema.optional<typeof Schema.String>;
8
+ toolIds: Schema.optional<Schema.Array$<typeof Schema.String>>;
9
+ alwaysLoad: Schema.optional<typeof Schema.Boolean>;
10
+ notes: Schema.optional<Schema.Array$<typeof Schema.String>>;
11
+ }>;
12
+ type ProviderRuntimeProjectionDescriptor = Schema.Schema.Type<typeof ProviderRuntimeProjectionDescriptor>;
13
+
14
+ declare const KernelPrincipalKind: Schema.Literal<["daemon", "host", "plugin", "skill", "sidecar", "bridge", "user"]>;
15
+ type KernelPrincipalKind = Schema.Schema.Type<typeof KernelPrincipalKind>;
16
+ declare const KernelPermissionId: Schema.Literal<["kernel.registry.read", "plugin.lifecycle.manage", "host.capabilities.read", "surface.render", "composer.capabilities.read", "composer.capabilities.invoke", "sidecars.launch", "threads.read", "threads.write", "settings.read", "settings.write", "artifacts.read", "artifacts.write", "screenshots.capture", "brain.read", "host.context.read", "host.command.invoke", "host.log.write"]>;
17
+ type KernelPermissionId = Schema.Schema.Type<typeof KernelPermissionId>;
18
+ declare const ExtensionHostSlot: Schema.Literal<["nav.sidebar", "workspace.surface", "settings.extensions", "chat.visual", "thread.tab.contextMenu", "companion.overlay", "background.sidecar"]>;
19
+ type ExtensionHostSlot = Schema.Schema.Type<typeof ExtensionHostSlot>;
20
+ declare const WorkspaceTabContributionMetadata: Schema.Struct<{
21
+ defaultVisible: Schema.optional<typeof Schema.Boolean>;
22
+ defaultLabel: Schema.optional<typeof Schema.String>;
23
+ allowRename: Schema.optional<typeof Schema.Boolean>;
24
+ }>;
25
+ type WorkspaceTabContributionMetadata = Schema.Schema.Type<typeof WorkspaceTabContributionMetadata>;
26
+ declare const PluginManifestContribution: Schema.Struct<{
27
+ contributionId: typeof Schema.String;
28
+ kind: Schema.Literal<["skillTemplate", "composerCapability", "surface", "settingsPanel", "sidecar", "bridge", "providerAdapter", "contextualAction", "dataEndpoint"]>;
29
+ displayName: typeof Schema.String;
30
+ requiredHostCapabilities: Schema.Array$<Schema.Literal<["host.windows", "host.tray", "host.notifications", "host.embeddedViews", "host.filePicker", "host.localShell", "host.secretPrompt", "host.visualSelection", "host.localFilesystem", "host.terminal", "host.globalInput", "host.contextMenus", "host.accessibility"]>>;
31
+ requiredKernelPermissions: Schema.optional<Schema.Array$<Schema.Literal<["kernel.registry.read", "plugin.lifecycle.manage", "host.capabilities.read", "surface.render", "composer.capabilities.read", "composer.capabilities.invoke", "sidecars.launch", "threads.read", "threads.write", "settings.read", "settings.write", "artifacts.read", "artifacts.write", "screenshots.capture", "brain.read", "host.context.read", "host.command.invoke", "host.log.write"]>>>;
32
+ routeSegment: Schema.optional<typeof Schema.String>;
33
+ mount: Schema.optional<typeof Schema.String>;
34
+ presentationClass: Schema.optional<typeof Schema.String>;
35
+ hostSlots: Schema.optional<Schema.Array$<Schema.Literal<["nav.sidebar", "workspace.surface", "settings.extensions", "chat.visual", "thread.tab.contextMenu", "companion.overlay", "background.sidecar"]>>>;
36
+ workspaceTab: Schema.optional<Schema.Struct<{
37
+ defaultVisible: Schema.optional<typeof Schema.Boolean>;
38
+ defaultLabel: Schema.optional<typeof Schema.String>;
39
+ allowRename: Schema.optional<typeof Schema.Boolean>;
40
+ }>>;
41
+ }>;
42
+ type PluginManifestContribution = Schema.Schema.Type<typeof PluginManifestContribution>;
43
+ declare const PluginThemeTokenSet: Schema.Struct<{
44
+ themeId: typeof Schema.String;
45
+ label: typeof Schema.String;
46
+ description: Schema.optional<typeof Schema.String>;
47
+ modes: Schema.Array$<Schema.Literal<["light", "dark"]>>;
48
+ tokens: Schema.Record$<Schema.Literal<["light", "dark"]>, Schema.Record$<typeof Schema.String, typeof Schema.String>>;
49
+ }>;
50
+ type PluginThemeTokenSet = Schema.Schema.Type<typeof PluginThemeTokenSet>;
51
+ declare const PluginShipsState: Schema.Literal<["active", "inactive"]>;
52
+ type PluginShipsState = Schema.Schema.Type<typeof PluginShipsState>;
53
+ declare const KernelPluginRegistryEntry: Schema.Struct<{
54
+ manifest: Schema.Struct<{
55
+ pluginId: typeof Schema.String;
56
+ displayName: typeof Schema.String;
57
+ version: typeof Schema.String;
58
+ source: Schema.Literal<["bundled", "workspace", "user", "remote"]>;
59
+ manifestPath: Schema.optional<typeof Schema.String>;
60
+ contributions: Schema.Array$<Schema.Struct<{
61
+ contributionId: typeof Schema.String;
62
+ kind: Schema.Literal<["skillTemplate", "composerCapability", "surface", "settingsPanel", "sidecar", "bridge", "providerAdapter", "contextualAction", "dataEndpoint"]>;
63
+ displayName: typeof Schema.String;
64
+ requiredHostCapabilities: Schema.Array$<Schema.Literal<["host.windows", "host.tray", "host.notifications", "host.embeddedViews", "host.filePicker", "host.localShell", "host.secretPrompt", "host.visualSelection", "host.localFilesystem", "host.terminal", "host.globalInput", "host.contextMenus", "host.accessibility"]>>;
65
+ requiredKernelPermissions: Schema.optional<Schema.Array$<Schema.Literal<["kernel.registry.read", "plugin.lifecycle.manage", "host.capabilities.read", "surface.render", "composer.capabilities.read", "composer.capabilities.invoke", "sidecars.launch", "threads.read", "threads.write", "settings.read", "settings.write", "artifacts.read", "artifacts.write", "screenshots.capture", "brain.read", "host.context.read", "host.command.invoke", "host.log.write"]>>>;
66
+ routeSegment: Schema.optional<typeof Schema.String>;
67
+ mount: Schema.optional<typeof Schema.String>;
68
+ presentationClass: Schema.optional<typeof Schema.String>;
69
+ hostSlots: Schema.optional<Schema.Array$<Schema.Literal<["nav.sidebar", "workspace.surface", "settings.extensions", "chat.visual", "thread.tab.contextMenu", "companion.overlay", "background.sidecar"]>>>;
70
+ workspaceTab: Schema.optional<Schema.Struct<{
71
+ defaultVisible: Schema.optional<typeof Schema.Boolean>;
72
+ defaultLabel: Schema.optional<typeof Schema.String>;
73
+ allowRename: Schema.optional<typeof Schema.Boolean>;
74
+ }>>;
75
+ }>>;
76
+ themeTokens: Schema.optional<Schema.Array$<Schema.Struct<{
77
+ themeId: typeof Schema.String;
78
+ label: typeof Schema.String;
79
+ description: Schema.optional<typeof Schema.String>;
80
+ modes: Schema.Array$<Schema.Literal<["light", "dark"]>>;
81
+ tokens: Schema.Record$<Schema.Literal<["light", "dark"]>, Schema.Record$<typeof Schema.String, typeof Schema.String>>;
82
+ }>>>;
83
+ ships: Schema.optional<Schema.Literal<["active", "inactive"]>>;
84
+ }>;
85
+ enablement: Schema.Literal<["enabled", "disabled"]>;
86
+ runtimeState: Schema.Literal<["inactive", "active", "blocked", "error"]>;
87
+ grantedPermissions: Schema.Array$<Schema.Literal<["kernel.registry.read", "plugin.lifecycle.manage", "host.capabilities.read", "surface.render", "composer.capabilities.read", "composer.capabilities.invoke", "sidecars.launch", "threads.read", "threads.write", "settings.read", "settings.write", "artifacts.read", "artifacts.write", "screenshots.capture", "brain.read", "host.context.read", "host.command.invoke", "host.log.write"]>>;
88
+ deniedPermissions: Schema.Array$<Schema.Literal<["kernel.registry.read", "plugin.lifecycle.manage", "host.capabilities.read", "surface.render", "composer.capabilities.read", "composer.capabilities.invoke", "sidecars.launch", "threads.read", "threads.write", "settings.read", "settings.write", "artifacts.read", "artifacts.write", "screenshots.capture", "brain.read", "host.context.read", "host.command.invoke", "host.log.write"]>>;
89
+ }>;
90
+ type KernelPluginRegistryEntry = Schema.Schema.Type<typeof KernelPluginRegistryEntry>;
91
+ declare const KernelRegistrySnapshot: Schema.Struct<{
92
+ generatedAtMs: Schema.refine<number, typeof Schema.NonNegative>;
93
+ owner: Schema.Literal<["daemon/kernel"]>;
94
+ plugins: Schema.Array$<Schema.Struct<{
95
+ manifest: Schema.Struct<{
96
+ pluginId: typeof Schema.String;
97
+ displayName: typeof Schema.String;
98
+ version: typeof Schema.String;
99
+ source: Schema.Literal<["bundled", "workspace", "user", "remote"]>;
100
+ manifestPath: Schema.optional<typeof Schema.String>;
101
+ contributions: Schema.Array$<Schema.Struct<{
102
+ contributionId: typeof Schema.String;
103
+ kind: Schema.Literal<["skillTemplate", "composerCapability", "surface", "settingsPanel", "sidecar", "bridge", "providerAdapter", "contextualAction", "dataEndpoint"]>;
104
+ displayName: typeof Schema.String;
105
+ requiredHostCapabilities: Schema.Array$<Schema.Literal<["host.windows", "host.tray", "host.notifications", "host.embeddedViews", "host.filePicker", "host.localShell", "host.secretPrompt", "host.visualSelection", "host.localFilesystem", "host.terminal", "host.globalInput", "host.contextMenus", "host.accessibility"]>>;
106
+ requiredKernelPermissions: Schema.optional<Schema.Array$<Schema.Literal<["kernel.registry.read", "plugin.lifecycle.manage", "host.capabilities.read", "surface.render", "composer.capabilities.read", "composer.capabilities.invoke", "sidecars.launch", "threads.read", "threads.write", "settings.read", "settings.write", "artifacts.read", "artifacts.write", "screenshots.capture", "brain.read", "host.context.read", "host.command.invoke", "host.log.write"]>>>;
107
+ routeSegment: Schema.optional<typeof Schema.String>;
108
+ mount: Schema.optional<typeof Schema.String>;
109
+ presentationClass: Schema.optional<typeof Schema.String>;
110
+ hostSlots: Schema.optional<Schema.Array$<Schema.Literal<["nav.sidebar", "workspace.surface", "settings.extensions", "chat.visual", "thread.tab.contextMenu", "companion.overlay", "background.sidecar"]>>>;
111
+ workspaceTab: Schema.optional<Schema.Struct<{
112
+ defaultVisible: Schema.optional<typeof Schema.Boolean>;
113
+ defaultLabel: Schema.optional<typeof Schema.String>;
114
+ allowRename: Schema.optional<typeof Schema.Boolean>;
115
+ }>>;
116
+ }>>;
117
+ themeTokens: Schema.optional<Schema.Array$<Schema.Struct<{
118
+ themeId: typeof Schema.String;
119
+ label: typeof Schema.String;
120
+ description: Schema.optional<typeof Schema.String>;
121
+ modes: Schema.Array$<Schema.Literal<["light", "dark"]>>;
122
+ tokens: Schema.Record$<Schema.Literal<["light", "dark"]>, Schema.Record$<typeof Schema.String, typeof Schema.String>>;
123
+ }>>>;
124
+ ships: Schema.optional<Schema.Literal<["active", "inactive"]>>;
125
+ }>;
126
+ enablement: Schema.Literal<["enabled", "disabled"]>;
127
+ runtimeState: Schema.Literal<["inactive", "active", "blocked", "error"]>;
128
+ grantedPermissions: Schema.Array$<Schema.Literal<["kernel.registry.read", "plugin.lifecycle.manage", "host.capabilities.read", "surface.render", "composer.capabilities.read", "composer.capabilities.invoke", "sidecars.launch", "threads.read", "threads.write", "settings.read", "settings.write", "artifacts.read", "artifacts.write", "screenshots.capture", "brain.read", "host.context.read", "host.command.invoke", "host.log.write"]>>;
129
+ deniedPermissions: Schema.Array$<Schema.Literal<["kernel.registry.read", "plugin.lifecycle.manage", "host.capabilities.read", "surface.render", "composer.capabilities.read", "composer.capabilities.invoke", "sidecars.launch", "threads.read", "threads.write", "settings.read", "settings.write", "artifacts.read", "artifacts.write", "screenshots.capture", "brain.read", "host.context.read", "host.command.invoke", "host.log.write"]>>;
130
+ }>>;
131
+ permissions: Schema.Array$<Schema.Struct<{
132
+ principalKind: Schema.Literal<["daemon", "host", "plugin", "skill", "sidecar", "bridge", "user"]>;
133
+ principalId: typeof Schema.String;
134
+ granted: Schema.Array$<Schema.Literal<["kernel.registry.read", "plugin.lifecycle.manage", "host.capabilities.read", "surface.render", "composer.capabilities.read", "composer.capabilities.invoke", "sidecars.launch", "threads.read", "threads.write", "settings.read", "settings.write", "artifacts.read", "artifacts.write", "screenshots.capture", "brain.read", "host.context.read", "host.command.invoke", "host.log.write"]>>;
135
+ denied: Schema.Array$<Schema.Literal<["kernel.registry.read", "plugin.lifecycle.manage", "host.capabilities.read", "surface.render", "composer.capabilities.read", "composer.capabilities.invoke", "sidecars.launch", "threads.read", "threads.write", "settings.read", "settings.write", "artifacts.read", "artifacts.write", "screenshots.capture", "brain.read", "host.context.read", "host.command.invoke", "host.log.write"]>>;
136
+ }>>;
137
+ availableHostCapabilities: Schema.Array$<Schema.Literal<["host.windows", "host.tray", "host.notifications", "host.embeddedViews", "host.filePicker", "host.localShell", "host.secretPrompt", "host.visualSelection", "host.localFilesystem", "host.terminal", "host.globalInput", "host.contextMenus", "host.accessibility"]>>;
138
+ contributions: Schema.Array$<Schema.Struct<{
139
+ contributionId: typeof Schema.String;
140
+ pluginId: typeof Schema.String;
141
+ kind: Schema.Literal<["skillTemplate", "composerCapability", "surface", "settingsPanel", "sidecar", "bridge", "providerAdapter", "contextualAction", "dataEndpoint"]>;
142
+ available: typeof Schema.Boolean;
143
+ hostSlots: Schema.optional<Schema.Array$<Schema.Literal<["nav.sidebar", "workspace.surface", "settings.extensions", "chat.visual", "thread.tab.contextMenu", "companion.overlay", "background.sidecar"]>>>;
144
+ requiredHostCapabilities: Schema.Array$<Schema.Literal<["host.windows", "host.tray", "host.notifications", "host.embeddedViews", "host.filePicker", "host.localShell", "host.secretPrompt", "host.visualSelection", "host.localFilesystem", "host.terminal", "host.globalInput", "host.contextMenus", "host.accessibility"]>>;
145
+ requiredKernelPermissions: Schema.Array$<Schema.Literal<["kernel.registry.read", "plugin.lifecycle.manage", "host.capabilities.read", "surface.render", "composer.capabilities.read", "composer.capabilities.invoke", "sidecars.launch", "threads.read", "threads.write", "settings.read", "settings.write", "artifacts.read", "artifacts.write", "screenshots.capture", "brain.read", "host.context.read", "host.command.invoke", "host.log.write"]>>;
146
+ missingHostCapabilities: Schema.Array$<Schema.Literal<["host.windows", "host.tray", "host.notifications", "host.embeddedViews", "host.filePicker", "host.localShell", "host.secretPrompt", "host.visualSelection", "host.localFilesystem", "host.terminal", "host.globalInput", "host.contextMenus", "host.accessibility"]>>;
147
+ missingKernelPermissions: Schema.Array$<Schema.Literal<["kernel.registry.read", "plugin.lifecycle.manage", "host.capabilities.read", "surface.render", "composer.capabilities.read", "composer.capabilities.invoke", "sidecars.launch", "threads.read", "threads.write", "settings.read", "settings.write", "artifacts.read", "artifacts.write", "screenshots.capture", "brain.read", "host.context.read", "host.command.invoke", "host.log.write"]>>;
148
+ deniedKernelPermissions: Schema.Array$<Schema.Literal<["kernel.registry.read", "plugin.lifecycle.manage", "host.capabilities.read", "surface.render", "composer.capabilities.read", "composer.capabilities.invoke", "sidecars.launch", "threads.read", "threads.write", "settings.read", "settings.write", "artifacts.read", "artifacts.write", "screenshots.capture", "brain.read", "host.context.read", "host.command.invoke", "host.log.write"]>>;
149
+ }>>;
150
+ surfaces: Schema.Array$<Schema.Struct<{
151
+ surfaceId: typeof Schema.String;
152
+ pluginId: typeof Schema.String;
153
+ available: typeof Schema.Boolean;
154
+ hostSlots: Schema.optional<Schema.Array$<Schema.Literal<["nav.sidebar", "workspace.surface", "settings.extensions", "chat.visual", "thread.tab.contextMenu", "companion.overlay", "background.sidecar"]>>>;
155
+ requiredHostCapabilities: Schema.Array$<Schema.Literal<["host.windows", "host.tray", "host.notifications", "host.embeddedViews", "host.filePicker", "host.localShell", "host.secretPrompt", "host.visualSelection", "host.localFilesystem", "host.terminal", "host.globalInput", "host.contextMenus", "host.accessibility"]>>;
156
+ requiredKernelPermissions: Schema.optional<Schema.Array$<Schema.Literal<["kernel.registry.read", "plugin.lifecycle.manage", "host.capabilities.read", "surface.render", "composer.capabilities.read", "composer.capabilities.invoke", "sidecars.launch", "threads.read", "threads.write", "settings.read", "settings.write", "artifacts.read", "artifacts.write", "screenshots.capture", "brain.read", "host.context.read", "host.command.invoke", "host.log.write"]>>>;
157
+ missingHostCapabilities: Schema.Array$<Schema.Literal<["host.windows", "host.tray", "host.notifications", "host.embeddedViews", "host.filePicker", "host.localShell", "host.secretPrompt", "host.visualSelection", "host.localFilesystem", "host.terminal", "host.globalInput", "host.contextMenus", "host.accessibility"]>>;
158
+ missingKernelPermissions: Schema.optional<Schema.Array$<Schema.Literal<["kernel.registry.read", "plugin.lifecycle.manage", "host.capabilities.read", "surface.render", "composer.capabilities.read", "composer.capabilities.invoke", "sidecars.launch", "threads.read", "threads.write", "settings.read", "settings.write", "artifacts.read", "artifacts.write", "screenshots.capture", "brain.read", "host.context.read", "host.command.invoke", "host.log.write"]>>>;
159
+ deniedKernelPermissions: Schema.optional<Schema.Array$<Schema.Literal<["kernel.registry.read", "plugin.lifecycle.manage", "host.capabilities.read", "surface.render", "composer.capabilities.read", "composer.capabilities.invoke", "sidecars.launch", "threads.read", "threads.write", "settings.read", "settings.write", "artifacts.read", "artifacts.write", "screenshots.capture", "brain.read", "host.context.read", "host.command.invoke", "host.log.write"]>>>;
160
+ }>>;
161
+ }>;
162
+ type KernelRegistrySnapshot = Schema.Schema.Type<typeof KernelRegistrySnapshot>;
163
+
164
+ declare const NormalizedPluginExtensionContributionSet: Schema.Struct<{
165
+ surfaces: Schema.Array$<Schema.Struct<{
166
+ contributionId: typeof Schema.String;
167
+ kind: Schema.Literal<["skillTemplate", "composerCapability", "surface", "settingsPanel", "sidecar", "bridge", "providerAdapter", "contextualAction", "dataEndpoint"]>;
168
+ displayName: typeof Schema.String;
169
+ requiredHostCapabilities: Schema.Array$<Schema.Literal<["host.windows", "host.tray", "host.notifications", "host.embeddedViews", "host.filePicker", "host.localShell", "host.secretPrompt", "host.visualSelection", "host.localFilesystem", "host.terminal", "host.globalInput", "host.contextMenus", "host.accessibility"]>>;
170
+ requiredKernelPermissions: Schema.optional<Schema.Array$<Schema.Literal<["kernel.registry.read", "plugin.lifecycle.manage", "host.capabilities.read", "surface.render", "composer.capabilities.read", "composer.capabilities.invoke", "sidecars.launch", "threads.read", "threads.write", "settings.read", "settings.write", "artifacts.read", "artifacts.write", "screenshots.capture", "brain.read", "host.context.read", "host.command.invoke", "host.log.write"]>>>;
171
+ routeSegment: Schema.optional<typeof Schema.String>;
172
+ mount: Schema.optional<typeof Schema.String>;
173
+ presentationClass: Schema.optional<typeof Schema.String>;
174
+ hostSlots: Schema.optional<Schema.Array$<Schema.Literal<["nav.sidebar", "workspace.surface", "settings.extensions", "chat.visual", "thread.tab.contextMenu", "companion.overlay", "background.sidecar"]>>>;
175
+ workspaceTab: Schema.optional<Schema.Struct<{
176
+ defaultVisible: Schema.optional<typeof Schema.Boolean>;
177
+ defaultLabel: Schema.optional<typeof Schema.String>;
178
+ allowRename: Schema.optional<typeof Schema.Boolean>;
179
+ }>>;
180
+ }>>;
181
+ settingsPanels: Schema.Array$<Schema.Struct<{
182
+ contributionId: typeof Schema.String;
183
+ kind: Schema.Literal<["skillTemplate", "composerCapability", "surface", "settingsPanel", "sidecar", "bridge", "providerAdapter", "contextualAction", "dataEndpoint"]>;
184
+ displayName: typeof Schema.String;
185
+ requiredHostCapabilities: Schema.Array$<Schema.Literal<["host.windows", "host.tray", "host.notifications", "host.embeddedViews", "host.filePicker", "host.localShell", "host.secretPrompt", "host.visualSelection", "host.localFilesystem", "host.terminal", "host.globalInput", "host.contextMenus", "host.accessibility"]>>;
186
+ requiredKernelPermissions: Schema.optional<Schema.Array$<Schema.Literal<["kernel.registry.read", "plugin.lifecycle.manage", "host.capabilities.read", "surface.render", "composer.capabilities.read", "composer.capabilities.invoke", "sidecars.launch", "threads.read", "threads.write", "settings.read", "settings.write", "artifacts.read", "artifacts.write", "screenshots.capture", "brain.read", "host.context.read", "host.command.invoke", "host.log.write"]>>>;
187
+ routeSegment: Schema.optional<typeof Schema.String>;
188
+ mount: Schema.optional<typeof Schema.String>;
189
+ presentationClass: Schema.optional<typeof Schema.String>;
190
+ hostSlots: Schema.optional<Schema.Array$<Schema.Literal<["nav.sidebar", "workspace.surface", "settings.extensions", "chat.visual", "thread.tab.contextMenu", "companion.overlay", "background.sidecar"]>>>;
191
+ workspaceTab: Schema.optional<Schema.Struct<{
192
+ defaultVisible: Schema.optional<typeof Schema.Boolean>;
193
+ defaultLabel: Schema.optional<typeof Schema.String>;
194
+ allowRename: Schema.optional<typeof Schema.Boolean>;
195
+ }>>;
196
+ }>>;
197
+ contributions: Schema.Array$<Schema.Struct<{
198
+ contributionId: typeof Schema.String;
199
+ kind: Schema.Literal<["skillTemplate", "composerCapability", "surface", "settingsPanel", "sidecar", "bridge", "providerAdapter", "contextualAction", "dataEndpoint"]>;
200
+ displayName: typeof Schema.String;
201
+ requiredHostCapabilities: Schema.Array$<Schema.Literal<["host.windows", "host.tray", "host.notifications", "host.embeddedViews", "host.filePicker", "host.localShell", "host.secretPrompt", "host.visualSelection", "host.localFilesystem", "host.terminal", "host.globalInput", "host.contextMenus", "host.accessibility"]>>;
202
+ requiredKernelPermissions: Schema.optional<Schema.Array$<Schema.Literal<["kernel.registry.read", "plugin.lifecycle.manage", "host.capabilities.read", "surface.render", "composer.capabilities.read", "composer.capabilities.invoke", "sidecars.launch", "threads.read", "threads.write", "settings.read", "settings.write", "artifacts.read", "artifacts.write", "screenshots.capture", "brain.read", "host.context.read", "host.command.invoke", "host.log.write"]>>>;
203
+ routeSegment: Schema.optional<typeof Schema.String>;
204
+ mount: Schema.optional<typeof Schema.String>;
205
+ presentationClass: Schema.optional<typeof Schema.String>;
206
+ hostSlots: Schema.optional<Schema.Array$<Schema.Literal<["nav.sidebar", "workspace.surface", "settings.extensions", "chat.visual", "thread.tab.contextMenu", "companion.overlay", "background.sidecar"]>>>;
207
+ workspaceTab: Schema.optional<Schema.Struct<{
208
+ defaultVisible: Schema.optional<typeof Schema.Boolean>;
209
+ defaultLabel: Schema.optional<typeof Schema.String>;
210
+ allowRename: Schema.optional<typeof Schema.Boolean>;
211
+ }>>;
212
+ }>>;
213
+ sidecars: Schema.Array$<Schema.Struct<{
214
+ sidecarId: typeof Schema.String;
215
+ displayName: typeof Schema.String;
216
+ pluginId: Schema.optional<typeof Schema.String>;
217
+ transport: Schema.Literal<["stdio", "http", "websocket"]>;
218
+ requestedHostCapabilities: Schema.Array$<Schema.Literal<["host.windows", "host.tray", "host.notifications", "host.embeddedViews", "host.filePicker", "host.localShell", "host.secretPrompt", "host.visualSelection", "host.localFilesystem", "host.terminal", "host.globalInput", "host.contextMenus", "host.accessibility"]>>;
219
+ }>>;
220
+ bridges: Schema.Array$<Schema.Struct<{
221
+ bridgeId: typeof Schema.String;
222
+ displayName: typeof Schema.String;
223
+ adapterKind: Schema.Literal<["kyberbot", "generic"]>;
224
+ pluginId: Schema.optional<typeof Schema.String>;
225
+ transport: Schema.Literal<["stdio", "http", "websocket"]>;
226
+ commandTypes: Schema.Array$<typeof Schema.String>;
227
+ eventTypes: Schema.Array$<typeof Schema.String>;
228
+ }>>;
229
+ permissions: Schema.Array$<Schema.Literal<["kernel.registry.read", "plugin.lifecycle.manage", "host.capabilities.read", "surface.render", "composer.capabilities.read", "composer.capabilities.invoke", "sidecars.launch", "threads.read", "threads.write", "settings.read", "settings.write", "artifacts.read", "artifacts.write", "screenshots.capture", "brain.read", "host.context.read", "host.command.invoke", "host.log.write"]>>;
230
+ deniedPermissions: Schema.Array$<Schema.Literal<["kernel.registry.read", "plugin.lifecycle.manage", "host.capabilities.read", "surface.render", "composer.capabilities.read", "composer.capabilities.invoke", "sidecars.launch", "threads.read", "threads.write", "settings.read", "settings.write", "artifacts.read", "artifacts.write", "screenshots.capture", "brain.read", "host.context.read", "host.command.invoke", "host.log.write"]>>;
231
+ themeTokens: Schema.Array$<Schema.Struct<{
232
+ themeId: typeof Schema.String;
233
+ label: typeof Schema.String;
234
+ description: Schema.optional<typeof Schema.String>;
235
+ modes: Schema.Array$<Schema.Literal<["light", "dark"]>>;
236
+ tokens: Schema.Record$<Schema.Literal<["light", "dark"]>, Schema.Record$<typeof Schema.String, typeof Schema.String>>;
237
+ }>>;
238
+ hostCapabilities: Schema.Array$<Schema.Literal<["host.windows", "host.tray", "host.notifications", "host.embeddedViews", "host.filePicker", "host.localShell", "host.secretPrompt", "host.visualSelection", "host.localFilesystem", "host.terminal", "host.globalInput", "host.contextMenus", "host.accessibility"]>>;
239
+ providerProjections: Schema.Array$<Schema.Struct<{
240
+ target: Schema.Literal<["direct-api", "codex-app-server", "claude-agent-sdk", "pi-agent-core"]>;
241
+ surface: Schema.Literal<["tool-schema", "dynamic-tool", "mcp-server", "skill-context", "host-surface"]>;
242
+ runtimeSourceId: Schema.optional<typeof Schema.String>;
243
+ namespace: Schema.optional<typeof Schema.String>;
244
+ toolIds: Schema.optional<Schema.Array$<typeof Schema.String>>;
245
+ alwaysLoad: Schema.optional<typeof Schema.Boolean>;
246
+ notes: Schema.optional<Schema.Array$<typeof Schema.String>>;
247
+ }>>;
248
+ outboundOrigins: Schema.Array$<typeof Schema.String>;
249
+ ships: Schema.optional<Schema.Literal<["active", "inactive"]>>;
250
+ }>;
251
+ type NormalizedPluginExtensionContributionSet = Schema.Schema.Type<typeof NormalizedPluginExtensionContributionSet>;
252
+
253
+ declare const SidecarDeclaration: Schema.Struct<{
254
+ sidecarId: typeof Schema.String;
255
+ displayName: typeof Schema.String;
256
+ pluginId: Schema.optional<typeof Schema.String>;
257
+ transport: Schema.Literal<["stdio", "http", "websocket"]>;
258
+ requestedHostCapabilities: Schema.Array$<Schema.Literal<["host.windows", "host.tray", "host.notifications", "host.embeddedViews", "host.filePicker", "host.localShell", "host.secretPrompt", "host.visualSelection", "host.localFilesystem", "host.terminal", "host.globalInput", "host.contextMenus", "host.accessibility"]>>;
259
+ }>;
260
+ type SidecarDeclaration = Schema.Schema.Type<typeof SidecarDeclaration>;
261
+
262
+ declare const BridgeDeclaration: Schema.Struct<{
263
+ bridgeId: typeof Schema.String;
264
+ displayName: typeof Schema.String;
265
+ adapterKind: Schema.Literal<["kyberbot", "generic"]>;
266
+ pluginId: Schema.optional<typeof Schema.String>;
267
+ transport: Schema.Literal<["stdio", "http", "websocket"]>;
268
+ commandTypes: Schema.Array$<typeof Schema.String>;
269
+ eventTypes: Schema.Array$<typeof Schema.String>;
270
+ }>;
271
+ type BridgeDeclaration = Schema.Schema.Type<typeof BridgeDeclaration>;
272
+
273
+ /** A host-attested active-agent name. Branded so an unvalidated string can't
274
+ * masquerade as the active agent — mint it only via {@link makeAgentId} (or the
275
+ * wire decode, which the route stamps host-side; never trust a payload value). */
276
+ declare const AgentId: Schema.brand<typeof Schema.String, "AgentId">;
277
+ type AgentId = Schema.Schema.Type<typeof AgentId>;
278
+ /** Mint an {@link AgentId} from a host-attested name. Throws on blank — the brand is
279
+ * not a licence to thread an empty name. Lowercased to match the agent-registry key
280
+ * convention (the route + proxy already lowercase). */
281
+ declare function makeAgentId(attestedName: string): AgentId;
282
+ /**
283
+ * The typed argument bag for `op:'query'` — carried in `SeamRequest.payload`.
284
+ * `filter` is an op-specific predicate bag (extension-interpreted); `limit`
285
+ * caps the row count. The runtime validates this before dispatching a query, so
286
+ * a malformed query is a typed `seam.invalid_query`, not a handler surprise.
287
+ */
288
+ declare const SeamQueryPayload: Schema.Struct<{
289
+ filter: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
290
+ limit: Schema.optional<Schema.refine<number, typeof Schema.NonNegative>>;
291
+ }>;
292
+ type SeamQueryPayload = Schema.Schema.Type<typeof SeamQueryPayload>;
293
+ /**
294
+ * The typed argument bag for `op:'describe'` — flow ⑤ config cadence. The host
295
+ * pushes its current config state (model / mode) and the extension returns the
296
+ * contributions valid for that state. Read at init and on config CHANGE, not per
297
+ * keystroke — a cadence, not a stream. The runtime validates this before
298
+ * dispatch, so a malformed describe is a typed `seam.invalid_describe`.
299
+ */
300
+ declare const SeamDescribePayload: Schema.Struct<{
301
+ model: Schema.optional<typeof Schema.String>;
302
+ mode: Schema.optional<typeof Schema.String>;
303
+ }>;
304
+ type SeamDescribePayload = Schema.Schema.Type<typeof SeamDescribePayload>;
305
+ /**
306
+ * The typed argument bag for `op:'invoke'` — flow ① composer dispatch. The host
307
+ * invokes a named command an extension declared (mirroring the skill path
308
+ * `/skills/:name/invoke`, but routed over the seam): `commandId` selects which
309
+ * declared command, `args` is the invocation bag. The runtime validates this
310
+ * before dispatch, so a malformed invoke is a typed `seam.invalid_invoke`.
311
+ */
312
+ declare const SeamInvokePayload: Schema.Struct<{
313
+ commandId: typeof Schema.String;
314
+ args: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
315
+ }>;
316
+ type SeamInvokePayload = Schema.Schema.Type<typeof SeamInvokePayload>;
317
+ /**
318
+ * The result-bearing response — the piece BridgeCommandResponse lacks. A
319
+ * discriminated union on `ok`: success carries `data`, failure carries `error`.
320
+ */
321
+ declare const SeamResponse: Schema.Union<[Schema.Struct<{
322
+ ok: Schema.Literal<[true]>;
323
+ data: typeof Schema.Unknown;
324
+ }>, Schema.Struct<{
325
+ ok: Schema.Literal<[false]>;
326
+ error: Schema.Struct<{
327
+ code: typeof Schema.String;
328
+ message: typeof Schema.String;
329
+ details: Schema.optional<typeof Schema.Unknown>;
330
+ }>;
331
+ }>]>;
332
+ type SeamResponse = Schema.Schema.Type<typeof SeamResponse>;
333
+ /**
334
+ * A push event emitted by a contribution (flow ④). Distinct from the transport's
335
+ * BridgeEventEnvelope: this is addressed at the seam level (extension +
336
+ * contribution), not the bridge level.
337
+ */
338
+ declare const SeamEvent: Schema.Struct<{
339
+ extensionId: typeof Schema.String;
340
+ contributionId: typeof Schema.String;
341
+ type: typeof Schema.String;
342
+ payload: Schema.Record$<typeof Schema.String, typeof Schema.Unknown>;
343
+ observedAtMs: Schema.refine<number, typeof Schema.NonNegative>;
344
+ }>;
345
+ type SeamEvent = Schema.Schema.Type<typeof SeamEvent>;
346
+ /**
347
+ * A standing subscription to a contribution's events — the filter the host
348
+ * registers so only matching SeamEvents are pushed to it.
349
+ */
350
+ declare const Subscription: Schema.Struct<{
351
+ subscriptionId: typeof Schema.String;
352
+ extensionId: typeof Schema.String;
353
+ contributionId: typeof Schema.String;
354
+ eventTypes: Schema.optional<Schema.Array$<typeof Schema.String>>;
355
+ }>;
356
+ type Subscription = Schema.Schema.Type<typeof Subscription>;
357
+
358
+ declare const HostCapabilityId: Schema.Literal<["host.windows", "host.tray", "host.notifications", "host.embeddedViews", "host.filePicker", "host.localShell", "host.secretPrompt", "host.visualSelection", "host.localFilesystem", "host.terminal", "host.globalInput", "host.contextMenus", "host.accessibility"]>;
359
+ type HostCapabilityId = Schema.Schema.Type<typeof HostCapabilityId>;
360
+
361
+ /**
362
+ * The host↔extension seam, as interfaces — the Phase-2 spine of the SDK-coherence
363
+ * program (docs/61). This is the GROWN contract that docs/62 (HOST port), docs/63
364
+ * (EXT port) and docs/64 (responsibility map) describe; this file is the real,
365
+ * compiler-checked TypeScript those docs annotate. The markdown explains the WHY;
366
+ * THIS is the deliverable.
367
+ *
368
+ * FREEZE STATUS (ADR-5 + ADR-6): this module is the contract — mostly type-only
369
+ * (the port interfaces, SeamCallContext, BlockedReason). It also holds a SMALL,
370
+ * SANCTIONED runtime core: the shared gate factory `gatedHostPort`, the branded
371
+ * construction helpers `makeAgentId`/`makeSeamCallContext`, and `SeamPermissionDenied`.
372
+ * Per ADR-6 these live HERE deliberately so the Phase-5 production host and the
373
+ * InMemoryHost import the IDENTICAL gate — the "same gate" guarantee is structural,
374
+ * not a doc claim. That is the only runtime here; the conforming IMPLEMENTATIONS (the
375
+ * production host adapter, per-extension answering ports) still land in **Phase 5**.
376
+ *
377
+ * TRANSITION NOTE: the canonical host port lives here as `HostPort`, and the brain
378
+ * port types are now defined HERE (the canonical home). The narrow 1-channel
379
+ * `ExtensionHostPort` in `./testing/host-port.ts` re-exports these and is the seed
380
+ * `InMemoryHost` still implements for back-compat; Phase 5 retires it once the
381
+ * grown `HostPort` path is the only one.
382
+ */
383
+
384
+ type BrainStatsView = {
385
+ entities: number;
386
+ notes: number;
387
+ };
388
+ type BrainHit = {
389
+ id: string;
390
+ title: string;
391
+ score: number;
392
+ };
393
+ /** The read surface an extension receives for the brain channel (host-owned). */
394
+ interface BrainReadPort {
395
+ stats(): Promise<BrainStatsView>;
396
+ query(text: string, opts?: {
397
+ limit?: number;
398
+ }): Promise<BrainHit[]>;
399
+ }
400
+ /** The host-attested principal. Carries HOW it was attested; it is stamped host-side
401
+ * (frame origin / session) and NEVER read from a request payload (DIV-5). */
402
+ interface VerifiedPrincipal {
403
+ readonly kind: KernelPrincipalKind;
404
+ readonly id: string;
405
+ /** The trust source. Absence of a known source ⇒ untrusted. */
406
+ readonly attestedBy: 'frame-origin' | 'session';
407
+ }
408
+ /** Injected with every host port and passed into every EXT-port call. The active
409
+ * agent rides HERE (ambient), not as a per-method argument — so no dispatch path
410
+ * can forget or forge it. */
411
+ interface SeamCallContext {
412
+ readonly principal: VerifiedPrincipal;
413
+ readonly activeAgent: AgentId;
414
+ readonly hostId?: string;
415
+ readonly requestedAtMs: number;
416
+ }
417
+ /** The host-context snapshot an extension may READ over the gated seam (host stays
418
+ * the holder; the extension only ever gets a serialized snapshot). */
419
+ interface HostContextSnapshot {
420
+ readonly activeAgent: AgentId;
421
+ readonly [key: string]: unknown;
422
+ }
423
+ /** host.context.read — a gated read of the serialized host context. */
424
+ interface HostContextPort {
425
+ snapshot(): Promise<HostContextSnapshot>;
426
+ }
427
+ /** A command the host advertises as invokable-by-name (the allowlist entry). */
428
+ interface HostCommandDescriptor {
429
+ readonly commandId: string;
430
+ readonly displayName: string;
431
+ }
432
+ /** host.command.invoke — the extension ASKS the host to run an allowlisted command
433
+ * by name; the host authorizes + runs it. The extension never acts directly. */
434
+ interface HostCommandPort {
435
+ describe(): Promise<readonly HostCommandDescriptor[]>;
436
+ invoke(commandId: string, args?: Record<string, unknown>): Promise<SeamResponse>;
437
+ }
438
+ /** Events the host pushes to a subscribing extension (host→ext leg of the Events
439
+ * contract). Optional on the host port pending the docs/63 D6 ownership call. */
440
+ interface HostEventPort {
441
+ subscribe(sub: Subscription, emit: (event: SeamEvent) => void): () => void;
442
+ }
443
+ /** The grown HOST port. One interface carrying the host-owned contracts; the active
444
+ * agent + principal ride on `ctx`. Both the production host AND `InMemoryHost`
445
+ * implement this (Phase 5). Supersedes the narrow `ExtensionHostPort` seed. */
446
+ interface HostPort {
447
+ readonly ctx: SeamCallContext;
448
+ readonly brain: BrainReadPort;
449
+ readonly context: HostContextPort;
450
+ readonly command: HostCommandPort;
451
+ readonly events?: HostEventPort;
452
+ }
453
+ /** The shared gate (declaration is NOT the grant — DIV-2). BOTH adapters wrap their
454
+ * raw port in this single factory, so `InMemoryHost` enforces the SAME gate as
455
+ * production and a unit test can't pass where prod would deny (SDK-N3). The
456
+ * implementation (`gatedHostPort`, below) lives in THIS shared, non-testing module
457
+ * precisely so the production host can import the SAME factory — the "same gate"
458
+ * guarantee is structural, not a doc claim. */
459
+ type GatedHostPortFactory = (inner: HostPort, grants: ReadonlySet<KernelPermissionId>) => HostPort;
460
+ /** Why a port was withheld. A discriminated union, replacing the single opaque
461
+ * `'blocked'` runtime state (DIV-3); `inactive.scope` makes the per-agent vs
462
+ * machine question explicit (DIV-7). */
463
+ type BlockedReason = {
464
+ readonly cause: 'inactive';
465
+ readonly scope: 'agent' | 'machine';
466
+ } | {
467
+ readonly cause: 'missing-host-capability';
468
+ readonly missing: readonly HostCapabilityId[];
469
+ } | {
470
+ readonly cause: 'denied-permission';
471
+ readonly denied: readonly KernelPermissionId[];
472
+ } | {
473
+ readonly cause: 'unmet-requirement';
474
+ readonly requirement: 'remote-config' | 'dependency-install' | 'connector-auth';
475
+ readonly detail?: string;
476
+ };
477
+ /** The activation authority's verdict (docs/64 §4): hand over a gated port, or
478
+ * withhold it with a typed cause. The runner calls this BEFORE injecting a port. */
479
+ type PortInjectionResult = {
480
+ readonly ok: true;
481
+ readonly port: HostPort;
482
+ } | {
483
+ readonly ok: false;
484
+ readonly blocked: BlockedReason;
485
+ };
486
+ /** kind: dataEndpoint — Data contract. Headless; answers a query with its OWN rows. */
487
+ interface DataEndpointPort {
488
+ query(payload: SeamQueryPayload, ctx: SeamCallContext): Promise<ReadonlyArray<Record<string, unknown>>>;
489
+ }
490
+ /** What a composer capability advertises as valid for a given host config. */
491
+ interface ComposerDescriptor {
492
+ readonly commands: readonly {
493
+ readonly commandId: string;
494
+ readonly displayName: string;
495
+ }[];
496
+ }
497
+ /** kind: composerCapability — Composer contract. Describe valid commands, then run one. */
498
+ interface ComposerCapabilityPort {
499
+ describe(payload: SeamDescribePayload, ctx: SeamCallContext): Promise<ComposerDescriptor>;
500
+ invoke(payload: SeamInvokePayload, ctx: SeamCallContext): Promise<SeamResponse>;
501
+ }
502
+ /** kind: contextualAction / chat source — Chat contract. A single invoke round-trip. */
503
+ interface InvokablePort {
504
+ invoke(payload: SeamInvokePayload, ctx: SeamCallContext): Promise<SeamResponse>;
505
+ }
506
+ /** Events contract — the ext emits; the host subscribes with a filter. subscribe +
507
+ * push are two methods of ONE port (resolves the docs/56 "two-directions" flag). */
508
+ interface EventSourcePort {
509
+ subscribe(sub: Subscription, emit: (event: SeamEvent) => void, ctx: SeamCallContext): () => void;
510
+ }
511
+ /** Any contribution the host may call into. RENDERING kinds (surface, settingsPanel)
512
+ * implement none of these — they render and CONSUME the host port instead. */
513
+ type AnsweringPort = DataEndpointPort | ComposerCapabilityPort | InvokablePort | EventSourcePort;
514
+ /** What the runner (production host, or `InMemoryHost` in tests) gives and gets for
515
+ * one extension: the injected, already-gated HOST port it consumes, and the
516
+ * answering EXT ports — keyed by contributionId — the host may call. */
517
+ interface ExtensionRuntime {
518
+ readonly host: HostPort;
519
+ readonly contributions: ReadonlyMap<string, AnsweringPort>;
520
+ }
521
+ /** Assemble a SeamCallContext from already-attested parts. */
522
+ declare function makeSeamCallContext(parts: {
523
+ principal: VerifiedPrincipal;
524
+ activeAgent: AgentId;
525
+ hostId?: string;
526
+ requestedAtMs: number;
527
+ }): SeamCallContext;
528
+ /** Thrown by a gated host port when a host-owned capability is reached without its
529
+ * grant (C5). Carries the missing permission so callers can map it to a typed
530
+ * `seam.permission_denied` SeamError. */
531
+ declare class SeamPermissionDenied extends Error {
532
+ readonly permission: KernelPermissionId;
533
+ readonly code: "seam.permission_denied";
534
+ constructor(permission: KernelPermissionId);
535
+ }
536
+ /**
537
+ * The shared permission gate. BOTH the production host (Phase 5) and `InMemoryHost`
538
+ * wrap their raw `HostPort` in THIS one factory, so the in-memory harness enforces
539
+ * the SAME gate as production (SDK-N3 / docs/62 §3). Access to a host-owned
540
+ * capability without its grant throws a typed `SeamPermissionDenied` (C5). Events
541
+ * are ext-owned and ungated (docs/63 D6). Lives in this shared, non-testing module
542
+ * so the production host can import it directly — no test-module dependency.
543
+ */
544
+ declare const gatedHostPort: GatedHostPortFactory;
545
+
546
+ declare const EXTENSION_HOST_SLOTS: readonly ["nav.sidebar", "workspace.surface", "settings.extensions", "chat.visual", "thread.tab.contextMenu", "companion.overlay", "background.sidecar"];
547
+ type ExtensionSurfaceDefinition = PluginManifestContribution & {
548
+ kind: 'surface';
549
+ };
550
+ type ExtensionWorkspaceTabDefinition = WorkspaceTabContributionMetadata;
551
+ type ExtensionSettingsPanelDefinition = PluginManifestContribution & {
552
+ kind: 'settingsPanel';
553
+ };
554
+ type ExtensionComposerCapabilityDefinition = PluginManifestContribution & {
555
+ kind: 'composerCapability';
556
+ };
557
+ type ExtensionContextualActionDefinition = PluginManifestContribution & {
558
+ kind: 'contextualAction';
559
+ };
560
+ type ExtensionSidecarContributionDefinition = PluginManifestContribution & {
561
+ kind: 'sidecar';
562
+ };
563
+ type ExtensionBridgeContributionDefinition = PluginManifestContribution & {
564
+ kind: 'bridge';
565
+ };
566
+ /**
567
+ * A headless, queryable data source addressed by the seam `query` op. Distinct
568
+ * from a surface (which renders): a data endpoint *answers* queries and may have
569
+ * no UI at all (e.g. agent-only data, or a remote agent with no renderer). One
570
+ * endpoint can back many surfaces — they query it, they don't own its data.
571
+ */
572
+ type ExtensionDataEndpointDefinition = PluginManifestContribution & {
573
+ kind: 'dataEndpoint';
574
+ };
575
+ type ExtensionContributionDefinition = ExtensionSurfaceDefinition | ExtensionSettingsPanelDefinition | ExtensionComposerCapabilityDefinition | ExtensionContextualActionDefinition | ExtensionSidecarContributionDefinition | ExtensionBridgeContributionDefinition | ExtensionDataEndpointDefinition | PluginManifestContribution;
576
+ type ExtensionDefinition = {
577
+ pluginId: string;
578
+ displayName: string;
579
+ version?: string;
580
+ ships?: PluginShipsState;
581
+ contributions?: readonly ExtensionContributionDefinition[];
582
+ surfaces?: readonly ExtensionSurfaceDefinition[];
583
+ settingsPanels?: readonly ExtensionSettingsPanelDefinition[];
584
+ composerCapabilities?: readonly ExtensionComposerCapabilityDefinition[];
585
+ contextualActions?: readonly ExtensionContextualActionDefinition[];
586
+ sidecarContributions?: readonly ExtensionSidecarContributionDefinition[];
587
+ bridgeContributions?: readonly ExtensionBridgeContributionDefinition[];
588
+ dataEndpoints?: readonly ExtensionDataEndpointDefinition[];
589
+ sidecars?: readonly SidecarDeclaration[];
590
+ bridges?: readonly BridgeDeclaration[];
591
+ themeTokens?: readonly PluginThemeTokenSet[];
592
+ hostCapabilities?: readonly HostCapabilityId[];
593
+ providerProjections?: readonly ProviderRuntimeProjectionDescriptor[];
594
+ permissions?: readonly KernelPermissionId[];
595
+ deniedPermissions?: readonly KernelPermissionId[];
596
+ outboundOrigins?: readonly string[];
597
+ };
598
+ /** The contributionId half of a builder input: EITHER typed key fields (derived)
599
+ * OR a legacy raw string (deprecated). The XOR keeps authors from supplying both. */
600
+ type ContributionKeyInput = {
601
+ ext: string;
602
+ name?: string;
603
+ contributionId?: undefined;
604
+ } | {
605
+ contributionId: string;
606
+ ext?: undefined;
607
+ name?: undefined;
608
+ };
609
+ /** A builder input = the contribution's own fields (minus kind + the id) plus the
610
+ * id supplied as typed fields or a legacy string. */
611
+ type BuilderInput<T extends PluginManifestContribution> = Omit<T, 'kind' | 'contributionId'> & ContributionKeyInput;
612
+ declare function defineSurface(surface: BuilderInput<ExtensionSurfaceDefinition>): ExtensionSurfaceDefinition;
613
+ declare function defineSettingsPanel(panel: BuilderInput<ExtensionSettingsPanelDefinition>): ExtensionSettingsPanelDefinition;
614
+ declare function defineComposerCapability(capability: BuilderInput<ExtensionComposerCapabilityDefinition>): ExtensionComposerCapabilityDefinition;
615
+ declare function defineContextualAction(action: BuilderInput<ExtensionContextualActionDefinition>): ExtensionContextualActionDefinition;
616
+ declare function defineSidecarContribution(sidecar: BuilderInput<ExtensionSidecarContributionDefinition>): ExtensionSidecarContributionDefinition;
617
+ declare function defineBridgeContribution(bridge: BuilderInput<ExtensionBridgeContributionDefinition>): ExtensionBridgeContributionDefinition;
618
+ declare function defineDataEndpoint(endpoint: Omit<BuilderInput<ExtensionDataEndpointDefinition>, 'requiredHostCapabilities'> & {
619
+ requiredHostCapabilities?: ExtensionDataEndpointDefinition['requiredHostCapabilities'];
620
+ }): ExtensionDataEndpointDefinition;
621
+ declare function defineSidecar(sidecar: SidecarDeclaration): SidecarDeclaration;
622
+ declare function defineBridge(bridge: BridgeDeclaration): BridgeDeclaration;
623
+ declare function defineThemeTokens(themeTokens: PluginThemeTokenSet): PluginThemeTokenSet;
624
+ declare function defineProviderRuntimeProjection(projection: ProviderRuntimeProjectionDescriptor): ProviderRuntimeProjectionDescriptor;
625
+ declare function defineExtension(definition: ExtensionDefinition): ExtensionDefinition;
626
+ declare function emitExtensionContributionSet(definition: ExtensionDefinition): NormalizedPluginExtensionContributionSet;
627
+ declare function requiresHostCapabilities(...capabilities: HostCapabilityId[]): HostCapabilityId[];
628
+ /**
629
+ * The ONE canonical "no host capability" form (C14 / NEW-E5). "None" was expressed
630
+ * three ways — `requiresHostCapabilities()` (empty call), `[]`, and omitted — which
631
+ * drifted across plugins. This collapses all three to a single value: `undefined`/`[]`
632
+ * → `[]`. Duplicates are removed but DECLARED ORDER IS PRESERVED, so normalizing an
633
+ * existing non-empty declaration never reorders a generated manifest (no drift).
634
+ */
635
+ declare function canonicalHostCapabilities(value?: readonly HostCapabilityId[]): readonly HostCapabilityId[];
636
+ declare function requiresKernelPermissions(...permissions: KernelPermissionId[]): KernelPermissionId[];
637
+ declare function hostSlots(...slots: ExtensionHostSlot[]): ExtensionHostSlot[];
638
+ declare function workspaceTab(tab?: ExtensionWorkspaceTabDefinition): ExtensionWorkspaceTabDefinition;
639
+ declare function validateExtensionDefinition(definition: ExtensionDefinition): string[];
640
+ /**
641
+ * Cross-reference invariant (C15 / SDK-N2): contribution ⊆ extension — for KERNEL
642
+ * PERMISSIONS. A contribution may only require a kernel permission the extension
643
+ * DECLARES at the top level. "Declared" = `permissions` ∪ `deniedPermissions`: the
644
+ * extension must own the permission in its manifest, but it may be in the DENIED bucket
645
+ * — the gate decides grant-vs-deny at runtime (the default-deny model, KYB-176). A
646
+ * contribution requiring a permission the extension declares NOWHERE (neither granted
647
+ * nor denied) is the real breach, because the extension never owned it. Returns one
648
+ * error per breach.
649
+ *
650
+ * HOST CAPABILITIES are deliberately NOT subset-checked (DIV-8, 2026-06-30): the
651
+ * codebase models them as contribution-scoped — 16 of 17 first-party plugins declare
652
+ * host capabilities only at the contribution level, and the real host-capability
653
+ * invariant ("can this surface render on this host?") is checked host-side per
654
+ * contribution (KernelSurfaceAvailability), not as a subset of an extension-level list.
655
+ * `deriveExtensionHostCapabilities` exposes the union for reporting if a caller wants
656
+ * the extension's total host-capability footprint.
657
+ */
658
+ declare function validateDefinitionCrossRefs(definition: ExtensionDefinition): string[];
659
+ /**
660
+ * The extension's total host-capability footprint: the union of every contribution's
661
+ * `requiredHostCapabilities` plus any declared at the extension level (DIV-8). Derived,
662
+ * not hand-authored — so it can't drift from what the contributions actually need.
663
+ */
664
+ declare function deriveExtensionHostCapabilities(definition: ExtensionDefinition): readonly HostCapabilityId[];
665
+
666
+ export { defineContextualAction as $, type AnsweringPort as A, type BrainReadPort as B, type ComposerCapabilityPort as C, type DataEndpointPort as D, type ExtensionDefinition as E, type HostEventPort as F, type GatedHostPortFactory as G, type HostPort as H, type InvokablePort as I, KernelPluginRegistryEntry as J, KernelPermissionId as K, KernelRegistrySnapshot as L, PluginManifestContribution as M, NormalizedPluginExtensionContributionSet as N, PluginShipsState as O, type PortInjectionResult as P, PluginThemeTokenSet as Q, ProviderRuntimeProjectionDescriptor as R, type SeamCallContext as S, SeamPermissionDenied as T, SidecarDeclaration as U, type VerifiedPrincipal as V, WorkspaceTabContributionMetadata as W, canonicalHostCapabilities as X, defineBridge as Y, defineBridgeContribution as Z, defineComposerCapability as _, type BrainStatsView as a, defineDataEndpoint as a0, defineExtension as a1, defineProviderRuntimeProjection as a2, defineSettingsPanel as a3, defineSidecar as a4, defineSidecarContribution as a5, defineSurface as a6, defineThemeTokens as a7, deriveExtensionHostCapabilities as a8, emitExtensionContributionSet as a9, gatedHostPort as aa, hostSlots as ab, makeAgentId as ac, makeSeamCallContext as ad, requiresHostCapabilities as ae, requiresKernelPermissions as af, validateDefinitionCrossRefs as ag, validateExtensionDefinition as ah, workspaceTab as ai, type BrainHit as b, SeamResponse as c, AgentId as d, type BlockedReason as e, BridgeDeclaration as f, type ComposerDescriptor as g, type ContributionKeyInput as h, EXTENSION_HOST_SLOTS as i, type EventSourcePort as j, type ExtensionBridgeContributionDefinition as k, type ExtensionComposerCapabilityDefinition as l, type ExtensionContextualActionDefinition as m, type ExtensionContributionDefinition as n, type ExtensionDataEndpointDefinition as o, ExtensionHostSlot as p, type ExtensionRuntime as q, type ExtensionSettingsPanelDefinition as r, type ExtensionSidecarContributionDefinition as s, type ExtensionSurfaceDefinition as t, type ExtensionWorkspaceTabDefinition as u, HostCapabilityId as v, type HostCommandDescriptor as w, type HostCommandPort as x, type HostContextPort as y, type HostContextSnapshot as z };