@getpaseo/plugin 0.17.1 → 0.17.2
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/server/provider.d.ts +23 -1
- package/dist/server/provider.js +16 -0
- package/dist/server/usage.d.ts +4 -0
- package/package.json +5 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { JsonValue } from "@getpaseo/protocol/agent-types";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
export declare const PROVIDER_PROTOCOL_VERSION: 1;
|
|
4
|
-
export declare const PROVIDER_CAPABILITIES: readonly ["prompt.message", "prompt.command", "prompt.image", "prompt.output_schema", "prompt.steer", "session.can_stop_runtime", "session.archive", "session.configure", "session.list", "session.persistence", "session.revert.both", "session.revert.conversation", "session.revert.files", "session.subsession", "session.unarchive", "permission", "permission.tool_policy", "timeline.plugin"];
|
|
4
|
+
export declare const PROVIDER_CAPABILITIES: readonly ["prompt.message", "prompt.command", "prompt.image", "prompt.output_schema", "prompt.steer", "session.can_stop_runtime", "session.archive", "session.configure", "session.list", "session.metrics", "session.persistence", "session.revert.both", "session.revert.conversation", "session.revert.files", "session.subsession", "session.unarchive", "permission", "permission.tool_policy", "timeline.plugin"];
|
|
5
5
|
export type ProviderCapability = (typeof PROVIDER_CAPABILITIES)[number];
|
|
6
6
|
export interface ProviderRegistration {
|
|
7
7
|
/** Activate only while agents.providers contains this provider ID, independently of enabled. */
|
|
@@ -16,6 +16,8 @@ export interface ProviderRegistration {
|
|
|
16
16
|
description?: string;
|
|
17
17
|
/** Plugin-directory-relative path to a self-contained SVG file. */
|
|
18
18
|
icon?: string;
|
|
19
|
+
/** http(s) page that helps users set up and troubleshoot the provider. Paseo opens it. */
|
|
20
|
+
docsUrl?: string;
|
|
19
21
|
/** How users install the provider's CLI and which version they run. Every member is optional. */
|
|
20
22
|
installation?: ProviderInstallation;
|
|
21
23
|
connect(request: ProviderConnectRequest): Promise<ProviderConnection>;
|
|
@@ -514,6 +516,16 @@ export interface ProviderUsage {
|
|
|
514
516
|
contextWindowMaxTokens?: number;
|
|
515
517
|
contextWindowUsedTokens?: number;
|
|
516
518
|
}
|
|
519
|
+
/**
|
|
520
|
+
* One row of provider-owned detail about a session or a turn. Format `value` for
|
|
521
|
+
* reading: Paseo shows it as given.
|
|
522
|
+
*/
|
|
523
|
+
export interface ProviderMetric {
|
|
524
|
+
label: string;
|
|
525
|
+
value: string;
|
|
526
|
+
/** Colors the value. Omit it for an ordinary value. */
|
|
527
|
+
tone?: "default" | "ok" | "warning" | "danger";
|
|
528
|
+
}
|
|
517
529
|
interface ProviderTimelineIdentity {
|
|
518
530
|
id: string;
|
|
519
531
|
revertToken?: JsonValue;
|
|
@@ -730,11 +742,21 @@ export type ProviderEvent = {
|
|
|
730
742
|
turnId: string;
|
|
731
743
|
state: "started" | "completed" | "failed" | "canceled";
|
|
732
744
|
error?: ProviderError;
|
|
745
|
+
/** Shown on the turn's footer. Read when `state` is `"completed"`. */
|
|
746
|
+
metrics?: readonly ProviderMetric[];
|
|
733
747
|
} | {
|
|
734
748
|
type: "session.usage";
|
|
735
749
|
sessionId: string;
|
|
736
750
|
turnId?: string;
|
|
737
751
|
usage: ProviderUsage;
|
|
752
|
+
} | {
|
|
753
|
+
type: "session.metrics";
|
|
754
|
+
sessionId: string;
|
|
755
|
+
/**
|
|
756
|
+
* Replaces the metrics shown for the session. An empty list clears them. Publish only when
|
|
757
|
+
* `session.metrics` was negotiated: a Paseo that does not offer it rejects this event.
|
|
758
|
+
*/
|
|
759
|
+
metrics: readonly ProviderMetric[];
|
|
738
760
|
} | {
|
|
739
761
|
type: "session.config";
|
|
740
762
|
sessionId: string;
|
package/dist/server/provider.js
CHANGED
|
@@ -10,6 +10,7 @@ export const PROVIDER_CAPABILITIES = [
|
|
|
10
10
|
"session.archive",
|
|
11
11
|
"session.configure",
|
|
12
12
|
"session.list",
|
|
13
|
+
"session.metrics",
|
|
13
14
|
"session.persistence",
|
|
14
15
|
"session.revert.both",
|
|
15
16
|
"session.revert.conversation",
|
|
@@ -539,6 +540,13 @@ const usageSchema = z
|
|
|
539
540
|
contextWindowUsedTokens: z.number().optional(),
|
|
540
541
|
})
|
|
541
542
|
.strip();
|
|
543
|
+
const metricSchema = z
|
|
544
|
+
.object({
|
|
545
|
+
label: z.string(),
|
|
546
|
+
value: z.string(),
|
|
547
|
+
tone: z.enum(["default", "ok", "warning", "danger"]).optional(),
|
|
548
|
+
})
|
|
549
|
+
.strip();
|
|
542
550
|
const worktreeCommandSchema = z
|
|
543
551
|
.object({
|
|
544
552
|
index: z.number().int().positive(),
|
|
@@ -852,6 +860,7 @@ export const ProviderEventSchema = z.discriminatedUnion("type", [
|
|
|
852
860
|
turnId: idSchema,
|
|
853
861
|
state: z.enum(["started", "completed", "failed", "canceled"]),
|
|
854
862
|
error: providerErrorSchema.optional(),
|
|
863
|
+
metrics: z.array(metricSchema).optional(),
|
|
855
864
|
})
|
|
856
865
|
.strip(),
|
|
857
866
|
z
|
|
@@ -862,6 +871,13 @@ export const ProviderEventSchema = z.discriminatedUnion("type", [
|
|
|
862
871
|
usage: usageSchema,
|
|
863
872
|
})
|
|
864
873
|
.strip(),
|
|
874
|
+
z
|
|
875
|
+
.object({
|
|
876
|
+
type: z.literal("session.metrics"),
|
|
877
|
+
sessionId: idSchema,
|
|
878
|
+
metrics: z.array(metricSchema),
|
|
879
|
+
})
|
|
880
|
+
.strip(),
|
|
865
881
|
z
|
|
866
882
|
.object({ type: z.literal("session.config"), sessionId: idSchema, config: configStateSchema })
|
|
867
883
|
.strip(),
|
package/dist/server/usage.d.ts
CHANGED
|
@@ -68,6 +68,8 @@ export interface UsageAccount {
|
|
|
68
68
|
label?: string;
|
|
69
69
|
/** Harness owning this login, e.g. Codex, OpenCode, Pi or OMP. */
|
|
70
70
|
harness?: string;
|
|
71
|
+
/** Provider ID associated with this login, used as a hint for default visibility. */
|
|
72
|
+
provider?: string;
|
|
71
73
|
/** Store locator, opaque to the daemon. */
|
|
72
74
|
input: JsonValue;
|
|
73
75
|
}
|
|
@@ -96,6 +98,8 @@ export interface UsageSourceRegistration {
|
|
|
96
98
|
icon?: string;
|
|
97
99
|
/** Provider whose resolved launch is needed for discovery. */
|
|
98
100
|
provider?: string;
|
|
101
|
+
/** Provider IDs associated with this source, used as a hint for default visibility. */
|
|
102
|
+
providers?: readonly string[];
|
|
99
103
|
input: ZodType;
|
|
100
104
|
/** Accounts for this scope only. The same key in any scope identifies the same account. */
|
|
101
105
|
discover(scope: UsageScope): Promise<UsageAccount[]>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getpaseo/plugin",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.2",
|
|
4
4
|
"description": "Paseo plugin SDK package",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"files": [
|
|
@@ -78,8 +78,8 @@
|
|
|
78
78
|
"use-sync-external-store": "^1.6.0"
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
|
81
|
-
"@getpaseo/client": "0.17.
|
|
82
|
-
"@getpaseo/protocol": "0.17.
|
|
81
|
+
"@getpaseo/client": "0.17.2",
|
|
82
|
+
"@getpaseo/protocol": "0.17.2",
|
|
83
83
|
"@types/node": "^20.9.0",
|
|
84
84
|
"@types/react": "~19.2.0",
|
|
85
85
|
"react": "19.2.3",
|
|
@@ -89,8 +89,8 @@
|
|
|
89
89
|
"zod": "^4.4.3"
|
|
90
90
|
},
|
|
91
91
|
"peerDependencies": {
|
|
92
|
-
"@getpaseo/client": "0.17.
|
|
93
|
-
"@getpaseo/protocol": "0.17.
|
|
92
|
+
"@getpaseo/client": "0.17.2",
|
|
93
|
+
"@getpaseo/protocol": "0.17.2",
|
|
94
94
|
"react": ">=19.1.0 <20",
|
|
95
95
|
"react-native": ">=0.81.5",
|
|
96
96
|
"zod": "^4.4.3"
|