@omercnet/paseo-omp 0.2.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.
Files changed (63) hide show
  1. package/CHANGELOG.md +87 -0
  2. package/LICENSE +21 -0
  3. package/README.md +110 -0
  4. package/SUPPORT.md +40 -0
  5. package/TESTING.md +147 -0
  6. package/client/hub-icon.tsx +12 -0
  7. package/client/hub-popover.tsx +132 -0
  8. package/client/hub-status.ts +29 -0
  9. package/client/memory-panel.tsx +71 -0
  10. package/client/memory-popover.tsx +70 -0
  11. package/client/omp-config-surface.tsx +1274 -0
  12. package/client/omp-doc-links.ts +117 -0
  13. package/client/omp-plugin-manager.tsx +833 -0
  14. package/client/provider-diagnostics-state.ts +250 -0
  15. package/client/provider-icon.tsx +27 -0
  16. package/client/provider-image.tsx +66 -0
  17. package/client/quota-popover.tsx +150 -0
  18. package/client/quota-state.ts +131 -0
  19. package/client/sessions-popover.tsx +73 -0
  20. package/docs/alpha-release-checklist.md +70 -0
  21. package/docs/configuration.md +122 -0
  22. package/docs/core-provider-issue-audit.md +108 -0
  23. package/docs/installation.md +73 -0
  24. package/index.client.tsx +272 -0
  25. package/index.server.ts +51 -0
  26. package/package.json +84 -0
  27. package/paseo-plugin.json +5 -0
  28. package/server/hub.ts +145 -0
  29. package/server/memory.ts +86 -0
  30. package/server/mutation-queue.ts +12 -0
  31. package/server/omp-config.ts +126 -0
  32. package/server/omp-plugins.ts +627 -0
  33. package/server/omp-settings.ts +291 -0
  34. package/server/paths.ts +64 -0
  35. package/server/provider/catalog.ts +173 -0
  36. package/server/provider/config-normalization.ts +148 -0
  37. package/server/provider/connection.ts +992 -0
  38. package/server/provider/host-tools.ts +706 -0
  39. package/server/provider/image.ts +143 -0
  40. package/server/provider/mcp-transport.ts +394 -0
  41. package/server/provider/omp-rpc.ts +2739 -0
  42. package/server/provider/omp.svg +5 -0
  43. package/server/provider/provider-options.ts +27 -0
  44. package/server/provider/registration.ts +151 -0
  45. package/server/provider/security.ts +317 -0
  46. package/server/provider/session-descriptors.ts +431 -0
  47. package/server/provider/session.ts +4451 -0
  48. package/server/provider/settings.ts +78 -0
  49. package/server/provider/subsessions.ts +847 -0
  50. package/server/provider/timeline-projector.ts +1764 -0
  51. package/server/provider-diagnostics.ts +1057 -0
  52. package/server/quota.ts +54 -0
  53. package/server/sessions.ts +58 -0
  54. package/shared/hub.ts +43 -0
  55. package/shared/memory.ts +23 -0
  56. package/shared/omp-config.ts +81 -0
  57. package/shared/omp-plugins.ts +223 -0
  58. package/shared/omp-settings.ts +207 -0
  59. package/shared/provider-diagnostics.ts +117 -0
  60. package/shared/provider-image.ts +160 -0
  61. package/shared/quota.ts +22 -0
  62. package/shared/sessions.ts +23 -0
  63. package/tsconfig.json +16 -0
@@ -0,0 +1,71 @@
1
+ import type { PluginWorkspacePanelProps } from "@getpaseo/plugin/client";
2
+ import { useRpc, useWorkspace } from "@getpaseo/plugin/client";
3
+ import { useQuery } from "@tanstack/react-query";
4
+ import { useMemo } from "react";
5
+ import { ScrollView, Text, View } from "react-native";
6
+ import { listOmpMemory } from "../shared/memory";
7
+
8
+ const MEMORY_POLL_MS = 15_000;
9
+
10
+ export function OmpMemoryPanel({ theme, layout, workspaceId }: PluginWorkspacePanelProps) {
11
+ const directory = useWorkspace(workspaceId, (workspace) => workspace.directory) ?? "";
12
+ const loadMemory = useRpc(listOmpMemory);
13
+ const memory = useQuery({
14
+ queryKey: ["paseo-omp", "memory", directory],
15
+ queryFn: () => loadMemory({ cwd: directory }),
16
+ enabled: directory.length > 0,
17
+ refetchInterval: MEMORY_POLL_MS,
18
+ });
19
+ const styles = useMemo(
20
+ () => ({
21
+ root: {
22
+ flex: 1,
23
+ gap: layout.compact ? 10 : 14,
24
+ padding: layout.compact ? 16 : 24,
25
+ backgroundColor: theme.colors.surface0,
26
+ },
27
+ title: {
28
+ color: theme.colors.foreground,
29
+ fontSize: layout.compact ? 20 : 24,
30
+ fontWeight: "700" as const,
31
+ },
32
+ subtitle: { color: theme.colors.foregroundMuted, fontSize: 13 },
33
+ card: {
34
+ gap: 6,
35
+ padding: layout.compact ? 10 : 12,
36
+ borderWidth: 1,
37
+ borderColor: theme.colors.border,
38
+ borderRadius: 10,
39
+ backgroundColor: theme.colors.surface1,
40
+ },
41
+ fact: { color: theme.colors.foreground, fontSize: 14 },
42
+ detail: { color: theme.colors.foregroundMuted, fontSize: 12 },
43
+ error: { color: theme.colors.statusDanger, fontSize: 13 },
44
+ }),
45
+ [layout.compact, theme],
46
+ );
47
+
48
+ return (
49
+ <ScrollView contentContainerStyle={styles.root}>
50
+ <View style={{ gap: 4 }}>
51
+ <Text style={styles.title}>OMP Memory</Text>
52
+ <Text style={styles.subtitle}>
53
+ {memory.data?.bank ? `Bank: ${memory.data.bank}` : "Retained workspace facts"}
54
+ </Text>
55
+ </View>
56
+ {memory.isLoading ? <Text style={styles.subtitle}>Loading retained facts…</Text> : null}
57
+ {memory.error ? <Text style={styles.error}>Could not read workspace memory.</Text> : null}
58
+ {!memory.isLoading && !memory.error && (memory.data?.facts.length ?? 0) === 0 ? (
59
+ <Text style={styles.subtitle}>No retained facts for this workspace.</Text>
60
+ ) : null}
61
+ {memory.data?.facts.map((fact) => (
62
+ <View key={fact.id} style={styles.card}>
63
+ <Text style={styles.fact}>{`${fact.subject} ${fact.predicate} ${fact.object}`}</Text>
64
+ <Text style={styles.detail}>
65
+ {`${Math.round(fact.confidence * 100)}% confidence${fact.timestamp ? ` · ${fact.timestamp}` : ""}`}
66
+ </Text>
67
+ </View>
68
+ ))}
69
+ </ScrollView>
70
+ );
71
+ }
@@ -0,0 +1,70 @@
1
+ import { type PluginButtonContentProps, useAgent, useRpc } from "@getpaseo/plugin/client";
2
+ import { useQuery } from "@tanstack/react-query";
3
+ import { useMemo } from "react";
4
+ import { Text, View } from "react-native";
5
+ import { listOmpMemory } from "../shared/memory";
6
+
7
+ const MEMORY_POLL_MS = 15_000;
8
+ const PREVIEW_LIMIT = 20;
9
+
10
+ export function MemoryPopover(props: PluginButtonContentProps) {
11
+ const { theme, layout } = props;
12
+ const agentId = props.context === "agent" ? props.agentId : "";
13
+ const cwd = useAgent(agentId, (agent) => agent.cwd) ?? "";
14
+ const loadMemory = useRpc(listOmpMemory);
15
+ const memory = useQuery({
16
+ queryKey: ["paseo-omp", "memory", cwd],
17
+ queryFn: () => loadMemory({ cwd }),
18
+ enabled: cwd.length > 0,
19
+ refetchInterval: MEMORY_POLL_MS,
20
+ });
21
+ const styles = useMemo(
22
+ () => ({
23
+ root: { gap: layout.compact ? 8 : 10, minWidth: layout.compact ? undefined : 260 },
24
+ muted: { color: theme.colors.foregroundMuted, fontSize: 12 },
25
+ error: { color: theme.colors.statusDanger, fontSize: 13 },
26
+ header: { flexDirection: "row" as const, justifyContent: "space-between" as const, gap: 12 },
27
+ title: { color: theme.colors.foreground, fontSize: 14, fontWeight: "700" as const },
28
+ card: {
29
+ gap: 4,
30
+ padding: layout.compact ? 9 : 10,
31
+ borderWidth: 1,
32
+ borderColor: theme.colors.border,
33
+ borderRadius: 9,
34
+ backgroundColor: theme.colors.surface1,
35
+ },
36
+ fact: { color: theme.colors.foreground, fontSize: 13 },
37
+ detail: { color: theme.colors.foregroundMuted, fontSize: 11 },
38
+ }),
39
+ [layout.compact, theme],
40
+ );
41
+
42
+ if (memory.isLoading) return <Text style={styles.muted}>Loading retained facts…</Text>;
43
+ if (memory.error) return <Text style={styles.error}>Could not read workspace memory.</Text>;
44
+
45
+ const facts = memory.data?.facts ?? [];
46
+ if (facts.length === 0) {
47
+ return <Text style={styles.muted}>No retained facts for this workspace.</Text>;
48
+ }
49
+
50
+ return (
51
+ <View style={styles.root}>
52
+ <View style={styles.header}>
53
+ <Text style={styles.title}>OMP Memory</Text>
54
+ <Text style={styles.muted}>{facts.length} facts</Text>
55
+ </View>
56
+ <Text style={styles.muted}>{memory.data?.bank ?? "Workspace memory"}</Text>
57
+ {facts.slice(0, PREVIEW_LIMIT).map((fact) => (
58
+ <View key={fact.id} style={styles.card}>
59
+ <Text style={styles.fact}>{`${fact.subject} ${fact.predicate} ${fact.object}`}</Text>
60
+ <Text style={styles.detail}>
61
+ {`${Math.round(fact.confidence * 100)}% confidence${fact.timestamp ? ` · ${fact.timestamp}` : ""}`}
62
+ </Text>
63
+ </View>
64
+ ))}
65
+ {facts.length > PREVIEW_LIMIT ? (
66
+ <Text style={styles.muted}>{`Showing ${PREVIEW_LIMIT} of ${facts.length}`}</Text>
67
+ ) : null}
68
+ </View>
69
+ );
70
+ }