@omercnet/paseo-omp 0.2.1 → 0.3.0-next.100.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/CHANGELOG.md +26 -0
- package/README.md +25 -13
- package/SUPPORT.md +7 -3
- package/TESTING.md +21 -18
- package/client/composer-pill-settings.tsx +157 -0
- package/client/external-url.ts +15 -0
- package/client/mcp-authorization.tsx +169 -0
- package/client/mcp-popover.tsx +155 -0
- package/client/memory-panel.tsx +8 -3
- package/client/memory-popover.tsx +8 -4
- package/client/omp-config-surface.tsx +189 -29
- package/client/omp-plugin-manager.tsx +302 -131
- package/client/omp-store-picker.tsx +89 -0
- package/client/omp-store-state.ts +45 -0
- package/client/paseo-types.ts +9 -0
- package/client/provider-diagnostics-state.ts +18 -7
- package/client/quota-popover.tsx +8 -3
- package/client/quota-state.ts +16 -7
- package/client/sessions-popover.tsx +8 -3
- package/docs/alpha-release-checklist.md +6 -8
- package/docs/configuration.md +8 -4
- package/docs/core-provider-issue-audit.md +3 -2
- package/docs/images/mcp-authorization-compact.png +0 -0
- package/docs/images/mcp-controls-wide.png +0 -0
- package/docs/images/plugin-manager.png +0 -0
- package/docs/images/workspace-settings.png +0 -0
- package/docs/installation.md +35 -19
- package/index.client.tsx +339 -123
- package/index.server.ts +44 -14
- package/package.json +7 -8
- package/paseo-plugin.json +2 -2
- package/scripts/prepare-dependencies.mjs +24 -0
- package/server/mcp-browser.ts +95 -0
- package/server/memory.ts +2 -2
- package/server/omp-config.ts +16 -7
- package/server/omp-plugins.ts +70 -21
- package/server/omp-settings.ts +232 -24
- package/server/paths.ts +128 -11
- package/server/provider/catalog.ts +3 -4
- package/server/provider/connection.ts +248 -17
- package/server/provider/host-tools.ts +294 -26
- package/server/provider/omp-rpc.ts +498 -72
- package/server/provider/profile-providers.ts +249 -0
- package/server/provider/registration.ts +11 -0
- package/server/provider/security.ts +8 -10
- package/server/provider/session-descriptors.ts +306 -1
- package/server/provider/session.ts +704 -249
- package/server/provider/subsessions.ts +25 -2
- package/server/provider/timeline-projector.ts +104 -44
- package/server/provider-diagnostics.ts +122 -36
- package/server/quota.ts +3 -2
- package/server/sessions.ts +2 -2
- package/shared/composer-pill-settings.ts +28 -0
- package/shared/external-url.ts +21 -0
- package/shared/hub.ts +3 -3
- package/shared/mcp.ts +47 -0
- package/shared/memory.ts +2 -1
- package/shared/omp-config.ts +5 -1
- package/shared/omp-plugins.ts +74 -33
- package/shared/omp-settings.ts +8 -1
- package/shared/omp-store.ts +58 -0
- package/shared/provider-diagnostics.ts +12 -3
- package/shared/quota.ts +2 -1
- package/shared/sessions.ts +2 -1
package/shared/omp-settings.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { defineRpc } from "@getpaseo/plugin";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
+
import { OmpWorkspaceCwdSchema } from "./hub";
|
|
4
|
+
import { OmpStoreSchema } from "./omp-store";
|
|
3
5
|
|
|
4
6
|
export const OMP_SETTINGS_CATALOG_VERSION = 1;
|
|
5
7
|
|
|
@@ -23,6 +25,7 @@ export const OmpSettingSchema = z
|
|
|
23
25
|
value: z.unknown().optional(),
|
|
24
26
|
redacted: z.boolean().optional(),
|
|
25
27
|
configured: z.boolean().optional(),
|
|
28
|
+
workspaceOverride: z.boolean().optional(),
|
|
26
29
|
})
|
|
27
30
|
.strict();
|
|
28
31
|
export type OmpSetting = z.infer<typeof OmpSettingSchema>;
|
|
@@ -167,7 +170,9 @@ export function formatOmpSettingLabel(path: string): string {
|
|
|
167
170
|
|
|
168
171
|
export const listOmpSettings = defineRpc({
|
|
169
172
|
name: "paseo-omp.list-settings",
|
|
170
|
-
input: z
|
|
173
|
+
input: z
|
|
174
|
+
.object({ store: OmpStoreSchema.optional(), cwd: OmpWorkspaceCwdSchema.optional() })
|
|
175
|
+
.strict(),
|
|
171
176
|
output: z.object({
|
|
172
177
|
catalogVersion: z.literal(OMP_SETTINGS_CATALOG_VERSION),
|
|
173
178
|
revision: z.string().optional(),
|
|
@@ -187,6 +192,8 @@ const OmpSettingChangeSchema = z.discriminatedUnion("operation", [
|
|
|
187
192
|
export const updateOmpSettings = defineRpc({
|
|
188
193
|
name: "paseo-omp.update-settings",
|
|
189
194
|
input: z.object({
|
|
195
|
+
store: OmpStoreSchema.optional(),
|
|
196
|
+
cwd: OmpWorkspaceCwdSchema.optional(),
|
|
190
197
|
revision: z.string(),
|
|
191
198
|
changes: z.array(OmpSettingChangeSchema).min(1).max(100),
|
|
192
199
|
}),
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { defineRpc } from "@getpaseo/plugin";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
|
|
4
|
+
const OMP_PROFILE_NAME = /^[a-z0-9][a-z0-9._-]{0,63}$/u;
|
|
5
|
+
const WINDOWS_RESERVED_PROFILE = /^(?:CON|PRN|AUX|NUL|COM[0-9]|LPT[0-9])(?:\..*)?$/iu;
|
|
6
|
+
|
|
7
|
+
export function isOmpProfileName(value: string): boolean {
|
|
8
|
+
return (
|
|
9
|
+
value !== "default" &&
|
|
10
|
+
!value.endsWith(".") &&
|
|
11
|
+
OMP_PROFILE_NAME.test(value) &&
|
|
12
|
+
!WINDOWS_RESERVED_PROFILE.test(value)
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const OmpProfileNameSchema = z.string().trim().refine(isOmpProfileName, {
|
|
17
|
+
message: "Invalid named OMP profile",
|
|
18
|
+
});
|
|
19
|
+
export const OmpStoreSchema = z
|
|
20
|
+
.object({
|
|
21
|
+
profile: OmpProfileNameSchema.optional(),
|
|
22
|
+
agentDir: z
|
|
23
|
+
.string()
|
|
24
|
+
.min(1)
|
|
25
|
+
.max(4096)
|
|
26
|
+
.refine((value) => !value.includes("\0"))
|
|
27
|
+
// Browser validation accepts absolute paths from any supported server OS;
|
|
28
|
+
// withOmpStore additionally applies node:path.isAbsolute on the server.
|
|
29
|
+
.refine(
|
|
30
|
+
(value) => /^(?:\/|[A-Za-z]:[\\/]|\\)/u.test(value),
|
|
31
|
+
"OMP agent directory must be absolute",
|
|
32
|
+
)
|
|
33
|
+
.optional(),
|
|
34
|
+
})
|
|
35
|
+
.strict()
|
|
36
|
+
.refine(
|
|
37
|
+
(value) => !(value.profile && value.agentDir),
|
|
38
|
+
"Choose a profile or agent directory, not both",
|
|
39
|
+
);
|
|
40
|
+
export type OmpStore = z.infer<typeof OmpStoreSchema>;
|
|
41
|
+
export const listOmpStores = defineRpc({
|
|
42
|
+
name: "paseo-omp.list-stores",
|
|
43
|
+
input: z.object({}).strict(),
|
|
44
|
+
output: z.object({ profiles: z.array(OmpProfileNameSchema).max(128) }),
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
export function storeForProvider(provider: string | undefined): OmpStore | undefined {
|
|
48
|
+
if (!provider?.startsWith("omp-plugin-")) return;
|
|
49
|
+
const profile = provider.slice("omp-plugin-".length);
|
|
50
|
+
return isOmpProfileName(profile) ? { profile } : undefined;
|
|
51
|
+
}
|
|
52
|
+
export function storeLabel(store?: OmpStore): string {
|
|
53
|
+
return store?.profile
|
|
54
|
+
? `Profile: ${store.profile}`
|
|
55
|
+
: store?.agentDir
|
|
56
|
+
? "Custom agent directory"
|
|
57
|
+
: "Daemon default store";
|
|
58
|
+
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { defineRpc } from "@getpaseo/plugin";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
+
import { OmpWorkspaceCwdSchema } from "./hub";
|
|
4
|
+
import { OmpStoreSchema } from "./omp-store";
|
|
3
5
|
|
|
4
6
|
// Health/compatibility facts about the omp CLI itself, surfaced on the global OMP page. This is
|
|
5
7
|
// an explicit allowlist, not a passthrough: filesystem locations are sanitized display labels
|
|
@@ -48,9 +50,12 @@ export const OmpProcessDiagnosticsSchema = z.object({
|
|
|
48
50
|
/** "partial" means a project daemon directory or candidate metadata file could not be
|
|
49
51
|
* inspected; the count reflects only entries whose metadata was confirmed. */
|
|
50
52
|
status: z.enum(["ok", "partial", "unavailable", "unknown"]),
|
|
51
|
-
/**
|
|
52
|
-
* unless "ok" or "partial". */
|
|
53
|
+
/** Metadata file count under the hub run root, never a count of verified live processes. */
|
|
53
54
|
trackedCount: z.number().int().nonnegative().nullable(),
|
|
55
|
+
/** Counts by recorded state only; optional for compatibility with older plugin hosts. */
|
|
56
|
+
activeCount: z.number().int().nonnegative().nullable().optional(),
|
|
57
|
+
historicalCount: z.number().int().nonnegative().nullable().optional(),
|
|
58
|
+
unknownCount: z.number().int().nonnegative().nullable().optional(),
|
|
54
59
|
});
|
|
55
60
|
export type OmpProcessDiagnostics = z.infer<typeof OmpProcessDiagnosticsSchema>;
|
|
56
61
|
|
|
@@ -112,6 +117,10 @@ export type OmpProviderHealth = z.infer<typeof OmpProviderHealthSchema>;
|
|
|
112
117
|
|
|
113
118
|
export const getOmpProviderHealth = defineRpc({
|
|
114
119
|
name: "paseo-omp.get-provider-health",
|
|
115
|
-
input: z.object({
|
|
120
|
+
input: z.object({
|
|
121
|
+
store: OmpStoreSchema.optional(),
|
|
122
|
+
force: z.boolean().optional(),
|
|
123
|
+
cwd: OmpWorkspaceCwdSchema.optional(),
|
|
124
|
+
}),
|
|
116
125
|
output: OmpProviderHealthSchema,
|
|
117
126
|
});
|
package/shared/quota.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { defineRpc } from "@getpaseo/plugin";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
+
import { OmpStoreSchema } from "./omp-store";
|
|
3
4
|
|
|
4
5
|
// omp's usage_history stores recorded_at/resets_at as epoch milliseconds (confirmed against
|
|
5
6
|
// live rows: 13-digit values), not seconds. Any "time remaining" math must diff against
|
|
@@ -17,6 +18,6 @@ export type OmpQuota = z.infer<typeof OmpQuotaSchema>;
|
|
|
17
18
|
|
|
18
19
|
export const listOmpQuotas = defineRpc({
|
|
19
20
|
name: "paseo-omp.list-quotas",
|
|
20
|
-
input: z.object({}),
|
|
21
|
+
input: z.object({ store: OmpStoreSchema.optional() }),
|
|
21
22
|
output: z.object({ quotas: z.array(OmpQuotaSchema) }),
|
|
22
23
|
});
|
package/shared/sessions.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { defineRpc } from "@getpaseo/plugin";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
+
import { OmpStoreSchema } from "./omp-store";
|
|
3
4
|
|
|
4
5
|
const CwdSchema = z.string().min(1).max(4_096);
|
|
5
6
|
|
|
@@ -18,6 +19,6 @@ export type OmpSessionEntry = z.infer<typeof OmpSessionEntrySchema>;
|
|
|
18
19
|
|
|
19
20
|
export const listOmpSessions = defineRpc({
|
|
20
21
|
name: "paseo-omp.list-sessions",
|
|
21
|
-
input: z.object({ cwd: CwdSchema }),
|
|
22
|
+
input: z.object({ store: OmpStoreSchema.optional(), cwd: CwdSchema }),
|
|
22
23
|
output: z.object({ sessions: z.array(OmpSessionEntrySchema) }),
|
|
23
24
|
});
|