@getmateo/plugin 0.17.1 → 0.19.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/dist/client/contracts.d.ts +22 -1
- package/dist/client/index.d.ts +2 -1
- package/dist/client/react-native.d.ts +21 -0
- package/dist/index.d.ts +1 -0
- package/dist/server/contracts.d.ts +26 -2
- package/dist/server/index.d.ts +1 -1
- package/dist/server/lifecycle.d.ts +2 -2
- package/package.json +12 -7
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ComponentType } from "react";
|
|
2
2
|
import type { MateoApi } from "@getmateo/client";
|
|
3
3
|
import type { AgentTimelineItem } from "@getmateo/protocol/agent-types";
|
|
4
|
+
import type { BrowserDownloadRule } from "@getmateo/protocol/browser-download-rules";
|
|
4
5
|
import type { ZodType, input as ZodInput, output as ZodOutput } from "zod";
|
|
5
6
|
import type { PluginRpcContract } from "../rpc.js";
|
|
6
7
|
import type { PluginButtonRegistration, PluginHeaderButtonContribution, PluginComposerPillContribution } from "./buttons.js";
|
|
@@ -100,8 +101,9 @@ export interface PluginIconProps {
|
|
|
100
101
|
color?: string;
|
|
101
102
|
}
|
|
102
103
|
export type PluginPanelLocation = "workspace" | "explorer";
|
|
104
|
+
export type PluginPanelOpenLocation = PluginPanelLocation | "side";
|
|
103
105
|
export interface PluginOpenPanelOptions {
|
|
104
|
-
location?:
|
|
106
|
+
location?: PluginPanelOpenLocation;
|
|
105
107
|
}
|
|
106
108
|
interface PluginWorkspacePanelBase {
|
|
107
109
|
id: string;
|
|
@@ -128,7 +130,24 @@ interface PluginClientContextAliases {
|
|
|
128
130
|
/** @deprecated Use `addSidebarHeaderItem`. */
|
|
129
131
|
addSidebarItem(contribution: PluginSidebarContribution): PluginCleanup;
|
|
130
132
|
}
|
|
133
|
+
export interface PluginBrowserAccessInput {
|
|
134
|
+
workspaceId: string;
|
|
135
|
+
domains: readonly string[];
|
|
136
|
+
capability: "read" | "upload";
|
|
137
|
+
}
|
|
138
|
+
export interface PluginBrowserAccessResult {
|
|
139
|
+
granted: string[];
|
|
140
|
+
notGranted: string[];
|
|
141
|
+
}
|
|
142
|
+
export interface PluginBrowserAccess {
|
|
143
|
+
status(input: PluginBrowserAccessInput): Promise<PluginBrowserAccessResult>;
|
|
144
|
+
request(input: PluginBrowserAccessInput & {
|
|
145
|
+
reason: string;
|
|
146
|
+
}): Promise<PluginBrowserAccessResult>;
|
|
147
|
+
}
|
|
131
148
|
export interface PluginClientContext extends PluginCommandCapabilities, PluginClientContextAliases {
|
|
149
|
+
/** Present on the local desktop for an installation declaring browser domains. */
|
|
150
|
+
readonly browserAccess?: PluginBrowserAccess;
|
|
132
151
|
/** Play a base64-encoded audio file on this client; resolves when playback ends. */
|
|
133
152
|
playAudio(source: {
|
|
134
153
|
base64: string;
|
|
@@ -146,6 +165,8 @@ export interface PluginClientContext extends PluginCommandCapabilities, PluginCl
|
|
|
146
165
|
addHeaderButton(contribution: PluginHeaderButtonContribution): PluginButtonRegistration;
|
|
147
166
|
addComposerPill(contribution: PluginComposerPillContribution): PluginButtonRegistration;
|
|
148
167
|
addAttachmentSource(contribution: PluginAttachmentSourceContribution): PluginCleanup;
|
|
168
|
+
/** Route matching desktop browser downloads in one workspace on this installation's host. */
|
|
169
|
+
addBrowserDownloadRule(rule: BrowserDownloadRule): PluginCleanup;
|
|
149
170
|
addTheme(contribution: PluginThemeContribution): PluginCleanup;
|
|
150
171
|
addTerminalTheme(contribution: PluginTerminalThemeContribution): PluginCleanup;
|
|
151
172
|
addSidebarProjectGrouping(contribution: PluginSidebarProjectGroupingContribution): PluginCleanup;
|
package/dist/client/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
export type { PluginHostProps, PluginSurfaceProps, PluginScreenProps, PluginPopoverProps, PluginScreenParams, PluginOpenScreenInput, PluginScreenLocation, PluginSidebarItemProps, PluginSidebarItemContribution, PluginFloatingPanelProps, PluginFloatingPanelContribution, PluginIconProps, PluginPanelLocation, PluginOpenPanelOptions, PluginWorkspacePanelProps, PluginAgentPanelProps, PluginClientOpenPanelOptions, PluginClientContext, PluginClientContribution, PluginWorkspacePanelContribution, PluginSettingsScreenContribution, PluginSurfaceContribution, PluginScreenContribution, PluginScreenTitle, PluginSidebarContribution, PluginTimelineTransformerContribution, PluginTimelineItemProps, PluginTimelineRendererContribution, PluginCommandCapabilities, PluginGlobalCommandContext, PluginWorkspaceCommandContext, PluginAgentCommandContext, PluginCommandCenterItemContribution, PluginClientSlashCommandContribution, SettingsState, } from "./contracts.js";
|
|
1
|
+
export type { PluginHostProps, PluginSurfaceProps, PluginScreenProps, PluginPopoverProps, PluginScreenParams, PluginOpenScreenInput, PluginScreenLocation, PluginSidebarItemProps, PluginSidebarItemContribution, PluginFloatingPanelProps, PluginFloatingPanelContribution, PluginIconProps, PluginPanelLocation, PluginPanelOpenLocation, PluginOpenPanelOptions, PluginWorkspacePanelProps, PluginAgentPanelProps, PluginClientOpenPanelOptions, PluginClientContext, PluginBrowserAccess, PluginBrowserAccessInput, PluginBrowserAccessResult, PluginClientContribution, PluginWorkspacePanelContribution, PluginSettingsScreenContribution, PluginSurfaceContribution, PluginScreenContribution, PluginScreenTitle, PluginSidebarContribution, PluginTimelineTransformerContribution, PluginTimelineItemProps, PluginTimelineRendererContribution, PluginCommandCapabilities, PluginGlobalCommandContext, PluginWorkspaceCommandContext, PluginAgentCommandContext, PluginCommandCenterItemContribution, PluginClientSlashCommandContribution, SettingsState, } from "./contracts.js";
|
|
2
2
|
export type { PluginMenuEntry, PluginMenuItem, PluginMenuPrompt, PluginMenuSeparator, PluginMenuSubmenu, } from "./menu.js";
|
|
3
3
|
export type { PluginSidebarProject, PluginSidebarProjectGroup, PluginSidebarProjectGroupHeaderProps, PluginSidebarProjectGroupingActions, PluginSidebarProjectGroupingActionsInput, PluginSidebarProjectGroupingContribution, PluginSidebarProjectGroupingContentProps, PluginSidebarProjectMove, PluginSidebarProjectHostRef, PluginSidebarProjectMenuContribution, PluginSidebarProjectMenuInput, } from "./sidebar-projects.js";
|
|
4
4
|
export type { PluginSidebarWorkspaceAccessoryContribution, PluginSidebarWorkspaceAccessoryProps, } from "./sidebar-workspaces.js";
|
|
5
5
|
export type { PluginSettingsSectionContribution, PluginSettingsSectionPage, } from "./settings-sections.js";
|
|
6
|
+
export type { BrowserDownloadRule } from "@getmateo/protocol/browser-download-rules";
|
|
6
7
|
export type { PluginClientStorage } from "./storage.js";
|
|
7
8
|
export type { PluginTerminalThemeColors, PluginTerminalThemeContribution, } from "./terminal-themes.js";
|
|
8
9
|
export type { PluginButton, PluginButtonBehavior, PluginButtonContentProps, PluginButtonContext, PluginButtonIcon, PluginButtonIconProps, PluginButtonMenuEntry, PluginButtonRegistration, PluginComposerPillContribution, PluginHeaderButtonContribution, } from "./buttons.js";
|
|
@@ -1,8 +1,29 @@
|
|
|
1
1
|
import type { ComponentType, FunctionComponent, ReactNode, ForwardRefExoticComponent, RefAttributes, ReactElement, Ref } from "react";
|
|
2
2
|
import type { StyleProp, ViewStyle, ScrollView as NativeScrollView, ScrollViewProps, FlatList as NativeFlatList, FlatListProps, TextInput as NativeTextInput, TextInputProps } from "react-native";
|
|
3
3
|
import type { PluginIconProps } from "./contracts.js";
|
|
4
|
+
export interface PluginImageViewerItem {
|
|
5
|
+
/** Stable asset identity, including its project when paths are only project-relative. */
|
|
6
|
+
readonly key: string;
|
|
7
|
+
readonly title?: string;
|
|
8
|
+
readonly group?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface PluginImageViewerProps {
|
|
11
|
+
items: readonly PluginImageViewerItem[];
|
|
12
|
+
/** Null dismisses the viewer. Missing keys never select a different item. */
|
|
13
|
+
selectedKey: string | null;
|
|
14
|
+
onKeyChange(key: string): void;
|
|
15
|
+
onClose(): void;
|
|
16
|
+
/** Resolve the selected item's HTTPS URL or base64 raster data URI on this client. */
|
|
17
|
+
loadSource(key: string): string | Promise<string>;
|
|
18
|
+
details?: ReactNode;
|
|
19
|
+
actions?: ReactNode;
|
|
20
|
+
}
|
|
21
|
+
/** Feature-detect before rendering: older hosts do not export this component. */
|
|
22
|
+
export declare const ImageViewer: ComponentType<PluginImageViewerProps> | undefined;
|
|
4
23
|
export interface ModalProps {
|
|
5
24
|
title: string;
|
|
25
|
+
/** Sets the desktop dialog width. Compact sheets keep their normal width. */
|
|
26
|
+
size?: "default" | "wide";
|
|
6
27
|
icon?: ReactNode;
|
|
7
28
|
open: boolean;
|
|
8
29
|
onOpenChange(open: boolean): void;
|
package/dist/index.d.ts
CHANGED
|
@@ -2,5 +2,6 @@ export type { PluginTheme, PluginWorkspaceSnapshot, PluginAgentSnapshot, PluginT
|
|
|
2
2
|
export { defineSettings, settingsRpc, type SettingsDefinition } from "./settings.js";
|
|
3
3
|
export { defineAttachmentSource, PluginAttachmentItemSchema, PluginAttachmentSearchPayloadSchema, type PluginAttachmentItem, type PluginAttachmentSearchPayload, } from "./attachments.js";
|
|
4
4
|
export { defineRpc, type PluginRpcContract, type RpcInput, type RpcOutput } from "./rpc.js";
|
|
5
|
+
export type { BrowserDownloadReceipt } from "@getmateo/protocol/browser-automation/rpc-schemas";
|
|
5
6
|
export { parseGitRemoteLocation } from "@getmateo/protocol/git-remote";
|
|
6
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MateoApi } from "@getmateo/client";
|
|
1
|
+
import type { MateoApi, MateoWorkspaceActions, MateoWorkspaceHandle } from "@getmateo/client";
|
|
2
2
|
import type { ZodType, input as ZodInput, output as ZodOutput } from "zod";
|
|
3
3
|
import type { PluginRpcContract } from "../rpc.js";
|
|
4
4
|
import type { PluginCleanup } from "../contracts.js";
|
|
@@ -6,8 +6,32 @@ import type { ProviderRegistration } from "./provider.js";
|
|
|
6
6
|
import type { UsageSourceRegistration } from "./usage.js";
|
|
7
7
|
import type { ModelSourceRegistration } from "./models.js";
|
|
8
8
|
import type { PluginLifecycleRegistration } from "./lifecycle.js";
|
|
9
|
+
export interface PluginWorkspaceBrowser {
|
|
10
|
+
listTabs(): Promise<{
|
|
11
|
+
browserId: string;
|
|
12
|
+
origin: string;
|
|
13
|
+
}[]>;
|
|
14
|
+
navigate(browserId: string, url: string): Promise<void>;
|
|
15
|
+
readImageSource(browserId: string, selector: string | readonly string[]): Promise<string>;
|
|
16
|
+
wait(browserId: string, condition: {
|
|
17
|
+
text?: string;
|
|
18
|
+
url?: string;
|
|
19
|
+
timeoutMs?: number;
|
|
20
|
+
}): Promise<void>;
|
|
21
|
+
upload(browserId: string, input: {
|
|
22
|
+
selector: string;
|
|
23
|
+
filePath: string;
|
|
24
|
+
}): Promise<void>;
|
|
25
|
+
}
|
|
26
|
+
export interface PluginMateoApi extends MateoApi {
|
|
27
|
+
readonly workspaces: Omit<MateoWorkspaceActions, "ref"> & {
|
|
28
|
+
ref(...args: Parameters<MateoWorkspaceActions["ref"]>): MateoWorkspaceHandle & {
|
|
29
|
+
readonly browser: PluginWorkspaceBrowser;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
}
|
|
9
33
|
export interface PluginHandlerContext {
|
|
10
|
-
mateo:
|
|
34
|
+
mateo: PluginMateoApi;
|
|
11
35
|
}
|
|
12
36
|
export type PluginSettingsState<Schema extends ZodType> = {
|
|
13
37
|
status: "ready";
|
package/dist/server/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export type { UsageSourceRegistration, UsageReport, UsageWindow, UsageBalance, UsageDetail, } from "./usage.js";
|
|
2
2
|
export type { ModelSourceMode, ModelSourceModel, ModelSourceRegistration, ModelSourceRequest, ModelSourceResult, } from "./models.js";
|
|
3
|
-
export type { PluginBuiltinState, PluginHandlerContext, PluginServerContext, PluginServerContribution, PluginServerPlugins, PluginSettings, PluginSettingsState, } from "./contracts.js";
|
|
3
|
+
export type { PluginBuiltinState, PluginHandlerContext, PluginMateoApi, PluginWorkspaceBrowser, PluginServerContext, PluginServerContribution, PluginServerPlugins, PluginSettings, PluginSettingsState, } from "./contracts.js";
|
|
4
4
|
export type { PluginHookContext, PluginHookWorkspace, PluginHookAgent, PluginSessionOpenRequest, PluginTurnOutcome, PluginLifecycleEvents, PluginBeforeRequests, PluginLifecycleRegistration, } from "./lifecycle.js";
|
|
5
5
|
export { spawnProcess, execCommand, terminateProcess } from "./process.js";
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { AgentPermissionRequest, AgentPermissionResponse, AgentTimelineItem, AgentSessionConfig } from "@getmateo/protocol/agent-types";
|
|
2
|
-
import type {
|
|
2
|
+
import type { PluginMateoApi } from "./contracts.js";
|
|
3
3
|
import type { WorkspaceCreateRequest } from "@getmateo/protocol/messages";
|
|
4
4
|
export interface PluginHookContext {
|
|
5
|
-
mateo:
|
|
5
|
+
mateo: PluginMateoApi;
|
|
6
6
|
signal: AbortSignal;
|
|
7
7
|
}
|
|
8
8
|
export interface PluginHookWorkspace {
|
package/package.json
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getmateo/plugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.0",
|
|
4
4
|
"description": "Mateo plugin SDK package",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/x2x3studio/mateo.git",
|
|
9
|
+
"directory": "packages/plugin"
|
|
10
|
+
},
|
|
6
11
|
"files": [
|
|
7
12
|
"dist",
|
|
8
13
|
"!dist/**/*.map"
|
|
@@ -71,22 +76,22 @@
|
|
|
71
76
|
"use-sync-external-store": "^1.6.0"
|
|
72
77
|
},
|
|
73
78
|
"devDependencies": {
|
|
74
|
-
"@getmateo/client": "0.
|
|
75
|
-
"@getmateo/protocol": "0.
|
|
79
|
+
"@getmateo/client": "0.19.0",
|
|
80
|
+
"@getmateo/protocol": "0.19.0",
|
|
76
81
|
"@types/node": "^20.9.0",
|
|
77
82
|
"@types/react": "~19.3.0",
|
|
78
83
|
"react": "19.3.0",
|
|
79
84
|
"react-native": "0.88.1",
|
|
80
85
|
"typescript": "^5.9.3",
|
|
81
86
|
"vitest": "^4.1.12",
|
|
82
|
-
"zod": "
|
|
87
|
+
"zod": "4.6.7"
|
|
83
88
|
},
|
|
84
89
|
"peerDependencies": {
|
|
85
|
-
"@getmateo/client": "0.
|
|
86
|
-
"@getmateo/protocol": "0.
|
|
90
|
+
"@getmateo/client": "0.19.0",
|
|
91
|
+
"@getmateo/protocol": "0.19.0",
|
|
87
92
|
"react": "^19.1.0",
|
|
88
93
|
"react-native": ">=0.81.5",
|
|
89
|
-
"zod": "
|
|
94
|
+
"zod": "4.6.7"
|
|
90
95
|
},
|
|
91
96
|
"peerDependenciesMeta": {
|
|
92
97
|
"react-native": {
|