@omercnet/paseo-omp 5.6.3-next.485.1 → 5.6.3-next.487.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/README.md +1 -1
- package/client/omp-config-surface.tsx +25 -27
- package/client/omp-config-views.ts +2 -5
- package/client/omp-local-models-section.tsx +18 -4
- package/index.client.tsx +7 -1
- package/package.json +1 -1
- package/server/package-version.ts +1 -1
- package/shared/omp-local-models.ts +13 -0
package/README.md
CHANGED
|
@@ -31,7 +31,7 @@ paseo plugin install npm:@omercnet/paseo-omp@<version>
|
|
|
31
31
|
paseo plugin ls paseo-omp
|
|
32
32
|
```
|
|
33
33
|
|
|
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 are available in the workspace OMP panel,
|
|
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
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).
|
|
37
37
|
|
|
@@ -248,13 +248,11 @@ function BinarySection({
|
|
|
248
248
|
theme,
|
|
249
249
|
styles,
|
|
250
250
|
health,
|
|
251
|
-
workspaceScoped,
|
|
252
251
|
onUpdateInstalled,
|
|
253
252
|
}: {
|
|
254
253
|
theme: PluginSurfaceProps["theme"];
|
|
255
254
|
styles: OmpConfigStyles;
|
|
256
255
|
health: OmpProviderHealth;
|
|
257
|
-
workspaceScoped: boolean;
|
|
258
256
|
onUpdateInstalled(): void;
|
|
259
257
|
}) {
|
|
260
258
|
const summary = summarizeBinaryHealth(health.binary);
|
|
@@ -277,7 +275,7 @@ function BinarySection({
|
|
|
277
275
|
valueColor={theme.colors.statusDanger}
|
|
278
276
|
/>
|
|
279
277
|
) : null}
|
|
280
|
-
{health.binary.installed
|
|
278
|
+
{health.binary.installed ? (
|
|
281
279
|
<OmpUpdateRow styles={styles} theme={theme} onInstalled={onUpdateInstalled} />
|
|
282
280
|
) : null}
|
|
283
281
|
</SectionCard>
|
|
@@ -534,7 +532,7 @@ function ProviderHealthSection({
|
|
|
534
532
|
cacheHealth: (value) => queryClient.setQueryData(healthKey, value),
|
|
535
533
|
cacheProviders: (value) => queryClient.setQueryData(PROVIDERS_QUERY_KEY, value),
|
|
536
534
|
}),
|
|
537
|
-
|
|
535
|
+
loadUpdateStatus({ force: true }).catch(() => undefined),
|
|
538
536
|
]);
|
|
539
537
|
if (update) queryClient.setQueryData(UPDATE_QUERY_KEY, update);
|
|
540
538
|
await queryClient.invalidateQueries({ queryKey: PROMPT_FILES_QUERY_KEY });
|
|
@@ -585,7 +583,6 @@ function ProviderHealthSection({
|
|
|
585
583
|
theme={theme}
|
|
586
584
|
styles={styles}
|
|
587
585
|
health={health.data}
|
|
588
|
-
workspaceScoped={cwd !== undefined}
|
|
589
586
|
onUpdateInstalled={() => reloadHealth.mutate()}
|
|
590
587
|
/>
|
|
591
588
|
) : null}
|
|
@@ -1293,7 +1290,7 @@ function OmpConfigContent({
|
|
|
1293
1290
|
}, []);
|
|
1294
1291
|
|
|
1295
1292
|
const save = useMutation({
|
|
1296
|
-
mutationKey: ["paseo-omp", "settings", ompStoreKey(store)],
|
|
1293
|
+
mutationKey: ["paseo-omp", "settings", ompStoreKey(store), cwd ?? "global"],
|
|
1297
1294
|
mutationFn: async () => {
|
|
1298
1295
|
const revision = settingsQuery.data?.revision;
|
|
1299
1296
|
if (!revision) throw new Error("OMP settings cannot be edited without a current revision.");
|
|
@@ -1420,19 +1417,17 @@ function OmpConfigContent({
|
|
|
1420
1417
|
</>
|
|
1421
1418
|
) : null}
|
|
1422
1419
|
|
|
1423
|
-
{view === "accounts"
|
|
1420
|
+
{view === "accounts" ? (
|
|
1424
1421
|
<OmpAccountsSection theme={theme} styles={styles} store={store} />
|
|
1425
1422
|
) : null}
|
|
1426
1423
|
|
|
1427
|
-
{view === "mcps"
|
|
1428
|
-
<OmpMcpsSection theme={theme} styles={styles} store={store} />
|
|
1429
|
-
) : null}
|
|
1424
|
+
{view === "mcps" ? <OmpMcpsSection theme={theme} styles={styles} store={store} /> : null}
|
|
1430
1425
|
|
|
1431
1426
|
{view === "plugin" ? (
|
|
1432
1427
|
<>
|
|
1433
1428
|
<PluginConfigurationSection styles={styles} />
|
|
1434
1429
|
<ToolBoundaryCard styles={styles} />
|
|
1435
|
-
|
|
1430
|
+
<ProviderLaunchSettingsSection theme={theme} />
|
|
1436
1431
|
</>
|
|
1437
1432
|
) : null}
|
|
1438
1433
|
|
|
@@ -1457,7 +1452,7 @@ function OmpConfigContent({
|
|
|
1457
1452
|
{view === "security" && cwd ? (
|
|
1458
1453
|
<OmpSecuritySection styles={styles} cwd={cwd} store={store} />
|
|
1459
1454
|
) : null}
|
|
1460
|
-
{view === "composer" &&
|
|
1455
|
+
{view === "composer" && onComposerPillSettingsChange ? (
|
|
1461
1456
|
<ComposerPillSettingsSection theme={theme} onChange={onComposerPillSettingsChange} />
|
|
1462
1457
|
) : null}
|
|
1463
1458
|
|
|
@@ -1671,20 +1666,19 @@ function OmpConfigContent({
|
|
|
1671
1666
|
store={store}
|
|
1672
1667
|
cwd={cwd}
|
|
1673
1668
|
/>
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
) : null}
|
|
1669
|
+
<OmpLocalModelsSection
|
|
1670
|
+
styles={styles}
|
|
1671
|
+
store={store}
|
|
1672
|
+
cwd={cwd}
|
|
1673
|
+
modelRoles={savedModelRoles}
|
|
1674
|
+
settingsRevision={settingsQuery.data?.revision}
|
|
1675
|
+
rolesPending={drafts.modelRoles !== undefined}
|
|
1676
|
+
onRolesChanged={(catalog) => {
|
|
1677
|
+
if (catalog) queryClient.setQueryData(settingsQueryKey, catalog);
|
|
1678
|
+
void queryClient.invalidateQueries({ queryKey: SETTINGS_QUERY_KEY });
|
|
1679
|
+
void queryClient.invalidateQueries({ queryKey: ["paseo-omp", "config"] });
|
|
1680
|
+
}}
|
|
1681
|
+
/>
|
|
1688
1682
|
</>
|
|
1689
1683
|
) : null}
|
|
1690
1684
|
</ScrollView>
|
|
@@ -1728,7 +1722,11 @@ export function OmpConfigSurface(
|
|
|
1728
1722
|
return <OmpStoreContent {...props} />;
|
|
1729
1723
|
}
|
|
1730
1724
|
|
|
1731
|
-
export function OmpWorkspacePanel(
|
|
1725
|
+
export function OmpWorkspacePanel(
|
|
1726
|
+
props: PluginWorkspacePanelProps & {
|
|
1727
|
+
onComposerPillSettingsChange?: (settings: ComposerPillSettings) => void;
|
|
1728
|
+
},
|
|
1729
|
+
) {
|
|
1732
1730
|
const cwd = useWorkspace(props.workspaceId, (workspace) => workspace.directory);
|
|
1733
1731
|
if (!cwd) {
|
|
1734
1732
|
return (
|
|
@@ -29,10 +29,7 @@ const SURFACE_VIEWS: readonly { id: OmpConfigSurfaceView; label: string }[] = [
|
|
|
29
29
|
{ id: "help", label: "Help" },
|
|
30
30
|
];
|
|
31
31
|
|
|
32
|
-
/** Views
|
|
33
|
-
const STORE_ONLY_VIEWS: readonly OmpConfigSurfaceView[] = ["composer", "accounts", "mcps"];
|
|
34
|
-
|
|
35
|
-
/** Views about one project, which the global OMP screen has no project for. */
|
|
32
|
+
/** Views about one project: the workspace panel adds them, and the global OMP screen has no project for them. Every other view is on both surfaces. */
|
|
36
33
|
const WORKSPACE_ONLY_VIEWS: readonly OmpConfigSurfaceView[] = ["security"];
|
|
37
34
|
|
|
38
35
|
interface SurfaceScope {
|
|
@@ -42,7 +39,7 @@ interface SurfaceScope {
|
|
|
42
39
|
}
|
|
43
40
|
|
|
44
41
|
export function surfaceViewsForScope({ workspaceScoped, pluginProviderEnabled }: SurfaceScope) {
|
|
45
|
-
const hidden = workspaceScoped ?
|
|
42
|
+
const hidden = workspaceScoped ? [] : WORKSPACE_ONLY_VIEWS;
|
|
46
43
|
return SURFACE_VIEWS.filter(
|
|
47
44
|
(candidate) =>
|
|
48
45
|
!hidden.includes(candidate.id) && (pluginProviderEnabled || candidate.id !== "plugin"),
|
|
@@ -5,6 +5,7 @@ import { Pressable, Text, View } from "react-native";
|
|
|
5
5
|
import {
|
|
6
6
|
downloadOmpLocalModel,
|
|
7
7
|
listOmpLocalModels,
|
|
8
|
+
localModelRoleAction,
|
|
8
9
|
type OmpLocalModel,
|
|
9
10
|
withLocalModelRole,
|
|
10
11
|
} from "../shared/omp-local-models";
|
|
@@ -62,6 +63,7 @@ function status(model: OmpLocalModel): string {
|
|
|
62
63
|
export function OmpLocalModelsSection({
|
|
63
64
|
styles,
|
|
64
65
|
store,
|
|
66
|
+
cwd,
|
|
65
67
|
modelRoles,
|
|
66
68
|
settingsRevision,
|
|
67
69
|
rolesPending,
|
|
@@ -69,6 +71,8 @@ export function OmpLocalModelsSection({
|
|
|
69
71
|
}: {
|
|
70
72
|
styles: OmpConfigStyles;
|
|
71
73
|
store: OmpStore | undefined;
|
|
74
|
+
/** In the workspace panel, a role assignment is a project override of that workspace. */
|
|
75
|
+
cwd?: string;
|
|
72
76
|
modelRoles: Readonly<Record<string, unknown>>;
|
|
73
77
|
settingsRevision: string | undefined;
|
|
74
78
|
/** Unapplied edits to modelRoles would be overwritten by a role assignment made here. */
|
|
@@ -93,11 +97,12 @@ export function OmpLocalModelsSection({
|
|
|
93
97
|
onSettled: () => queryClient.invalidateQueries({ queryKey }),
|
|
94
98
|
});
|
|
95
99
|
const assign = useMutation({
|
|
96
|
-
mutationKey: ["paseo-omp", "settings", ompStoreKey(store)],
|
|
100
|
+
mutationKey: ["paseo-omp", "settings", ompStoreKey(store), cwd ?? "global"],
|
|
97
101
|
mutationFn: async (next: Record<string, unknown>) => {
|
|
98
102
|
if (!settingsRevision) throw new Error("OMP settings cannot be edited without a revision.");
|
|
99
103
|
const input = updateOmpSettings.input.parse({
|
|
100
104
|
...(store ? { store } : {}),
|
|
105
|
+
...(cwd ? { cwd } : {}),
|
|
101
106
|
revision: settingsRevision,
|
|
102
107
|
changes: [{ operation: "set", path: "modelRoles", value: next }],
|
|
103
108
|
});
|
|
@@ -128,6 +133,14 @@ export function OmpLocalModelsSection({
|
|
|
128
133
|
if the local model fails, the session stays untitled. The first download can also install
|
|
129
134
|
OMP's inference runtime, so it may take longer and use more disk than the model size.
|
|
130
135
|
</Text>
|
|
136
|
+
{cwd ? (
|
|
137
|
+
<Text style={styles.settingDescription}>
|
|
138
|
+
Here a role can be set for this workspace but not cleared. Setting one saves every
|
|
139
|
+
current role as this project's modelRoles override, so later global changes no longer
|
|
140
|
+
reach this workspace. To clear a role, remove the project's modelRoles override under
|
|
141
|
+
Configuration; the workspace then follows the global roles again.
|
|
142
|
+
</Text>
|
|
143
|
+
) : null}
|
|
131
144
|
{models.error || (models.data && !models.data.available) ? (
|
|
132
145
|
<Text style={styles.error}>OMP could not list its local models.</Text>
|
|
133
146
|
) : null}
|
|
@@ -194,15 +207,16 @@ export function OmpLocalModelsSection({
|
|
|
194
207
|
{ROLES.map(({ role, label }) => {
|
|
195
208
|
const selector = `local/${model.key}`;
|
|
196
209
|
const assigned = modelRoles[role] === selector;
|
|
210
|
+
const action = localModelRoleAction(assigned, cwd !== undefined);
|
|
197
211
|
return (
|
|
198
212
|
<Choice
|
|
199
213
|
key={role}
|
|
200
214
|
styles={styles}
|
|
201
215
|
label={assigned ? `Using for ${label}` : `Use for ${label}`}
|
|
202
|
-
accessibilityLabel={`${
|
|
216
|
+
accessibilityLabel={`${action === "use" ? "Use" : action === "stop" ? "Stop using" : "Using"} ${model.label} for ${label}`}
|
|
203
217
|
selected={assigned}
|
|
204
|
-
disabled={blocked}
|
|
205
|
-
onPress={() => assignRole(role,
|
|
218
|
+
disabled={blocked || action === "unavailable"}
|
|
219
|
+
onPress={() => assignRole(role, action === "stop" ? null : selector)}
|
|
206
220
|
/>
|
|
207
221
|
);
|
|
208
222
|
})}
|
package/index.client.tsx
CHANGED
|
@@ -3,6 +3,7 @@ import type {
|
|
|
3
3
|
PluginButtonRegistration,
|
|
4
4
|
PluginClientContext,
|
|
5
5
|
PluginSurfaceProps,
|
|
6
|
+
PluginWorkspacePanelProps,
|
|
6
7
|
} from "@getpaseo/plugin/client";
|
|
7
8
|
import { OmpAstEditCard } from "./client/ast-edit";
|
|
8
9
|
import { ConfigSidebarItem } from "./client/config-sidebar";
|
|
@@ -192,12 +193,17 @@ export default function contribute(client: PluginClientContext) {
|
|
|
192
193
|
openPanel("memory", { location: "explorer" });
|
|
193
194
|
},
|
|
194
195
|
});
|
|
196
|
+
function WorkspacePanel(props: PluginWorkspacePanelProps) {
|
|
197
|
+
return (
|
|
198
|
+
<OmpWorkspacePanel {...props} onComposerPillSettingsChange={applyComposerPillSettings} />
|
|
199
|
+
);
|
|
200
|
+
}
|
|
195
201
|
const removeWorkspacePanel = client.addWorkspacePanel({
|
|
196
202
|
id: "workspace",
|
|
197
203
|
title: "OMP",
|
|
198
204
|
icon: "Settings",
|
|
199
205
|
locations: ["workspace", "explorer"],
|
|
200
|
-
Component:
|
|
206
|
+
Component: WorkspacePanel,
|
|
201
207
|
});
|
|
202
208
|
const removeOpenWorkspace = client.addCommandCenterItem({
|
|
203
209
|
id: "open-workspace",
|
package/package.json
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** Release Please keeps this bundle-safe constant aligned with package.json. */
|
|
2
|
-
export const PASEO_OMP_PACKAGE_VERSION = "5.6.3-next.
|
|
2
|
+
export const PASEO_OMP_PACKAGE_VERSION = "5.6.3-next.487.1"; // x-release-please-version
|
|
@@ -42,3 +42,16 @@ export function withLocalModelRole(
|
|
|
42
42
|
const { [role]: _replaced, ...rest } = roles;
|
|
43
43
|
return selector === null ? rest : { ...rest, [role]: selector };
|
|
44
44
|
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* What pressing a model's role button may do. OMP merges a project `modelRoles` override with the
|
|
48
|
+
* global record key by key and has no value that clears a role, so a workspace write can set a role
|
|
49
|
+
* but never stop an inherited one: there the "Stop using" press is unavailable.
|
|
50
|
+
*/
|
|
51
|
+
export function localModelRoleAction(
|
|
52
|
+
assigned: boolean,
|
|
53
|
+
workspaceScoped: boolean,
|
|
54
|
+
): "use" | "stop" | "unavailable" {
|
|
55
|
+
if (!assigned) return "use";
|
|
56
|
+
return workspaceScoped ? "unavailable" : "stop";
|
|
57
|
+
}
|