@voltius/plugin-types 0.25.0 → 0.26.1
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/index.d.ts +81 -6
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -81,6 +81,8 @@ export interface AppTheme {
|
|
|
81
81
|
uiFontSize: number;
|
|
82
82
|
terminalFontFamily: string;
|
|
83
83
|
terminalFontSize: number;
|
|
84
|
+
/** xterm lineHeight multiplier; optional for themes saved before it existed (defaults to 1). */
|
|
85
|
+
terminalLineHeight?: number;
|
|
84
86
|
ui: UITheme;
|
|
85
87
|
terminal: TerminalTheme;
|
|
86
88
|
}
|
|
@@ -120,7 +122,25 @@ export type PluginAuditAction =
|
|
|
120
122
|
| "agent.member_role_changed"
|
|
121
123
|
| "agent.session_shared"
|
|
122
124
|
| "agent.session_unshared"
|
|
123
|
-
| "agent.control_granted"
|
|
125
|
+
| "agent.control_granted"
|
|
126
|
+
// A setting an agent changed. Local to the device: a settings verb's scope
|
|
127
|
+
// resolves no connection and no team, so runtime.ts files the row under the
|
|
128
|
+
// "personal" bucket audit.query reads. Nothing to add to the server's
|
|
129
|
+
// CLIENT_WHITELIST.
|
|
130
|
+
| "agent.setting_changed"
|
|
131
|
+
// Plugin lifecycle and import/export (P9). Local to the device: these verbs
|
|
132
|
+
// resolve no connection and no team, so runtime.ts files their rows under the
|
|
133
|
+
// "personal" bucket audit.query reads. Nothing to add to the server's
|
|
134
|
+
// CLIENT_WHITELIST.
|
|
135
|
+
| "agent.plugin_installed"
|
|
136
|
+
| "agent.plugin_removed"
|
|
137
|
+
| "agent.plugin_enabled"
|
|
138
|
+
| "agent.plugin_disabled"
|
|
139
|
+
| "agent.plugin_updated"
|
|
140
|
+
| "agent.plugin_configured"
|
|
141
|
+
| "agent.marketplace_source_changed"
|
|
142
|
+
| "agent.objects_imported"
|
|
143
|
+
| "agent.objects_exported";
|
|
124
144
|
|
|
125
145
|
export type DomainResult<T> = { ok: true; result: T } | { ok: false; error: string };
|
|
126
146
|
|
|
@@ -854,8 +874,9 @@ export interface PortsAPI {
|
|
|
854
874
|
reach(req: ReachPortRequest): Promise<ReachPortResponse>;
|
|
855
875
|
}
|
|
856
876
|
|
|
857
|
-
/** A local audit row, projected. Drops the internal id, actor
|
|
858
|
-
* ids and IP — none of which a plugin or an external client
|
|
877
|
+
/** A local or team-server audit row, projected. Drops the internal id, actor
|
|
878
|
+
* id, team/vault ids and IP — none of which a plugin or an external client
|
|
879
|
+
* has any use for. */
|
|
859
880
|
export interface PluginAuditRow {
|
|
860
881
|
action: string;
|
|
861
882
|
actor_name: string;
|
|
@@ -869,6 +890,10 @@ export interface PluginAuditRow {
|
|
|
869
890
|
|
|
870
891
|
export interface PluginAuditQuery {
|
|
871
892
|
actions?: string[];
|
|
893
|
+
/** Reads that team's server-side log instead of the device's local sink. */
|
|
894
|
+
teamId?: string;
|
|
895
|
+
vaultId?: string;
|
|
896
|
+
actorId?: string;
|
|
872
897
|
/** ISO 8601. */
|
|
873
898
|
from?: string;
|
|
874
899
|
to?: string;
|
|
@@ -1174,11 +1199,34 @@ export interface PluginAPI {
|
|
|
1174
1199
|
metadata?: Record<string, unknown>,
|
|
1175
1200
|
localMetadata?: Record<string, unknown>,
|
|
1176
1201
|
): void;
|
|
1177
|
-
/**
|
|
1178
|
-
* are not returned here. */
|
|
1202
|
+
/** Local rows by default; pass `teamId` to read that team's server-side log instead. */
|
|
1179
1203
|
query(filters: PluginAuditQuery): Promise<{ logs: PluginAuditRow[]; total: number }>;
|
|
1180
1204
|
};
|
|
1181
1205
|
|
|
1206
|
+
// App settings — read the manifest and current values (requires the gated
|
|
1207
|
+
// "settings:read"); write one (requires the gated "settings:write").
|
|
1208
|
+
settings: {
|
|
1209
|
+
list(filter?: { section?: string; prefix?: string; writableOnly?: boolean }): SettingView[];
|
|
1210
|
+
get(key: string): SettingView | undefined;
|
|
1211
|
+
/** The sentence a guarded write must be refused with, or undefined when
|
|
1212
|
+
* writing `value` does not weaken any safeguard (re-enabling one never
|
|
1213
|
+
* does). Read-only — requires "settings:read". */
|
|
1214
|
+
consequenceOf(key: string, value: unknown): string | undefined;
|
|
1215
|
+
/** Writes, then RE-READS: a store setter may clamp or normalise, so
|
|
1216
|
+
* `effective` is the value that actually landed, not the one asked for,
|
|
1217
|
+
* and `coerced` says whether the two differ. Neither reports whether the
|
|
1218
|
+
* setting's value moved — writing the value it already held is a
|
|
1219
|
+
* successful write with `coerced: false`. */
|
|
1220
|
+
set(key: string, value: unknown): DomainResult<{
|
|
1221
|
+
key: string; requested: unknown; effective: unknown; coerced: boolean;
|
|
1222
|
+
}>;
|
|
1223
|
+
};
|
|
1224
|
+
|
|
1225
|
+
// The user's own plan and billing state (requires the gated "account:read")
|
|
1226
|
+
account: {
|
|
1227
|
+
subscription(): Promise<SubscriptionView>;
|
|
1228
|
+
};
|
|
1229
|
+
|
|
1182
1230
|
// Themes (requires "themes")
|
|
1183
1231
|
themes: {
|
|
1184
1232
|
register(theme: PluginTheme): void;
|
|
@@ -1392,12 +1440,39 @@ export interface PluginAPI {
|
|
|
1392
1440
|
importStates(encKey: string, blobs: string[]): Promise<void>;
|
|
1393
1441
|
};
|
|
1394
1442
|
|
|
1395
|
-
// Inter-plugin communication (always available)
|
|
1443
|
+
// Inter-plugin communication (always available), plus plugin inventory and
|
|
1444
|
+
// lifecycle (requires the gated "plugins:manage"). Configuration is limited
|
|
1445
|
+
// to keys the target plugin declares in `contributes.configuration`; raw
|
|
1446
|
+
// api.storage is deliberately not reachable.
|
|
1396
1447
|
plugins: {
|
|
1397
1448
|
/** Publish this plugin's public API surface so other plugins can consume it. */
|
|
1398
1449
|
expose(publicApi: unknown): void;
|
|
1399
1450
|
/** Get another plugin's exposed API. Returns null if not loaded or not exposed. */
|
|
1400
1451
|
getApi(pluginId: string): unknown | null;
|
|
1452
|
+
|
|
1453
|
+
list(): Promise<PluginView[]>;
|
|
1454
|
+
install(id: string): Promise<DomainResult<PluginView>>;
|
|
1455
|
+
uninstall(id: string): Promise<DomainResult<{ id: string }>>;
|
|
1456
|
+
setEnabled(id: string, enabled: boolean): Promise<DomainResult<PluginView>>;
|
|
1457
|
+
update(id: string): Promise<DomainResult<PluginView>>;
|
|
1458
|
+
config(id: string): Promise<DomainResult<Record<string, unknown>>>;
|
|
1459
|
+
configure(id: string, key: string, value: unknown): Promise<DomainResult<{ key: string; effective: unknown }>>;
|
|
1460
|
+
sources(): Promise<SourceView[]>;
|
|
1461
|
+
search(query?: string): Promise<MarketplacePlugin[]>;
|
|
1462
|
+
addSource(url: string): Promise<DomainResult<SourceView>>;
|
|
1463
|
+
removeSource(id: string): Promise<DomainResult<{ id: string }>>;
|
|
1464
|
+
};
|
|
1465
|
+
|
|
1466
|
+
// Bulk export (requires the gated "importexport:read") and import (requires
|
|
1467
|
+
// the gated "importexport:write"). A bundle carrying secrets is only ever
|
|
1468
|
+
// returned encrypted.
|
|
1469
|
+
importExport: {
|
|
1470
|
+
export(opts: {
|
|
1471
|
+
vaultIds: string[]; types: ExportType[]; format: "json" | "csv"; passphrase?: string;
|
|
1472
|
+
}): Promise<DomainResult<ExportResult>>;
|
|
1473
|
+
import(opts: {
|
|
1474
|
+
content: string; vaultId: string; passphrase?: string; dryRun: boolean;
|
|
1475
|
+
}): Promise<DomainResult<ImportResult>>;
|
|
1401
1476
|
};
|
|
1402
1477
|
|
|
1403
1478
|
// MCP tool contributions — GATED (mcp:contribute). Tools run with THIS
|