@opengeni/react 0.11.0 → 0.13.0

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 (85) hide show
  1. package/README.md +1 -1
  2. package/dist/{chunk-5C7RGAWA.js → chunk-NFYVQWIB.js} +170 -64
  3. package/dist/chunk-NFYVQWIB.js.map +1 -0
  4. package/dist/index.d.ts +791 -145
  5. package/dist/index.js +5447 -2213
  6. package/dist/index.js.map +1 -1
  7. package/dist/{machines-BeZ3bD3t.d.ts → machines-CnlMb7E-.d.ts} +5 -5
  8. package/dist/machines.d.ts +1 -1
  9. package/dist/machines.js +1 -1
  10. package/package.json +17 -12
  11. package/src/approvals.ts +16 -4
  12. package/src/client.ts +32 -5
  13. package/src/commands/index.ts +1 -7
  14. package/src/commands/registry.ts +46 -12
  15. package/src/components/chat-composer.tsx +135 -39
  16. package/src/components/code-editor.tsx +28 -36
  17. package/src/components/command-palette.tsx +26 -5
  18. package/src/components/desktop-viewer.tsx +29 -16
  19. package/src/components/diff-view.tsx +27 -189
  20. package/src/components/enrollment-consent.tsx +28 -10
  21. package/src/components/enrollment-device-flow.tsx +8 -5
  22. package/src/components/file-browser.tsx +190 -56
  23. package/src/components/fleet-tile.tsx +13 -4
  24. package/src/components/machine-card.tsx +16 -4
  25. package/src/components/machine-dock-bar.tsx +20 -8
  26. package/src/components/machine-metrics.tsx +31 -8
  27. package/src/components/machine-status-pill.tsx +26 -5
  28. package/src/components/machines-dashboard.tsx +8 -2
  29. package/src/components/markdown.tsx +39 -9
  30. package/src/components/message-timeline.tsx +633 -109
  31. package/src/components/pierre-diff.tsx +83 -15
  32. package/src/components/pierre-file.tsx +10 -9
  33. package/src/components/sandbox-files.tsx +110 -227
  34. package/src/components/sandbox-terminal.tsx +256 -88
  35. package/src/components/sandbox-workspace.tsx +823 -0
  36. package/src/components/session-status.tsx +28 -2
  37. package/src/components/workbench-changes.tsx +541 -0
  38. package/src/components/workspace-dock.tsx +85 -22
  39. package/src/hooks/internal.ts +5 -2
  40. package/src/hooks/use-available-models.ts +7 -2
  41. package/src/hooks/use-billing-usage.ts +4 -1
  42. package/src/hooks/use-codex-accounts.ts +74 -44
  43. package/src/hooks/use-composer.ts +57 -36
  44. package/src/hooks/use-environments.ts +92 -47
  45. package/src/hooks/use-file-attachments.ts +101 -55
  46. package/src/hooks/use-goal.ts +52 -16
  47. package/src/hooks/use-machine-chip.ts +134 -0
  48. package/src/hooks/use-machines.ts +34 -16
  49. package/src/hooks/use-packs.ts +24 -19
  50. package/src/hooks/use-relay-frame-stream.ts +5 -2
  51. package/src/hooks/use-rigs.ts +335 -0
  52. package/src/hooks/use-sandbox-files.ts +213 -39
  53. package/src/hooks/use-sandbox-git.ts +188 -11
  54. package/src/hooks/use-sandbox-terminal.ts +18 -14
  55. package/src/hooks/use-scheduled-tasks.ts +10 -2
  56. package/src/hooks/use-session-capabilities.ts +77 -20
  57. package/src/hooks/use-session-control.ts +49 -21
  58. package/src/hooks/use-session-events.ts +48 -20
  59. package/src/hooks/use-session-lineage.ts +119 -0
  60. package/src/hooks/use-session.ts +43 -28
  61. package/src/hooks/use-slash-commands.ts +6 -4
  62. package/src/hooks/use-turn-queue.ts +74 -147
  63. package/src/hooks/use-windowed-sections.ts +204 -0
  64. package/src/hooks/use-workspace-capture.ts +233 -0
  65. package/src/hooks/use-workspace-edit.ts +231 -0
  66. package/src/hooks/use-workspace-sessions.ts +48 -5
  67. package/src/hooks/use-workspaces.ts +18 -15
  68. package/src/index.ts +128 -23
  69. package/src/lib/format.ts +44 -6
  70. package/src/lib/xterm-renderer.ts +65 -0
  71. package/src/lib/xterm-theme.ts +224 -18
  72. package/src/machines.ts +13 -3
  73. package/src/provider.tsx +3 -1
  74. package/src/timeline/activity-rail.tsx +213 -54
  75. package/src/timeline/disclosure-context.tsx +12 -2
  76. package/src/timeline/index.ts +21 -2
  77. package/src/timeline/parsers.ts +44 -10
  78. package/src/timeline/projection.ts +435 -84
  79. package/src/timeline/shared.tsx +111 -24
  80. package/src/timeline/tool-diff.tsx +24 -20
  81. package/src/timeline/tool-renderers.tsx +98 -21
  82. package/src/timeline/turn-summary.tsx +76 -23
  83. package/src/timeline/types.ts +96 -12
  84. package/styles/tokens.css +2 -2
  85. package/dist/chunk-5C7RGAWA.js.map +0 -1
@@ -73,7 +73,12 @@ export type ConnectionStatusPillProps = {
73
73
  * the Machines dashboard, the dock header, and the session timeline. Reconnecting
74
74
  * breathes (the resiliency-as-headline blip), online/offline hold still.
75
75
  */
76
- export function ConnectionStatusPill({ status, label, size = "md", className }: ConnectionStatusPillProps) {
76
+ export function ConnectionStatusPill({
77
+ status,
78
+ label,
79
+ size = "md",
80
+ className,
81
+ }: ConnectionStatusPillProps) {
77
82
  const meta = CONNECTION_STATUS_META[status];
78
83
  return (
79
84
  <span
@@ -100,8 +105,16 @@ export type ConnectionDotProps = {
100
105
  export function ConnectionDot({ status, className }: ConnectionDotProps) {
101
106
  const meta = CONNECTION_STATUS_META[status];
102
107
  return (
103
- <span className={cn("relative inline-flex size-1.5 shrink-0 rounded-full", meta.dotClassName, className)}>
104
- {meta.pulse ? <span className={cn("absolute inset-0 animate-og-pulse rounded-full", meta.dotClassName)} /> : null}
108
+ <span
109
+ className={cn(
110
+ "relative inline-flex size-1.5 shrink-0 rounded-full",
111
+ meta.dotClassName,
112
+ className,
113
+ )}
114
+ >
115
+ {meta.pulse ? (
116
+ <span className={cn("absolute inset-0 animate-og-pulse rounded-full", meta.dotClassName)} />
117
+ ) : null}
105
118
  </span>
106
119
  );
107
120
  }
@@ -121,11 +134,19 @@ export type MachineStatusPillProps = {
121
134
  * dashboard row, the dock header, and the timeline all reuse so the status
122
135
  * language is identical everywhere.
123
136
  */
124
- export function MachineStatusPill({ state, sharedSessionCount, size = "md", className }: MachineStatusPillProps) {
137
+ export function MachineStatusPill({
138
+ state,
139
+ sharedSessionCount,
140
+ size = "md",
141
+ className,
142
+ }: MachineStatusPillProps) {
125
143
  const stateBadge = MACHINE_STATE_BADGE_META[state];
126
144
  const shared = (sharedSessionCount ?? 0) > 1;
127
145
  return (
128
- <span className={cn("og-root inline-flex flex-wrap items-center gap-1", className)} data-machine-state={state}>
146
+ <span
147
+ className={cn("og-root inline-flex flex-wrap items-center gap-1", className)}
148
+ data-machine-state={state}
149
+ >
129
150
  <ConnectionStatusPill status={connectionStatusForState(state)} size={size} />
130
151
  {stateBadge ? (
131
152
  <span
@@ -143,7 +143,10 @@ export function MachinesDashboard({
143
143
  {loading && machines.length === 0 ? (
144
144
  <div data-machines-loading className="grid gap-3 sm:grid-cols-2">
145
145
  {[0, 1].map((i) => (
146
- <div key={i} className="h-36 animate-og-pulse rounded-og-lg border border-og-border bg-og-surface-1" />
146
+ <div
147
+ key={i}
148
+ className="h-36 animate-og-pulse rounded-og-lg border border-og-border bg-og-surface-1"
149
+ />
147
150
  ))}
148
151
  </div>
149
152
  ) : isEmpty ? (
@@ -153,7 +156,10 @@ export function MachinesDashboard({
153
156
  {machines.map((machine) => (
154
157
  <MachineCard
155
158
  key={machine.sandboxId}
156
- machine={{ ...machine, active: machine.active || machine.sandboxId === activeSandboxId }}
159
+ machine={{
160
+ ...machine,
161
+ active: machine.active || machine.sandboxId === activeSandboxId,
162
+ }}
157
163
  onAttach={onAttach}
158
164
  attaching={attachingSandboxId === machine.sandboxId}
159
165
  />
@@ -26,7 +26,10 @@ export type MarkdownProps = {
26
26
 
27
27
  const components: Components = {
28
28
  h1: ({ children, ...props }) => (
29
- <h1 className="mt-5 mb-2.5 text-xl font-semibold tracking-tight text-og-fg first:mt-0" {...props}>
29
+ <h1
30
+ className="mt-5 mb-2.5 text-xl font-semibold tracking-tight text-og-fg first:mt-0"
31
+ {...props}
32
+ >
30
33
  {children}
31
34
  </h1>
32
35
  ),
@@ -36,12 +39,18 @@ const components: Components = {
36
39
  </h2>
37
40
  ),
38
41
  h3: ({ children, ...props }) => (
39
- <h3 className="mt-4 mb-1.5 text-og-md font-semibold tracking-tight text-og-fg first:mt-0" {...props}>
42
+ <h3
43
+ className="mt-4 mb-1.5 text-og-md font-semibold tracking-tight text-og-fg first:mt-0"
44
+ {...props}
45
+ >
40
46
  {children}
41
47
  </h3>
42
48
  ),
43
49
  h4: ({ children, ...props }) => (
44
- <h4 className="mt-4 mb-1.5 text-og-sm font-semibold uppercase tracking-[0.04em] text-og-fg-muted first:mt-0" {...props}>
50
+ <h4
51
+ className="mt-4 mb-1.5 text-og-sm font-semibold uppercase tracking-[0.04em] text-og-fg-muted first:mt-0"
52
+ {...props}
53
+ >
45
54
  {children}
46
55
  </h4>
47
56
  ),
@@ -71,12 +80,18 @@ const components: Components = {
71
80
  </a>
72
81
  ),
73
82
  ul: ({ children, ...props }) => (
74
- <ul className="my-2.5 ml-5 flex list-disc flex-col gap-1 marker:text-og-fg-subtle first:mt-0 last:mb-0" {...props}>
83
+ <ul
84
+ className="my-2.5 ml-5 flex list-disc flex-col gap-1 marker:text-og-fg-subtle first:mt-0 last:mb-0"
85
+ {...props}
86
+ >
75
87
  {children}
76
88
  </ul>
77
89
  ),
78
90
  ol: ({ children, ...props }) => (
79
- <ol className="my-2.5 ml-5 flex list-decimal flex-col gap-1 marker:text-og-fg-subtle first:mt-0 last:mb-0" {...props}>
91
+ <ol
92
+ className="my-2.5 ml-5 flex list-decimal flex-col gap-1 marker:text-og-fg-subtle first:mt-0 last:mb-0"
93
+ {...props}
94
+ >
80
95
  {children}
81
96
  </ol>
82
97
  ),
@@ -84,7 +99,10 @@ const components: Components = {
84
99
  // negative margin pull the checkbox back to the bullet column so it aligns
85
100
  // with the text.
86
101
  li: ({ children, ...props }) => (
87
- <li className="leading-7 marker:text-og-fg-subtle [&>ul]:my-1 [&>ol]:my-1 [&:has(>input)]:list-none [&:has(>input)]:-ml-5" {...props}>
102
+ <li
103
+ className="leading-7 marker:text-og-fg-subtle [&>ul]:my-1 [&>ol]:my-1 [&:has(>input)]:list-none [&:has(>input)]:-ml-5"
104
+ {...props}
105
+ >
88
106
  {children}
89
107
  </li>
90
108
  ),
@@ -142,16 +160,28 @@ const components: Components = {
142
160
  </thead>
143
161
  ),
144
162
  th: ({ children, ...props }) => (
145
- <th className="border-b border-og-border px-3 py-1.5 text-left font-medium text-og-fg" {...props}>
163
+ <th
164
+ className="border-b border-og-border px-3 py-1.5 text-left font-medium text-og-fg"
165
+ {...props}
166
+ >
146
167
  {children}
147
168
  </th>
148
169
  ),
149
170
  td: ({ children, ...props }) => (
150
- <td className="border-b border-og-border px-3 py-1.5 align-top text-og-fg-muted [tr:last-child>&]:border-b-0" {...props}>
171
+ <td
172
+ className="border-b border-og-border px-3 py-1.5 align-top text-og-fg-muted [tr:last-child>&]:border-b-0"
173
+ {...props}
174
+ >
151
175
  {children}
152
176
  </td>
153
177
  ),
154
- img: ({ alt, ...props }) => <img alt={alt ?? ""} className="my-3 max-w-full rounded-og-md border border-og-border" {...props} />,
178
+ img: ({ alt, ...props }) => (
179
+ <img
180
+ alt={alt ?? ""}
181
+ className="my-3 max-w-full rounded-og-md border border-og-border"
182
+ {...props}
183
+ />
184
+ ),
155
185
  };
156
186
 
157
187
  function MarkdownImpl({ children, className }: MarkdownProps) {