@omercnet/paseo-omp 5.7.0 → 5.8.0-next.528.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/OVERVIEW.md +1 -1
- package/README.md +3 -3
- package/client/omp-accounts-section.tsx +20 -3
- package/client/quota-popover.tsx +75 -7
- package/client/quota-state.ts +24 -2
- package/index.client.tsx +47 -5
- package/index.server.ts +5 -1
- package/npm-shrinkwrap.json +31 -27
- package/package.json +9 -9
- package/paseo-plugin.json +1 -1
- package/server/hub.ts +307 -47
- package/server/omp-accounts.ts +37 -2
- package/server/package-version.ts +1 -1
- package/server/paths.ts +21 -0
- package/server/provider/omp-rpc-protocol.ts +11 -0
- package/server/provider/omp-rpc.ts +4 -1
- package/server/provider/session.ts +18 -4
- package/server/provider/timeline-projector.ts +4 -0
- package/server/quota.ts +75 -0
- package/server/subagents.ts +11 -0
- package/shared/account-tags.ts +44 -0
- package/shared/hub.ts +6 -5
- package/shared/omp-accounts.ts +2 -0
- package/shared/quota.ts +14 -0
package/OVERVIEW.md
CHANGED
|
@@ -2,7 +2,7 @@ OMP adds an agent provider for the OMP coding agent, plus an OMP sidebar and wor
|
|
|
2
2
|
|
|
3
3
|
## Setup
|
|
4
4
|
|
|
5
|
-
- Paseo ^0.14.0 || ^0.15.0 || ^0.16.0.
|
|
5
|
+
- Paseo ^0.14.0 || ^0.15.0 || ^0.16.0 || ^0.17.0.
|
|
6
6
|
- OMP 18.1.15 or newer on the daemon host, speaking RPC protocol v2. Older runtimes are rejected.
|
|
7
7
|
- Provider options let you change the OMP command, set environment values, choose an output redaction mode and set a session directory and timeout. Named OMP profiles appear as separate `OMP · <profile>` providers.
|
|
8
8
|
|
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ before capture.
|
|
|
24
24
|
|
|
25
25
|
## Quick start
|
|
26
26
|
|
|
27
|
-
Requirements: Paseo `^0.14.0 || ^0.15.0 || ^0.16.0`, OMP `18.1.15` or newer, and OMP RPC protocol v2. Workspace discovery passes `includeBackground`, which throws on hosts that do not advertise `features.backgroundWorkspaces`; every 0.14 and later host does.
|
|
27
|
+
Requirements: Paseo `^0.14.0 || ^0.15.0 || ^0.16.0 || ^0.17.0`, OMP `18.1.15` or newer, and OMP RPC protocol v2. Workspace discovery passes `includeBackground`, which throws on hosts that do not advertise `features.backgroundWorkspaces`; every 0.14 and later host does.
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
30
|
paseo plugin install npm:@omercnet/paseo-omp@<version>
|
|
@@ -33,9 +33,9 @@ paseo plugin ls paseo-omp
|
|
|
33
33
|
|
|
34
34
|
Open the **OMP** sidebar to review the provider-profile contract, choose which composer pills appear, browse and edit native scalar settings, manage OMP-native plugins, verify runtime health, and generate a bounded support report under **Help**. The same tabs, including Accounts, MCPs, and Composer, are available in the workspace OMP panel, which adds a workspace-only Security tab. Then create an agent and select **OMP Plugin**; on a new install, [enable it](#plugin-provider-opt-in) and restart the daemon first. Its optional **MCP** composer control runs OMP-native management commands in the current session; setup questions and authorization stay in that chat timeline, where OAuth can open in a workspace-scoped Paseo Browser or on the current device. While OMP subagents run, a row under each `task` card in the conversation lets you steer or stop one of them; this needs OMP 18.4.9 or newer. Composer pill preferences are shared by clients connected to the same host; normal use requires no other plugin-specific settings.
|
|
35
35
|
|
|
36
|
-
Open the **Accounts** tab of the **OMP** sidebar to see the logins in OMP's own credential store with their usage and banked resets, add a login through OMP's own sign-in, sign one out, spend a banked reset, and steer OMP's balancing: prefer a login, keep part of its quota in reserve, and set what OMP does at a limit. Steering is written to OMP's own config. See [OMP accounts](docs/configuration.md#omp-accounts).
|
|
36
|
+
Open the **Accounts** tab of the **OMP** sidebar to see the logins in OMP's own credential store with their usage and banked resets, add a login through OMP's own sign-in, sign one out, spend a banked reset, and steer OMP's balancing: prefer a login, keep part of its quota in reserve, and set what OMP does at a limit. Each login shows plan and organization badges from its usage report, such as **Business**, **Pro Lite**, **Personal** or an organization name, and the label drops OMP's parenthesized organization once a badge shows it. Steering is written to OMP's own config. See [OMP accounts](docs/configuration.md#omp-accounts).
|
|
37
37
|
|
|
38
|
-
The quota popover groups recorded limits by provider and OMP account, showing an available recorded email or, when absent, the Copilot account ID (GitHub username) across that account's windows. Duplicate and unnamed accounts receive numbers in opaque account-key order, so changing usage does not swap their numbers; accounts are still displayed by highest usage. Duplicate-name suffixes stay visible when long emails truncate, and a lone unnamed account needs no heading. Copilot accounts also show **GitHub** or **GHE · host**, using the enterprise URL in OMP's recorded account key; unrecognized keys show neither. Only a server-side SHA-256 hash of the account key reaches the client. **CURRENT PROVIDER** identifies the session's provider, not its active account. Provider summary percentages show the highest recorded usage across that provider's accounts.
|
|
38
|
+
The quota popover groups recorded limits by provider and OMP account, showing an available recorded email or, when absent, the Copilot account ID (GitHub username) across that account's windows. Duplicate and unnamed accounts receive numbers in opaque account-key order, so changing usage does not swap their numbers; accounts are still displayed by highest usage. Duplicate-name suffixes stay visible when long emails truncate, and a lone unnamed account needs no heading. Copilot accounts also show **GitHub** or **GHE · host**, using the enterprise URL in OMP's recorded account key; unrecognized keys show neither. Badges beside each account name show the plan (such as **Business** or **Pro Lite**) and organization name from OMP's cached usage report for that account; an Anthropic organization named after the account's email shows as **Personal**, and accounts without a cached plan or organization show no badge. Only a server-side SHA-256 hash of the account key reaches the client. **CURRENT PROVIDER** identifies the session's provider, not its active account. Paseo sees an OMP Plugin agent's model only as an opaque id, so the pill and popover ask the agent's live OMP session which provider that model belongs to; a closed OMP Plugin agent shows every provider until its session runs again. Provider summary percentages show the highest recorded usage across that provider's accounts. Reset countdowns a day or more away show days and hours, such as **resets 14d 21h**.
|
|
39
39
|
|
|
40
40
|
Open the **MCPs** tab of the **OMP** sidebar to list the MCP servers OMP connects to, add one by URL or command, test, enable, disable or remove it, and sign a remote server in through your browser, like **Accounts** does for logins. See [OMP MCP servers](docs/configuration.md#omp-mcp-servers).
|
|
41
41
|
|
|
@@ -191,9 +191,26 @@ function AccountCard({
|
|
|
191
191
|
return (
|
|
192
192
|
<View style={styles.card}>
|
|
193
193
|
<View style={styles.cardHeader}>
|
|
194
|
-
<
|
|
195
|
-
{
|
|
196
|
-
|
|
194
|
+
<View
|
|
195
|
+
style={{
|
|
196
|
+
flexDirection: "row",
|
|
197
|
+
alignItems: "center",
|
|
198
|
+
flexWrap: "wrap",
|
|
199
|
+
gap: 6,
|
|
200
|
+
flexShrink: 1,
|
|
201
|
+
}}
|
|
202
|
+
>
|
|
203
|
+
<Text numberOfLines={1} style={[styles.cardTitle, { flexShrink: 1 }]}>
|
|
204
|
+
{account.label}
|
|
205
|
+
</Text>
|
|
206
|
+
{account.tags.map((tag) => (
|
|
207
|
+
<View key={tag} style={styles.chip}>
|
|
208
|
+
<Text numberOfLines={1} style={styles.chipText}>
|
|
209
|
+
{tag}
|
|
210
|
+
</Text>
|
|
211
|
+
</View>
|
|
212
|
+
))}
|
|
213
|
+
</View>
|
|
197
214
|
{account.resets ? (
|
|
198
215
|
<View style={styles.chip}>
|
|
199
216
|
<Text style={styles.chipText}>{resetsLabel(account.resets)}</Text>
|
package/client/quota-popover.tsx
CHANGED
|
@@ -4,9 +4,10 @@ import { useQuery } from "@tanstack/react-query";
|
|
|
4
4
|
import { useMemo } from "react";
|
|
5
5
|
import { Text, View } from "react-native";
|
|
6
6
|
import { storeForProvider, storeLabel } from "../shared/omp-store";
|
|
7
|
-
import { listOmpQuotas } from "../shared/quota";
|
|
7
|
+
import { getOmpSessionModelProvider, listOmpQuotas } from "../shared/quota";
|
|
8
8
|
import { ompStoreKey } from "./omp-store-state";
|
|
9
9
|
import {
|
|
10
|
+
needsSessionModelProvider,
|
|
10
11
|
type QuotaProviderGroup,
|
|
11
12
|
quotaDetailLabel,
|
|
12
13
|
quotaProviderFromSession,
|
|
@@ -21,8 +22,35 @@ const QUOTA_POLL_MS = 30_000;
|
|
|
21
22
|
export function QuotaPopover(props: PluginButtonContentProps) {
|
|
22
23
|
const { theme, layout } = props;
|
|
23
24
|
const agentId = props.context === "agent" ? props.agentId : "";
|
|
24
|
-
const session = useAgent(agentId, (agent) => ({
|
|
25
|
-
|
|
25
|
+
const session = useAgent(agentId, (agent) => ({
|
|
26
|
+
model: agent.model,
|
|
27
|
+
provider: agent.provider,
|
|
28
|
+
status: agent.status,
|
|
29
|
+
}));
|
|
30
|
+
const loadSessionModelProvider = useRpc(getOmpSessionModelProvider);
|
|
31
|
+
const sessionModelProvider = useQuery({
|
|
32
|
+
// The answer comes from the live session, so a closed or resumed session asks again.
|
|
33
|
+
queryKey: [
|
|
34
|
+
"paseo-omp",
|
|
35
|
+
"session-model-provider",
|
|
36
|
+
agentId,
|
|
37
|
+
session?.model ?? null,
|
|
38
|
+
session?.status ?? null,
|
|
39
|
+
],
|
|
40
|
+
queryFn: () => loadSessionModelProvider({ agentId }),
|
|
41
|
+
// A closed agent has no live session to ask, as in the pill.
|
|
42
|
+
enabled: Boolean(
|
|
43
|
+
agentId &&
|
|
44
|
+
session &&
|
|
45
|
+
session.status !== "closed" &&
|
|
46
|
+
needsSessionModelProvider(session.provider, session.model),
|
|
47
|
+
),
|
|
48
|
+
retry: false,
|
|
49
|
+
});
|
|
50
|
+
const currentProvider =
|
|
51
|
+
quotaProviderFromSession(session?.provider ?? "", session?.model ?? null) ??
|
|
52
|
+
sessionModelProvider.data?.provider ??
|
|
53
|
+
null;
|
|
26
54
|
const store = storeForProvider(session?.provider);
|
|
27
55
|
const loadQuotas = useRpc(listOmpQuotas);
|
|
28
56
|
const quotas = useQuery({
|
|
@@ -85,7 +113,7 @@ export function QuotaPopover(props: PluginButtonContentProps) {
|
|
|
85
113
|
},
|
|
86
114
|
detail: { color: theme.colors.foregroundMuted, fontSize: 11 },
|
|
87
115
|
account: { gap: 6, paddingTop: 4 },
|
|
88
|
-
accountHeading: { flexDirection: "row" as const, alignItems: "
|
|
116
|
+
accountHeading: { flexDirection: "row" as const, alignItems: "center" as const },
|
|
89
117
|
accountLabel: {
|
|
90
118
|
color: theme.colors.foregroundMuted,
|
|
91
119
|
fontSize: 11,
|
|
@@ -93,6 +121,29 @@ export function QuotaPopover(props: PluginButtonContentProps) {
|
|
|
93
121
|
minWidth: 0,
|
|
94
122
|
},
|
|
95
123
|
accountSuffix: { color: theme.colors.foregroundMuted, fontSize: 11, flexShrink: 0 },
|
|
124
|
+
// Badges may shrink (each ellipsized) so a long organization never pushes the name out.
|
|
125
|
+
tags: { flexDirection: "row" as const, gap: 4, flexShrink: 1, minWidth: 0 },
|
|
126
|
+
headingTags: {
|
|
127
|
+
flexDirection: "row" as const,
|
|
128
|
+
gap: 4,
|
|
129
|
+
flexShrink: 1,
|
|
130
|
+
minWidth: 0,
|
|
131
|
+
marginLeft: 6,
|
|
132
|
+
},
|
|
133
|
+
tag: {
|
|
134
|
+
color: theme.colors.foregroundMuted,
|
|
135
|
+
fontSize: 10,
|
|
136
|
+
fontWeight: "600" as const,
|
|
137
|
+
paddingHorizontal: 6,
|
|
138
|
+
paddingVertical: 1,
|
|
139
|
+
borderRadius: 999,
|
|
140
|
+
borderWidth: 1,
|
|
141
|
+
borderColor: theme.colors.border,
|
|
142
|
+
overflow: "hidden" as const,
|
|
143
|
+
flexShrink: 1,
|
|
144
|
+
minWidth: 0,
|
|
145
|
+
maxWidth: 160,
|
|
146
|
+
},
|
|
96
147
|
}),
|
|
97
148
|
[layout.compact, theme],
|
|
98
149
|
);
|
|
@@ -141,9 +192,9 @@ export function QuotaPopover(props: PluginButtonContentProps) {
|
|
|
141
192
|
{account.label ? (
|
|
142
193
|
<View
|
|
143
194
|
accessibilityRole="header"
|
|
144
|
-
accessibilityLabel={
|
|
145
|
-
|
|
146
|
-
|
|
195
|
+
accessibilityLabel={[account.label, account.suffix, ...account.tags]
|
|
196
|
+
.filter(Boolean)
|
|
197
|
+
.join(" · ")}
|
|
147
198
|
style={styles.accountHeading}
|
|
148
199
|
>
|
|
149
200
|
<Text numberOfLines={1} ellipsizeMode="middle" style={styles.accountLabel}>
|
|
@@ -152,6 +203,23 @@ export function QuotaPopover(props: PluginButtonContentProps) {
|
|
|
152
203
|
{account.suffix ? (
|
|
153
204
|
<Text style={styles.accountSuffix}>{` · ${account.suffix}`}</Text>
|
|
154
205
|
) : null}
|
|
206
|
+
{account.tags.length > 0 ? (
|
|
207
|
+
<View style={styles.headingTags}>
|
|
208
|
+
{account.tags.map((tag) => (
|
|
209
|
+
<Text key={tag} numberOfLines={1} style={styles.tag}>
|
|
210
|
+
{tag}
|
|
211
|
+
</Text>
|
|
212
|
+
))}
|
|
213
|
+
</View>
|
|
214
|
+
) : null}
|
|
215
|
+
</View>
|
|
216
|
+
) : account.tags.length > 0 ? (
|
|
217
|
+
<View style={styles.tags}>
|
|
218
|
+
{account.tags.map((tag) => (
|
|
219
|
+
<Text key={tag} numberOfLines={1} style={styles.tag}>
|
|
220
|
+
{tag}
|
|
221
|
+
</Text>
|
|
222
|
+
))}
|
|
155
223
|
</View>
|
|
156
224
|
) : null}
|
|
157
225
|
{account.accountService ? (
|
package/client/quota-state.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { accountTags } from "../shared/account-tags";
|
|
1
2
|
import type { OmpQuota } from "../shared/quota";
|
|
2
3
|
import { isOmpProvider } from "./omp-store-state";
|
|
3
4
|
|
|
@@ -43,6 +44,15 @@ export function quotaProviderFromSession(
|
|
|
43
44
|
return model?.includes("/") ? model.split("/")[0] : null;
|
|
44
45
|
}
|
|
45
46
|
|
|
47
|
+
/** An OMP Plugin agent's model reaches Paseo as an opaque id; its live session names the provider. */
|
|
48
|
+
export function needsSessionModelProvider(provider: string, model: string | null): boolean {
|
|
49
|
+
return (
|
|
50
|
+
isOmpProvider(provider.split("/")[0]) &&
|
|
51
|
+
Boolean(model) &&
|
|
52
|
+
quotaProviderFromSession(provider, model) === null
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
|
|
46
56
|
export function quotaProviderLabel(provider: string | null): string {
|
|
47
57
|
return provider
|
|
48
58
|
? (PROVIDER_LABELS[provider] ?? `${provider.slice(0, 1).toUpperCase()}${provider.slice(1)}`)
|
|
@@ -97,6 +107,8 @@ export type QuotaAccountGroup = {
|
|
|
97
107
|
accountService: OmpQuota["accountService"];
|
|
98
108
|
accountHost: string | null;
|
|
99
109
|
label: string | null;
|
|
110
|
+
/** Plan and organization badges, e.g. "Business", "Personal" or an organization name. */
|
|
111
|
+
tags: string[];
|
|
100
112
|
suffix: string | null;
|
|
101
113
|
quotas: OmpQuota[];
|
|
102
114
|
peakFraction: number | null;
|
|
@@ -143,6 +155,14 @@ export function quotaProviderGroups(
|
|
|
143
155
|
return groups;
|
|
144
156
|
}
|
|
145
157
|
|
|
158
|
+
function quotaAccountTags(quotas: readonly OmpQuota[], email: string | null): string[] {
|
|
159
|
+
return accountTags({
|
|
160
|
+
plan: quotas.find((quota) => quota.plan)?.plan ?? null,
|
|
161
|
+
organization: quotas.find((quota) => quota.organization)?.organization ?? null,
|
|
162
|
+
email,
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
|
|
146
166
|
function quotaAccountGroups(quotas: readonly OmpQuota[]): QuotaAccountGroup[] {
|
|
147
167
|
const byAccount = new Map<string, OmpQuota[]>();
|
|
148
168
|
for (const quota of quotas) {
|
|
@@ -165,6 +185,7 @@ function quotaAccountGroups(quotas: readonly OmpQuota[]): QuotaAccountGroup[] {
|
|
|
165
185
|
email,
|
|
166
186
|
accountService: service?.accountService ?? null,
|
|
167
187
|
accountHost: service?.accountHost ?? null,
|
|
188
|
+
tags: quotaAccountTags(accountQuotas, email),
|
|
168
189
|
label: email ?? accountId,
|
|
169
190
|
suffix: null,
|
|
170
191
|
quotas: [...accountQuotas].sort((a, b) => (b.usedFraction ?? -1) - (a.usedFraction ?? -1)),
|
|
@@ -207,9 +228,10 @@ function quotaAccountGroups(quotas: readonly OmpQuota[]): QuotaAccountGroup[] {
|
|
|
207
228
|
export function quotaResetLabel(resetsAtMs: number | null, nowMs: number = Date.now()): string {
|
|
208
229
|
if (resetsAtMs === null) return "";
|
|
209
230
|
const remainingMs = Math.max(0, resetsAtMs - nowMs);
|
|
210
|
-
const
|
|
231
|
+
const totalHours = Math.floor(remainingMs / 3_600_000);
|
|
211
232
|
const minutes = Math.floor((remainingMs % 3_600_000) / 60_000);
|
|
212
|
-
|
|
233
|
+
if (totalHours >= 24) return `resets ${Math.floor(totalHours / 24)}d ${totalHours % 24}h`;
|
|
234
|
+
return totalHours > 0 ? `resets ${totalHours}h ${minutes}m` : `resets ${minutes}m`;
|
|
213
235
|
}
|
|
214
236
|
|
|
215
237
|
export function quotaRecordedLabel(recordedAtMs: number, nowMs: number = Date.now()): string {
|
package/index.client.tsx
CHANGED
|
@@ -28,6 +28,7 @@ import { quotaProviderIcon } from "./client/provider-icon";
|
|
|
28
28
|
import { OmpImageTimeline } from "./client/provider-image";
|
|
29
29
|
import { QuotaPopover } from "./client/quota-popover";
|
|
30
30
|
import {
|
|
31
|
+
needsSessionModelProvider,
|
|
31
32
|
type QuotaSeverity,
|
|
32
33
|
quotaProviderFromSession,
|
|
33
34
|
quotaSeverityForProvider,
|
|
@@ -61,7 +62,7 @@ import {
|
|
|
61
62
|
import { OMP_MCP_AUTH_TIMELINE_KIND, ompMcpAuthorizationTimelineSchema } from "./shared/mcp";
|
|
62
63
|
import { type OmpStore, storeForProvider } from "./shared/omp-store";
|
|
63
64
|
import { ompImageTimelineSchema, transformOmpImageToolItem } from "./shared/provider-image";
|
|
64
|
-
import { listOmpQuotas } from "./shared/quota";
|
|
65
|
+
import { getOmpSessionModelProvider, listOmpQuotas } from "./shared/quota";
|
|
65
66
|
import { OMP_RULE_NOTICE_KIND, ompRuleNoticeSchema } from "./shared/rule-notices";
|
|
66
67
|
import { OMP_SUBAGENT_STRIP_KIND, ompSubagentStripSchema } from "./shared/subagents";
|
|
67
68
|
|
|
@@ -71,6 +72,7 @@ const STATUS_POLL_MS = 4_000;
|
|
|
71
72
|
const QUOTA_POLL_MS = 30_000;
|
|
72
73
|
const RECONCILE_DEBOUNCE_MS = 250;
|
|
73
74
|
const SETTINGS_POLL_MS = 15_000;
|
|
75
|
+
const SESSION_PROVIDER_RETRY_MS = 60_000;
|
|
74
76
|
const composerPillSettingsRpc = settingsRpc(composerPillSettings.id);
|
|
75
77
|
|
|
76
78
|
type AgentEntry = PaseoAgentListResult["entries"][number];
|
|
@@ -382,15 +384,52 @@ export default function contribute(client: PluginClientContext) {
|
|
|
382
384
|
}
|
|
383
385
|
}
|
|
384
386
|
|
|
387
|
+
// Agent id to its session's provider, asked again only when the agent's model or status changes.
|
|
388
|
+
// A failed lookup is kept too, but only until `retryAt`, so a server without the RPC is not asked
|
|
389
|
+
// on every reconcile and a transient failure still recovers.
|
|
390
|
+
const sessionModelProviders = new Map<
|
|
391
|
+
string,
|
|
392
|
+
{ key: string; provider: string | null; retryAt?: number }
|
|
393
|
+
>();
|
|
394
|
+
|
|
395
|
+
async function sessionModelProvider(agent: AgentEntry["agent"]): Promise<string | null> {
|
|
396
|
+
if (agent.status === "closed" || !needsSessionModelProvider(agent.provider, agent.model)) {
|
|
397
|
+
return null;
|
|
398
|
+
}
|
|
399
|
+
const key = `${agent.model}|${agent.status}`;
|
|
400
|
+
const cached = sessionModelProviders.get(agent.id);
|
|
401
|
+
if (cached?.key === key && (cached.retryAt === undefined || Date.now() < cached.retryAt)) {
|
|
402
|
+
return cached.provider;
|
|
403
|
+
}
|
|
404
|
+
try {
|
|
405
|
+
const { provider } = await client.rpc(getOmpSessionModelProvider, { agentId: agent.id });
|
|
406
|
+
sessionModelProviders.set(agent.id, { key, provider });
|
|
407
|
+
return provider;
|
|
408
|
+
} catch {
|
|
409
|
+
sessionModelProviders.set(agent.id, {
|
|
410
|
+
key,
|
|
411
|
+
provider: null,
|
|
412
|
+
retryAt: Date.now() + SESSION_PROVIDER_RETRY_MS,
|
|
413
|
+
});
|
|
414
|
+
return null;
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
|
|
385
418
|
async function reconcileOnce(): Promise<void> {
|
|
386
419
|
if (!preferences) return;
|
|
387
|
-
const
|
|
420
|
+
const listed = (await loadAgents(client.paseo)).filter(
|
|
421
|
+
({ agent }) => !agent.archivedAt && agent.workspaceId && agent.cwd,
|
|
422
|
+
);
|
|
423
|
+
const sessionProviders = await Promise.all(
|
|
424
|
+
listed.map(({ agent }) => sessionModelProvider(agent)),
|
|
425
|
+
);
|
|
388
426
|
if (disposed || !preferences) return;
|
|
389
427
|
const activeIds = new Set<string>();
|
|
390
|
-
for (const { agent } of
|
|
391
|
-
if (
|
|
428
|
+
for (const [index, { agent }] of listed.entries()) {
|
|
429
|
+
if (!agent.workspaceId || !agent.cwd) continue;
|
|
392
430
|
activeIds.add(agent.id);
|
|
393
|
-
const quotaProvider =
|
|
431
|
+
const quotaProvider =
|
|
432
|
+
quotaProviderFromSession(agent.provider, agent.model) ?? sessionProviders[index];
|
|
394
433
|
const store = storeForProvider(agent.provider);
|
|
395
434
|
let entry = pills.get(agent.id);
|
|
396
435
|
if (
|
|
@@ -419,6 +458,9 @@ export default function contribute(client: PluginClientContext) {
|
|
|
419
458
|
removePills(entry);
|
|
420
459
|
pills.delete(agentId);
|
|
421
460
|
}
|
|
461
|
+
for (const agentId of sessionModelProviders.keys()) {
|
|
462
|
+
if (!activeIds.has(agentId)) sessionModelProviders.delete(agentId);
|
|
463
|
+
}
|
|
422
464
|
await Promise.all([refreshHubStatus(), refreshQuotaStatus()]);
|
|
423
465
|
}
|
|
424
466
|
|
package/index.server.ts
CHANGED
|
@@ -57,6 +57,7 @@ import { ompRuleNoticeRow } from "./server/rule-notices";
|
|
|
57
57
|
import {
|
|
58
58
|
OmpSubagentControlRegistry,
|
|
59
59
|
resolveCancelOmpSubagent,
|
|
60
|
+
resolveGetOmpSessionModelProvider,
|
|
60
61
|
resolveSteerOmpSubagent,
|
|
61
62
|
} from "./server/subagents";
|
|
62
63
|
import { resolveGetOmpSupportReport } from "./server/support-diagnostics";
|
|
@@ -116,7 +117,7 @@ import { getOmpUpdateStatus, installOmpUpdate } from "./shared/omp-update";
|
|
|
116
117
|
import { getOmpProviderHealth } from "./shared/provider-diagnostics";
|
|
117
118
|
import { getOmpImage } from "./shared/provider-image";
|
|
118
119
|
import { providerLaunchSettings } from "./shared/provider-launch-settings";
|
|
119
|
-
import { listOmpQuotas } from "./shared/quota";
|
|
120
|
+
import { getOmpSessionModelProvider, listOmpQuotas } from "./shared/quota";
|
|
120
121
|
import { cancelOmpSubagent, steerOmpSubagent } from "./shared/subagents";
|
|
121
122
|
import { getOmpSupportReport } from "./shared/support-diagnostics";
|
|
122
123
|
|
|
@@ -283,6 +284,9 @@ export default function contribute(server: PluginServerContext) {
|
|
|
283
284
|
server.handle(steerOmpSubagent, (input) =>
|
|
284
285
|
resolveSteerOmpSubagent(input, subagentControlRegistry),
|
|
285
286
|
);
|
|
287
|
+
server.handle(getOmpSessionModelProvider, (input) =>
|
|
288
|
+
resolveGetOmpSessionModelProvider(input, subagentControlRegistry),
|
|
289
|
+
);
|
|
286
290
|
const removeTurnRows = registerOmpTurnRows(server, [ompRuleNoticeRow, ompScreenshotRow]);
|
|
287
291
|
const removeSessionOpenHook = server.before("agent.session_open", ({ request }) => {
|
|
288
292
|
if (request.provider !== "omp-plugin" && !request.provider.startsWith("omp-plugin-")) return;
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@omercnet/paseo-omp",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.8.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@omercnet/paseo-omp",
|
|
9
|
-
"version": "5.
|
|
9
|
+
"version": "5.8.0",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@getpaseo/protocol": "0.
|
|
11
|
+
"@getpaseo/protocol": "0.17.0-beta.1",
|
|
12
12
|
"@modelcontextprotocol/sdk": "1.32.2",
|
|
13
13
|
"yaml": "^2.9.0"
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
"node_modules/@getpaseo/protocol": {
|
|
17
|
-
"version": "0.
|
|
18
|
-
"resolved": "https://registry.npmjs.org/@getpaseo/protocol/-/protocol-0.
|
|
19
|
-
"integrity": "sha512-
|
|
17
|
+
"version": "0.17.0-beta.1",
|
|
18
|
+
"resolved": "https://registry.npmjs.org/@getpaseo/protocol/-/protocol-0.17.0-beta.1.tgz",
|
|
19
|
+
"integrity": "sha512-vCb+WV944xEvuat4I4jQMRa5UX1bwkEe2QJF2RjPnSrkywt0WqwK69E7R5WYMRWIdM6lZ7rlK8jeh5oMgaZjew==",
|
|
20
20
|
"license": "Apache-2.0",
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"semver": "^7.8.5",
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
"node_modules/@hono/node-server": {
|
|
27
|
-
"version": "2.1.
|
|
28
|
-
"resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-2.1.
|
|
29
|
-
"integrity": "sha512-
|
|
27
|
+
"version": "2.1.11",
|
|
28
|
+
"resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-2.1.11.tgz",
|
|
29
|
+
"integrity": "sha512-KzKz9vl4vvr1vgLHamj+g5uonbrj5NwAdO3yzOS6cd2HjALVeOgTgeZOyAzNxejbkfOOPIcvuf/Tg8l1pEFLog==",
|
|
30
30
|
"license": "MIT",
|
|
31
31
|
"engines": {
|
|
32
32
|
"node": ">=20"
|
|
@@ -314,9 +314,9 @@
|
|
|
314
314
|
"license": "MIT"
|
|
315
315
|
},
|
|
316
316
|
"node_modules/encodeurl": {
|
|
317
|
-
"version": "2.0.
|
|
318
|
-
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.
|
|
319
|
-
"integrity": "sha512-
|
|
317
|
+
"version": "2.0.3",
|
|
318
|
+
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.3.tgz",
|
|
319
|
+
"integrity": "sha512-mIteYONiEfc4xWf2F1WXovh1c8npzS00vNeiUPdwFF+QlVJni+gNvpQltLMQhob8rew/bWWc/bGTuUr0EUGt0w==",
|
|
320
320
|
"license": "MIT",
|
|
321
321
|
"engines": {
|
|
322
322
|
"node": ">= 0.8"
|
|
@@ -436,9 +436,9 @@
|
|
|
436
436
|
}
|
|
437
437
|
},
|
|
438
438
|
"node_modules/express-rate-limit": {
|
|
439
|
-
"version": "8.7.
|
|
440
|
-
"resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-8.7.
|
|
441
|
-
"integrity": "sha512-
|
|
439
|
+
"version": "8.7.5",
|
|
440
|
+
"resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-8.7.5.tgz",
|
|
441
|
+
"integrity": "sha512-wi+v38cx2EqD0JnhE/e74o5tFqKWUOAPFJIgyEiqJ8v2MNpoOAA3kI2hXYOI+YM+HE5yqbdAlVxm2GqOIeYOgA==",
|
|
442
442
|
"license": "MIT",
|
|
443
443
|
"dependencies": {
|
|
444
444
|
"debug": "^4.4.3",
|
|
@@ -611,9 +611,9 @@
|
|
|
611
611
|
}
|
|
612
612
|
},
|
|
613
613
|
"node_modules/hono": {
|
|
614
|
-
"version": "4.13.
|
|
615
|
-
"resolved": "https://registry.npmjs.org/hono/-/hono-4.13.
|
|
616
|
-
"integrity": "sha512-
|
|
614
|
+
"version": "4.13.19",
|
|
615
|
+
"resolved": "https://registry.npmjs.org/hono/-/hono-4.13.19.tgz",
|
|
616
|
+
"integrity": "sha512-KmXvQAXwcAHV+muzbIwoJ23niEB5nMoDVr9WcRkU8mvjUECm/1+7v4Jgp7P7a+H6MLFrh+vXrGonGrGS+RQfkA==",
|
|
617
617
|
"license": "MIT",
|
|
618
618
|
"engines": {
|
|
619
619
|
"node": ">=16.9.0"
|
|
@@ -692,9 +692,9 @@
|
|
|
692
692
|
"license": "ISC"
|
|
693
693
|
},
|
|
694
694
|
"node_modules/jose": {
|
|
695
|
-
"version": "6.2.
|
|
696
|
-
"resolved": "https://registry.npmjs.org/jose/-/jose-6.2.
|
|
697
|
-
"integrity": "sha512-
|
|
695
|
+
"version": "6.2.18",
|
|
696
|
+
"resolved": "https://registry.npmjs.org/jose/-/jose-6.2.18.tgz",
|
|
697
|
+
"integrity": "sha512-doV4thUwgkrycJH4yLeqwTGIIZphHl+pk7CPReuMIhYhncmgzdko85MaCG4YQFTxqMFr1/oEH32tZuKKovcDEg==",
|
|
698
698
|
"license": "MIT",
|
|
699
699
|
"funding": {
|
|
700
700
|
"url": "https://github.com/sponsors/panva"
|
|
@@ -816,9 +816,9 @@
|
|
|
816
816
|
}
|
|
817
817
|
},
|
|
818
818
|
"node_modules/object-inspect": {
|
|
819
|
-
"version": "1.
|
|
820
|
-
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.
|
|
821
|
-
"integrity": "sha512-
|
|
819
|
+
"version": "1.14.0",
|
|
820
|
+
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.14.0.tgz",
|
|
821
|
+
"integrity": "sha512-IVgHNlp/jwQX271+Xzoq9LZNTWXxZK+cEOrGBOBxXNbn7fapnZ+Ts6TVMgNOuAezwG2wdtnMX97tTPK6VEnuOQ==",
|
|
822
822
|
"license": "MIT",
|
|
823
823
|
"engines": {
|
|
824
824
|
"node": ">= 0.4"
|
|
@@ -960,9 +960,9 @@
|
|
|
960
960
|
}
|
|
961
961
|
},
|
|
962
962
|
"node_modules/router": {
|
|
963
|
-
"version": "2.
|
|
964
|
-
"resolved": "https://registry.npmjs.org/router/-/router-2.
|
|
965
|
-
"integrity": "sha512-
|
|
963
|
+
"version": "2.3.0",
|
|
964
|
+
"resolved": "https://registry.npmjs.org/router/-/router-2.3.0.tgz",
|
|
965
|
+
"integrity": "sha512-bpowRfGjEPe8t9R6fJIzhwmyCGAXwKvxBUsgJm+bJukwdcWmUXbMo7p22w7aYmQBPQTUMNqMV39YX0kMou3z8w==",
|
|
966
966
|
"license": "MIT",
|
|
967
967
|
"dependencies": {
|
|
968
968
|
"debug": "^4.4.0",
|
|
@@ -973,6 +973,10 @@
|
|
|
973
973
|
},
|
|
974
974
|
"engines": {
|
|
975
975
|
"node": ">= 18"
|
|
976
|
+
},
|
|
977
|
+
"funding": {
|
|
978
|
+
"type": "opencollective",
|
|
979
|
+
"url": "https://opencollective.com/express"
|
|
976
980
|
}
|
|
977
981
|
},
|
|
978
982
|
"node_modules/safer-buffer": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@omercnet/paseo-omp",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.8.0-next.528.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Paseo integration for OMP, including its direct provider and workspace tooling.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -54,18 +54,18 @@
|
|
|
54
54
|
"typecheck": "tsc --noEmit -p tsconfig.client.json && tsc --noEmit -p tsconfig.server.json && tsc --noEmit -p tsconfig.tests.json"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@getpaseo/protocol": "0.
|
|
57
|
+
"@getpaseo/protocol": "0.17.0-beta.1",
|
|
58
58
|
"@modelcontextprotocol/sdk": "1.32.2",
|
|
59
59
|
"yaml": "^2.9.0"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@biomejs/biome": "^2.5.10",
|
|
63
|
-
"@getpaseo/cli": "0.
|
|
64
|
-
"@getpaseo/client": "0.
|
|
65
|
-
"@getpaseo/plugin": "0.
|
|
66
|
-
"@getpaseo/server": "0.
|
|
67
|
-
"@oh-my-pi/pi-agent-core": "18.
|
|
68
|
-
"@oh-my-pi/pi-coding-agent": "18.
|
|
63
|
+
"@getpaseo/cli": "0.17.0-beta.1",
|
|
64
|
+
"@getpaseo/client": "0.17.0-beta.1",
|
|
65
|
+
"@getpaseo/plugin": "0.17.0-beta.1",
|
|
66
|
+
"@getpaseo/server": "0.17.0-beta.1",
|
|
67
|
+
"@oh-my-pi/pi-agent-core": "18.22.2",
|
|
68
|
+
"@oh-my-pi/pi-coding-agent": "18.22.2",
|
|
69
69
|
"@tanstack/react-query": "^5.102.3",
|
|
70
70
|
"@types/node": "^24.10.1",
|
|
71
71
|
"@types/react": "^19.2.18",
|
|
@@ -73,10 +73,10 @@
|
|
|
73
73
|
"@vitest/coverage-v8": "^5.0.0",
|
|
74
74
|
"esbuild": "0.28.2",
|
|
75
75
|
"happy-dom": "^21.0.4",
|
|
76
|
+
"pino": "10.4.0",
|
|
76
77
|
"react": "19.1.0",
|
|
77
78
|
"react-dom": "19.1.0",
|
|
78
79
|
"react-native": "0.81.5",
|
|
79
|
-
"pino": "10.4.0",
|
|
80
80
|
"tsx": "^4.20.6",
|
|
81
81
|
"typescript": "^7.0.2",
|
|
82
82
|
"vitest": "^5.0.0",
|
package/paseo-plugin.json
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"id": "paseo-omp",
|
|
3
3
|
"description": "Paseo integration for OMP, including its direct provider and workspace tooling.",
|
|
4
4
|
"icon": "icon.png",
|
|
5
|
-
"requirements": { "paseo": "^0.14.0 || ^0.15.0 || ^0.16.0" },
|
|
5
|
+
"requirements": { "paseo": "^0.14.0 || ^0.15.0 || ^0.16.0 || ^0.17.0" },
|
|
6
6
|
"build": [["node", "scripts/prepare-dependencies.mjs"]]
|
|
7
7
|
}
|