@getpaseo/plugin 0.6.0 → 0.7.0-beta.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/dist/contracts.d.ts +52 -0
- package/dist/host.d.ts +6 -2
- package/dist/host.js +6 -0
- package/dist/index.d.ts +4 -1
- package/package.json +5 -3
package/dist/contracts.d.ts
CHANGED
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
import type { ComponentType } from "react";
|
|
2
2
|
import type { PaseoApi } from "@getpaseo/client";
|
|
3
|
+
import type { AgentTimelineItem } from "@getpaseo/protocol/agent-types";
|
|
3
4
|
import type { ZodType, input as ZodInput, output as ZodOutput } from "zod";
|
|
4
5
|
import type { PluginRpcContract } from "./rpc.js";
|
|
5
6
|
export interface PluginTheme {
|
|
6
7
|
readonly colors: {
|
|
7
8
|
readonly surface0: string;
|
|
9
|
+
readonly surface1: string;
|
|
10
|
+
readonly surface2: string;
|
|
11
|
+
readonly border: string;
|
|
8
12
|
readonly foreground: string;
|
|
9
13
|
readonly foregroundMuted: string;
|
|
10
14
|
readonly accent: string;
|
|
11
15
|
readonly accentForeground: string;
|
|
16
|
+
readonly statusSuccess: string;
|
|
17
|
+
readonly statusWarning: string;
|
|
12
18
|
readonly statusDanger: string;
|
|
13
19
|
};
|
|
14
20
|
}
|
|
@@ -25,6 +31,11 @@ export interface PluginHostProps {
|
|
|
25
31
|
}
|
|
26
32
|
export interface PluginSurfaceProps extends PluginHostProps {
|
|
27
33
|
}
|
|
34
|
+
export interface PluginIconProps {
|
|
35
|
+
name: string;
|
|
36
|
+
size?: number;
|
|
37
|
+
color?: string;
|
|
38
|
+
}
|
|
28
39
|
export interface PluginWorkspaceSnapshot {
|
|
29
40
|
readonly id: string;
|
|
30
41
|
readonly projectId: string;
|
|
@@ -121,6 +132,45 @@ export interface PluginAttachmentSourceContribution {
|
|
|
121
132
|
searchPlaceholder: string;
|
|
122
133
|
search: PluginRpcContract;
|
|
123
134
|
}
|
|
135
|
+
export type PluginTimelineData = null | boolean | number | string | PluginTimelineData[] | {
|
|
136
|
+
[key: string]: PluginTimelineData;
|
|
137
|
+
};
|
|
138
|
+
export interface PluginTimelineItem {
|
|
139
|
+
type: "plugin";
|
|
140
|
+
kind: string;
|
|
141
|
+
version: number;
|
|
142
|
+
data: PluginTimelineData;
|
|
143
|
+
}
|
|
144
|
+
export interface PluginTimelineTransformResult {
|
|
145
|
+
items: PluginTimelineItem[];
|
|
146
|
+
}
|
|
147
|
+
export type PluginTimelineTransformerContribution<ItemType extends AgentTimelineItem["type"] = AgentTimelineItem["type"]> = ItemType extends AgentTimelineItem["type"] ? {
|
|
148
|
+
id: string;
|
|
149
|
+
query: {
|
|
150
|
+
itemType: ItemType;
|
|
151
|
+
};
|
|
152
|
+
transform(input: {
|
|
153
|
+
item: Extract<AgentTimelineItem, {
|
|
154
|
+
type: ItemType;
|
|
155
|
+
}>;
|
|
156
|
+
}): PluginTimelineTransformResult | undefined;
|
|
157
|
+
} : never;
|
|
158
|
+
export interface PluginTimelineItemProps<Data = unknown> extends PluginHostProps {
|
|
159
|
+
agentId: string;
|
|
160
|
+
item: {
|
|
161
|
+
type: "plugin";
|
|
162
|
+
kind: string;
|
|
163
|
+
version: number;
|
|
164
|
+
data: Data;
|
|
165
|
+
};
|
|
166
|
+
timestamp: Date;
|
|
167
|
+
}
|
|
168
|
+
export interface PluginTimelineRendererContribution<Schema extends ZodType = ZodType> {
|
|
169
|
+
kind: string;
|
|
170
|
+
version: number;
|
|
171
|
+
schema: Schema;
|
|
172
|
+
Component: ComponentType<PluginTimelineItemProps<ZodOutput<Schema>>>;
|
|
173
|
+
}
|
|
124
174
|
export interface PluginCommandCapabilities {
|
|
125
175
|
paseo: PaseoApi;
|
|
126
176
|
rpc<InputSchema extends ZodType, OutputSchema extends ZodType>(contract: PluginRpcContract<InputSchema, OutputSchema>, input: ZodInput<InputSchema>): Promise<ZodOutput<OutputSchema>>;
|
|
@@ -167,6 +217,8 @@ export interface PluginContext {
|
|
|
167
217
|
addCommandCenterItem(contribution: PluginCommandCenterItemContribution): void;
|
|
168
218
|
addAttachmentSource(contribution: PluginAttachmentSourceContribution): void;
|
|
169
219
|
addTheme(contribution: PluginThemeContribution): void;
|
|
220
|
+
addTimelineTransformer<ItemType extends AgentTimelineItem["type"]>(contribution: PluginTimelineTransformerContribution<ItemType>): void;
|
|
221
|
+
addTimelineRenderer<Schema extends ZodType>(contribution: PluginTimelineRendererContribution<Schema>): void;
|
|
170
222
|
}
|
|
171
223
|
export type PluginCleanup = () => void | Promise<void>;
|
|
172
224
|
export type PluginContribution = (plugin: PluginContext) => PluginCleanup;
|
package/dist/host.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { PluginClientStateProvider, type PluginClientStateSource } from "./client-state.js";
|
|
2
|
-
import type { PluginAttachmentSourceContribution, PluginCommandCenterItemContribution, PluginContext, PluginSidebarContribution, PluginSurfaceContribution, PluginSurfaceProps, PluginThemeContribution, PluginWorkspacePanelContribution } from "./contracts.js";
|
|
2
|
+
import type { PluginAttachmentSourceContribution, PluginCommandCenterItemContribution, PluginContext, PluginSidebarContribution, PluginSurfaceContribution, PluginSurfaceProps, PluginThemeContribution, PluginTimelineRendererContribution, PluginTimelineTransformerContribution, PluginWorkspacePanelContribution } from "./contracts.js";
|
|
3
3
|
import { PluginRpcProvider } from "./rpc-context.js";
|
|
4
4
|
import { PaseoApiProvider } from "./paseo-context.js";
|
|
5
5
|
import { callPluginRpc } from "./rpc.js";
|
|
@@ -11,6 +11,8 @@ interface PluginCollector {
|
|
|
11
11
|
addCommandCenterItem(contribution: PluginCommandCenterItemContribution): void;
|
|
12
12
|
addAttachmentSource(contribution: PluginAttachmentSourceContribution): void;
|
|
13
13
|
addTheme(contribution: PluginThemeContribution): void;
|
|
14
|
+
addTimelineTransformer(contribution: PluginTimelineTransformerContribution): void;
|
|
15
|
+
addTimelineRenderer(contribution: PluginTimelineRendererContribution): void;
|
|
14
16
|
}
|
|
15
17
|
export interface PluginRegistrationCollector {
|
|
16
18
|
surfaces: PluginSurfaceContribution[];
|
|
@@ -19,8 +21,10 @@ export interface PluginRegistrationCollector {
|
|
|
19
21
|
commandCenterItems: PluginCommandCenterItemContribution[];
|
|
20
22
|
attachmentSources: PluginAttachmentSourceContribution[];
|
|
21
23
|
themes: PluginThemeContribution[];
|
|
24
|
+
timelineTransformers: PluginTimelineTransformerContribution[];
|
|
25
|
+
timelineRenderers: PluginTimelineRendererContribution[];
|
|
22
26
|
}
|
|
23
|
-
export declare function createPluginContext(collector: PluginCollector): Pick<PluginContext, "addSurface" | "addSidebarItem" | "addWorkspacePanel" | "addCommandCenterItem" | "addAttachmentSource" | "addTheme">;
|
|
27
|
+
export declare function createPluginContext(collector: PluginCollector): Pick<PluginContext, "addSurface" | "addSidebarItem" | "addWorkspacePanel" | "addCommandCenterItem" | "addAttachmentSource" | "addTheme" | "addTimelineTransformer" | "addTimelineRenderer">;
|
|
24
28
|
export declare function searchPluginAttachments(source: PluginAttachmentSourceContribution, invoke: (method: string, input: unknown) => Promise<unknown>, query: string): Promise<{
|
|
25
29
|
items: {
|
|
26
30
|
id: string;
|
package/dist/host.js
CHANGED
|
@@ -23,6 +23,12 @@ export function createPluginContext(collector) {
|
|
|
23
23
|
addTheme(contribution) {
|
|
24
24
|
collector.addTheme(contribution);
|
|
25
25
|
},
|
|
26
|
+
addTimelineTransformer(contribution) {
|
|
27
|
+
collector.addTimelineTransformer(contribution);
|
|
28
|
+
},
|
|
29
|
+
addTimelineRenderer(contribution) {
|
|
30
|
+
collector.addTimelineRenderer(contribution);
|
|
31
|
+
},
|
|
26
32
|
};
|
|
27
33
|
}
|
|
28
34
|
export async function searchPluginAttachments(source, invoke, query) {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import type { ComponentType } from "react";
|
|
2
|
+
import type { PluginIconProps } from "./contracts.js";
|
|
1
3
|
export { PluginAttachmentItemSchema, PluginAttachmentSearchPayloadSchema, defineAttachmentSource, defineRpc, type PluginAttachmentItem, type PluginAttachmentSearchPayload, type PluginRpcContract, } from "./server.js";
|
|
2
|
-
export
|
|
4
|
+
export declare const Icon: ComponentType<PluginIconProps>;
|
|
5
|
+
export type { PluginAttachmentSourceContribution, PluginAgentCommandContext, PluginAgentPanelProps, PluginAgentSnapshot, PluginCleanup, PluginCommandCapabilities, PluginCommandCenterItemContribution, PluginContribution, PluginContext, PluginGlobalCommandContext, PluginHandlerContext, PluginHostProps, PluginOpenPanelOptions, PluginIconProps, PluginPanelLocation, PluginTheme, PluginSidebarContribution, PluginSurfaceContribution, PluginSurfaceProps, PluginThemeColors, PluginThemeContribution, PluginTimelineData, PluginTimelineItem, PluginTimelineItemProps, PluginTimelineRendererContribution, PluginTimelineTransformerContribution, PluginTimelineTransformResult, PluginWorkspaceCommandContext, PluginWorkspacePanelContribution, PluginWorkspacePanelProps, PluginWorkspaceSnapshot, } from "./contracts.js";
|
|
3
6
|
export { usePaseo } from "./paseo-context.js";
|
|
4
7
|
export { useAgent, useWorkspace } from "./client-state.js";
|
|
5
8
|
export { useRpc } from "./rpc-context.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getpaseo/plugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0-beta.1",
|
|
4
4
|
"description": "Paseo plugin SDK package",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -39,7 +39,8 @@
|
|
|
39
39
|
"use-sync-external-store": "^1.6.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@getpaseo/client": "0.
|
|
42
|
+
"@getpaseo/client": "0.7.0-beta.1",
|
|
43
|
+
"@getpaseo/protocol": "0.7.0-beta.1",
|
|
43
44
|
"@types/node": "^20.9.0",
|
|
44
45
|
"@types/react": "~19.2.0",
|
|
45
46
|
"react": "19.1.0",
|
|
@@ -48,7 +49,8 @@
|
|
|
48
49
|
"zod": "^4.4.3"
|
|
49
50
|
},
|
|
50
51
|
"peerDependencies": {
|
|
51
|
-
"@getpaseo/client": "0.
|
|
52
|
+
"@getpaseo/client": "0.7.0-beta.1",
|
|
53
|
+
"@getpaseo/protocol": "0.7.0-beta.1",
|
|
52
54
|
"react": "19.1.0",
|
|
53
55
|
"zod": "^4.4.3"
|
|
54
56
|
}
|