@getmateo/plugin 0.19.13 → 0.19.15
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 +17 -9
- package/dist/client/index.d.ts +2 -1
- package/dist/client/notifications.d.ts +13 -0
- package/dist/client/notifications.js +2 -0
- package/dist/server/contracts.d.ts +3 -0
- package/dist/server/index.d.ts +1 -0
- package/dist/server/notifications.d.ts +38 -0
- package/dist/server/notifications.js +2 -0
- package/package.json +5 -5
|
@@ -11,6 +11,7 @@ import type { PluginSidebarWorkspaceAccessoryContribution } from "./sidebar-work
|
|
|
11
11
|
import type { PluginSettingsSectionContribution } from "./settings-sections.js";
|
|
12
12
|
import type { PluginClientStorage } from "./storage.js";
|
|
13
13
|
import type { PluginTerminalThemeContribution } from "./terminal-themes.js";
|
|
14
|
+
import type { PluginNotificationOpenHandler } from "./notifications.js";
|
|
14
15
|
export interface PluginHostProps {
|
|
15
16
|
theme: PluginTheme;
|
|
16
17
|
host: {
|
|
@@ -22,23 +23,25 @@ export interface PluginHostProps {
|
|
|
22
23
|
platform: "ios" | "android" | "web";
|
|
23
24
|
};
|
|
24
25
|
}
|
|
26
|
+
export interface PluginHostNavigationActions {
|
|
27
|
+
readonly openAgent: (input: {
|
|
28
|
+
readonly agentId: string;
|
|
29
|
+
readonly serverId?: string;
|
|
30
|
+
}) => void;
|
|
31
|
+
readonly openWorkspace: (input: {
|
|
32
|
+
readonly workspaceId: string;
|
|
33
|
+
readonly serverId?: string;
|
|
34
|
+
}) => void;
|
|
35
|
+
}
|
|
25
36
|
interface PluginNavigableHostProps extends PluginHostProps {
|
|
26
37
|
/** Client-owned navigation. Undefined on older hosts; hide dependent affordances when absent. */
|
|
27
|
-
readonly navigation?: {
|
|
38
|
+
readonly navigation?: PluginHostNavigationActions & {
|
|
28
39
|
/** Present only on Electron. The browser runs locally; serverId selects workspace ownership. */
|
|
29
40
|
readonly openBrowser?: (input: {
|
|
30
41
|
readonly url: string;
|
|
31
42
|
readonly workspaceId: string;
|
|
32
43
|
readonly serverId?: string;
|
|
33
44
|
}) => void;
|
|
34
|
-
readonly openAgent: (input: {
|
|
35
|
-
readonly agentId: string;
|
|
36
|
-
readonly serverId?: string;
|
|
37
|
-
}) => void;
|
|
38
|
-
readonly openWorkspace: (input: {
|
|
39
|
-
readonly workspaceId: string;
|
|
40
|
-
readonly serverId?: string;
|
|
41
|
-
}) => void;
|
|
42
45
|
};
|
|
43
46
|
}
|
|
44
47
|
/** String keys and values: params travel in the screen's URL. */
|
|
@@ -158,6 +161,11 @@ export interface PluginClientContext extends PluginCommandCapabilities, PluginCl
|
|
|
158
161
|
storage: PluginClientStorage;
|
|
159
162
|
addTimelineTransformer<ItemType extends AgentTimelineItem["type"]>(contribution: PluginTimelineTransformerContribution<ItemType>): PluginCleanup;
|
|
160
163
|
addTimelineRenderer<Schema extends ZodType>(contribution: PluginTimelineRendererContribution<Schema>): PluginCleanup;
|
|
164
|
+
/**
|
|
165
|
+
* Runs when the user taps one of this plugin's notifications on this client. Without a
|
|
166
|
+
* handler, or when every handler throws, the notification's `open` target applies.
|
|
167
|
+
*/
|
|
168
|
+
onNotificationOpen(handler: PluginNotificationOpenHandler): PluginCleanup;
|
|
161
169
|
openPanel(id: string, options: PluginClientOpenPanelOptions): void;
|
|
162
170
|
}
|
|
163
171
|
export type PluginClientContribution = (client: PluginClientContext) => PluginCleanup;
|
package/dist/client/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { PluginHostProps, PluginSurfaceProps, PluginScreenProps, PluginPopoverProps, PluginScreenParams, PluginOpenScreenInput, PluginScreenLocation, PluginSidebarItemProps, PluginSidebarItemContribution, PluginFloatingPanelProps, PluginFloatingPanelContribution, PluginIconProps, PluginPanelLocation, PluginPanelOpenLocation, 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, PluginHostNavigationActions, PluginSurfaceProps, PluginScreenProps, PluginPopoverProps, PluginScreenParams, PluginOpenScreenInput, PluginScreenLocation, PluginSidebarItemProps, PluginSidebarItemContribution, PluginFloatingPanelProps, PluginFloatingPanelContribution, PluginIconProps, PluginPanelLocation, PluginPanelOpenLocation, 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";
|
|
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";
|
|
@@ -36,4 +36,5 @@ export declare function getPluginClient(serverId: string): PluginHostClient;
|
|
|
36
36
|
export declare function useLocale(): string;
|
|
37
37
|
/** Open an absolute HTTP(S) URL using the client platform’s external opener. */
|
|
38
38
|
export declare function openExternalUrl(url: string): Promise<void>;
|
|
39
|
+
export type { PluginNotificationOpenEvent, PluginNotificationOpenContext, PluginNotificationOpenHandler, } from "./notifications.js";
|
|
39
40
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { JsonValue } from "@getmateo/protocol/agent-types";
|
|
2
|
+
import type { PluginCommandCapabilities, PluginHostNavigationActions } from "./contracts.js";
|
|
3
|
+
export interface PluginNotificationOpenEvent {
|
|
4
|
+
readonly type: "opened";
|
|
5
|
+
readonly notificationId: string;
|
|
6
|
+
readonly data: Readonly<Record<string, JsonValue>> | undefined;
|
|
7
|
+
}
|
|
8
|
+
export interface PluginNotificationOpenContext extends PluginCommandCapabilities {
|
|
9
|
+
readonly event: PluginNotificationOpenEvent;
|
|
10
|
+
readonly navigation: PluginHostNavigationActions;
|
|
11
|
+
}
|
|
12
|
+
export type PluginNotificationOpenHandler = (context: PluginNotificationOpenContext) => void | Promise<void>;
|
|
13
|
+
//# sourceMappingURL=notifications.d.ts.map
|
|
@@ -7,6 +7,7 @@ import type { ProviderRegistration } from "./provider.js";
|
|
|
7
7
|
import type { UsageSourceRegistration } from "./usage.js";
|
|
8
8
|
import type { ModelSourceRegistration } from "./models.js";
|
|
9
9
|
import type { PluginLifecycleRegistration } from "./lifecycle.js";
|
|
10
|
+
import type { PluginNotifications } from "./notifications.js";
|
|
10
11
|
export type { BrowserAutomationCommand, BrowserAutomationDialogEvent, BrowserAutomationErrorCode, BrowserAutomationResult, BrowserAutomationTabInfo, BrowserDownloadReceipt, };
|
|
11
12
|
export interface PluginBrowserTab extends BrowserAutomationTabInfo {
|
|
12
13
|
origin: string;
|
|
@@ -185,6 +186,8 @@ export interface PluginServerContext extends PluginLifecycleRegistration {
|
|
|
185
186
|
/** Mateo: contributes models to an existing provider. */
|
|
186
187
|
registerModelSource(source: ModelSourceRegistration): void;
|
|
187
188
|
plugins: PluginServerPlugins;
|
|
189
|
+
/** Sends OS and push notifications to this host's clients. */
|
|
190
|
+
notifications: PluginNotifications;
|
|
188
191
|
/** Mateo: the plugin this contribution belongs to. */
|
|
189
192
|
plugin: PluginServerIdentity;
|
|
190
193
|
}
|
package/dist/server/index.d.ts
CHANGED
|
@@ -2,5 +2,6 @@ export type { UsageSourceRegistration, UsageReport, UsageWindow, UsageBalance, U
|
|
|
2
2
|
export type { ModelSourceMode, ModelSourceModel, ModelSourceRegistration, ModelSourceRequest, ModelSourceResult, } from "./models.js";
|
|
3
3
|
export type { BrowserAutomationCommand, BrowserAutomationDialogEvent, BrowserAutomationErrorCode, BrowserAutomationResult, BrowserAutomationTabInfo, BrowserDownloadReceipt, PluginBrowserAutomation, PluginBrowserExecuteOptions, PluginBrowserTab, PluginBuiltinState, PluginHandlerContext, PluginMateoApi, PluginWorkspaceBrowser, PluginServerContext, PluginServerContribution, PluginServerIdentity, PluginServerPlugins, PluginSettings, PluginSettingsState, } from "./contracts.js";
|
|
4
4
|
export type { PluginHookContext, PluginHookWorkspace, PluginHookAgent, PluginSessionOpenRequest, PluginTurnOutcome, PluginLifecycleEvents, PluginBeforeRequests, PluginLifecycleRegistration, } from "./lifecycle.js";
|
|
5
|
+
export type { PluginNotifications, PluginNotificationSendInput, PluginNotificationSendResult, PluginNotificationOpenTarget, } from "./notifications.js";
|
|
5
6
|
export { spawnProcess, execCommand, terminateProcess } from "./process.js";
|
|
6
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { JsonValue } from "@getmateo/protocol/agent-types";
|
|
2
|
+
export type PluginNotificationOpenTarget = {
|
|
3
|
+
type: "agent";
|
|
4
|
+
agentId: string;
|
|
5
|
+
} | {
|
|
6
|
+
type: "workspace";
|
|
7
|
+
workspaceId: string;
|
|
8
|
+
} | {
|
|
9
|
+
type: "screen";
|
|
10
|
+
screenId: string;
|
|
11
|
+
params?: Record<string, string>;
|
|
12
|
+
};
|
|
13
|
+
export interface PluginNotificationSendInput {
|
|
14
|
+
title: string;
|
|
15
|
+
body: string;
|
|
16
|
+
/** Identical keys from the same plugin within 60 s are dropped as deduplicated. */
|
|
17
|
+
key?: string;
|
|
18
|
+
/** Declarative navigation on tap when no client `onNotificationOpen` handler handles it. */
|
|
19
|
+
open?: PluginNotificationOpenTarget;
|
|
20
|
+
/** JSON payload delivered to `client.onNotificationOpen` on tap (<= 1024 UTF-8 bytes). */
|
|
21
|
+
data?: Record<string, JsonValue>;
|
|
22
|
+
}
|
|
23
|
+
export type PluginNotificationSendResult = {
|
|
24
|
+
status: "sent";
|
|
25
|
+
notificationId: string;
|
|
26
|
+
} | {
|
|
27
|
+
status: "deduplicated";
|
|
28
|
+
} | {
|
|
29
|
+
status: "rate_limited";
|
|
30
|
+
}
|
|
31
|
+
/** Nothing could receive it, such as before a client session host is bound. Safe to retry. */
|
|
32
|
+
| {
|
|
33
|
+
status: "not_delivered";
|
|
34
|
+
};
|
|
35
|
+
export interface PluginNotifications {
|
|
36
|
+
send(input: PluginNotificationSendInput): Promise<PluginNotificationSendResult>;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=notifications.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getmateo/plugin",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.15",
|
|
4
4
|
"description": "Mateo plugin SDK package",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -76,8 +76,8 @@
|
|
|
76
76
|
"use-sync-external-store": "^1.6.0"
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
|
-
"@getmateo/client": "0.19.
|
|
80
|
-
"@getmateo/protocol": "0.19.
|
|
79
|
+
"@getmateo/client": "0.19.15",
|
|
80
|
+
"@getmateo/protocol": "0.19.15",
|
|
81
81
|
"@types/node": "^20.9.0",
|
|
82
82
|
"@types/react": "~19.3.0",
|
|
83
83
|
"react": "19.3.0",
|
|
@@ -87,8 +87,8 @@
|
|
|
87
87
|
"zod": "4.6.7"
|
|
88
88
|
},
|
|
89
89
|
"peerDependencies": {
|
|
90
|
-
"@getmateo/client": "0.19.
|
|
91
|
-
"@getmateo/protocol": "0.19.
|
|
90
|
+
"@getmateo/client": "0.19.15",
|
|
91
|
+
"@getmateo/protocol": "0.19.15",
|
|
92
92
|
"react": "^19.1.0",
|
|
93
93
|
"react-native": ">=0.81.5",
|
|
94
94
|
"zod": "4.6.7"
|