@opengeni/react 0.12.0 → 0.15.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.
- package/README.md +20 -14
- package/dist/chunk-TOJR776I.js +2280 -0
- package/dist/chunk-TOJR776I.js.map +1 -0
- package/dist/index.d.ts +1040 -363
- package/dist/index.js +10938 -6281
- package/dist/index.js.map +1 -1
- package/dist/{machines-BeZ3bD3t.d.ts → machines-BpdwuQcD.d.ts} +134 -14
- package/dist/machines.d.ts +1 -1
- package/dist/machines.js +23 -1
- package/package.json +20 -12
- package/src/approvals.ts +16 -4
- package/src/client.ts +41 -5
- package/src/commands/index.ts +1 -7
- package/src/commands/registry.ts +46 -12
- package/src/components/chat-composer.tsx +417 -69
- package/src/components/code-editor.tsx +28 -36
- package/src/components/command-palette.tsx +26 -5
- package/src/components/desktop-viewer.tsx +29 -16
- package/src/components/diff-view.tsx +27 -189
- package/src/components/enrollment-consent.tsx +28 -10
- package/src/components/enrollment-device-flow.tsx +8 -5
- package/src/components/file-browser.tsx +190 -56
- package/src/components/fleet-tile.tsx +13 -4
- package/src/components/machine-card.tsx +93 -15
- package/src/components/machine-dock-bar.tsx +20 -8
- package/src/components/machine-health-pill.tsx +68 -0
- package/src/components/machine-metrics.tsx +28 -19
- package/src/components/machine-status-pill.tsx +26 -5
- package/src/components/machines/health.ts +146 -0
- package/src/components/machines/machine-detail.tsx +220 -0
- package/src/components/machines/metric-history-chart.tsx +298 -0
- package/src/components/machines/metric-sparkline.tsx +76 -0
- package/src/components/machines/series.ts +113 -0
- package/src/components/machines-dashboard.tsx +21 -3
- package/src/components/markdown.tsx +39 -9
- package/src/components/message-timeline.tsx +633 -109
- package/src/components/pierre-diff.tsx +83 -15
- package/src/components/pierre-file.tsx +10 -9
- package/src/components/queue-surface.tsx +578 -0
- package/src/components/sandbox-files.tsx +193 -225
- package/src/components/sandbox-terminal.tsx +256 -88
- package/src/components/sandbox-workspace.tsx +957 -0
- package/src/components/session-status.tsx +22 -2
- package/src/components/workbench-changes.tsx +585 -0
- package/src/components/workspace-dock.tsx +213 -59
- package/src/hooks/internal.ts +5 -2
- package/src/hooks/use-available-models.ts +7 -2
- package/src/hooks/use-billing-usage.ts +4 -1
- package/src/hooks/use-codex-accounts.ts +74 -44
- package/src/hooks/use-composer.ts +414 -63
- package/src/hooks/use-environments.ts +92 -47
- package/src/hooks/use-file-attachments.ts +101 -55
- package/src/hooks/use-goal.ts +52 -16
- package/src/hooks/use-machine-chip.ts +134 -0
- package/src/hooks/use-machines.ts +34 -16
- package/src/hooks/use-packs.ts +24 -19
- package/src/hooks/use-relay-frame-stream.ts +5 -2
- package/src/hooks/use-rigs.ts +335 -0
- package/src/hooks/use-sandbox-files.ts +213 -39
- package/src/hooks/use-sandbox-git.ts +188 -11
- package/src/hooks/use-sandbox-terminal.ts +18 -14
- package/src/hooks/use-scheduled-tasks.ts +10 -2
- package/src/hooks/use-session-capabilities.ts +77 -20
- package/src/hooks/use-session-control.ts +50 -23
- package/src/hooks/use-session-events.ts +50 -21
- package/src/hooks/use-session-lineage.ts +128 -0
- package/src/hooks/use-session.ts +53 -30
- package/src/hooks/use-slash-commands.ts +6 -4
- package/src/hooks/use-turn-queue.ts +202 -147
- package/src/hooks/use-windowed-sections.ts +204 -0
- package/src/hooks/use-workspace-capture.ts +233 -0
- package/src/hooks/use-workspace-edit.ts +231 -0
- package/src/hooks/use-workspace-sessions.ts +48 -5
- package/src/hooks/use-workspaces.ts +18 -15
- package/src/index.ts +133 -23
- package/src/lib/format.ts +3 -3
- package/src/lib/xterm-renderer.ts +65 -0
- package/src/lib/xterm-theme.ts +224 -18
- package/src/machines.ts +29 -3
- package/src/provider.tsx +195 -6
- package/src/timeline/activity-rail.tsx +213 -54
- package/src/timeline/disclosure-context.tsx +12 -2
- package/src/timeline/index.ts +21 -2
- package/src/timeline/parsers.ts +87 -16
- package/src/timeline/projection.ts +412 -87
- package/src/timeline/shared.tsx +111 -24
- package/src/timeline/tool-diff.tsx +24 -20
- package/src/timeline/tool-renderers.tsx +98 -21
- package/src/timeline/turn-summary.tsx +76 -23
- package/src/timeline/types.ts +96 -12
- package/styles/index.css +22 -0
- package/styles/tokens.css +2 -2
- package/dist/chunk-5TIXRCSI.js +0 -1291
- package/dist/chunk-5TIXRCSI.js.map +0 -1
package/README.md
CHANGED
|
@@ -45,16 +45,19 @@ import {
|
|
|
45
45
|
ChatComposer,
|
|
46
46
|
MessageTimeline,
|
|
47
47
|
OpenGeniProvider,
|
|
48
|
+
QueueSurface,
|
|
48
49
|
SessionStatus,
|
|
49
50
|
useComposer,
|
|
50
51
|
useSessionEvents,
|
|
52
|
+
useTurnQueue,
|
|
51
53
|
} from "@opengeni/react";
|
|
52
54
|
|
|
53
55
|
const client = new OpenGeniClient({ baseUrl: "/api/opengeni" }); // proxy through your API
|
|
54
56
|
|
|
55
57
|
function OpsChannel({ sessionId }: { sessionId: string }) {
|
|
56
58
|
const { timeline, sessionStatus, hasOlder, loadingOlder, loadOlder } = useSessionEvents(sessionId);
|
|
57
|
-
const
|
|
59
|
+
const queue = useTurnQueue(sessionId);
|
|
60
|
+
const composer = useComposer(sessionId, { effectiveControl: queue.effectiveControl });
|
|
58
61
|
return (
|
|
59
62
|
<div className="flex h-full flex-col">
|
|
60
63
|
{sessionStatus ? <SessionStatus status={sessionStatus} /> : null}
|
|
@@ -66,7 +69,8 @@ function OpsChannel({ sessionId }: { sessionId: string }) {
|
|
|
66
69
|
onLoadOlder={() => void loadOlder()}
|
|
67
70
|
className="min-h-0 flex-1"
|
|
68
71
|
/>
|
|
69
|
-
<
|
|
72
|
+
<QueueSurface queue={queue} composer={composer} />
|
|
73
|
+
<ChatComposer composer={composer} effectiveControl={queue.effectiveControl} />
|
|
70
74
|
</div>
|
|
71
75
|
);
|
|
72
76
|
}
|
|
@@ -90,27 +94,29 @@ export function App() {
|
|
|
90
94
|
older-history controls (`hasOlder`, `loadingOlder`, `loadOlder`). Pass
|
|
91
95
|
`replay: "full"` to opt back into full replay; a nonzero `after` keeps the
|
|
92
96
|
previous resume semantics.
|
|
93
|
-
- `useComposer(sessionId, { sendExtras,
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
97
|
+
- `useComposer(sessionId, { sendExtras, effectiveControl })` — revisioned private
|
|
98
|
+
draft, Send, Steer, and workstream Pause/Resume state. `send()` appends in
|
|
99
|
+
visible queue order; `steer()` supersedes the current direction. Drafts
|
|
100
|
+
autosave with optimistic concurrency, survive failed sends, and reuse one
|
|
101
|
+
`clientEventId` across retries so the server dedupes.
|
|
98
102
|
`sendExtras` (object or function evaluated at send time) merges
|
|
99
103
|
resources/tools/model/reasoningEffort into every message. All human input is
|
|
100
104
|
plain chat text by design; approvals flow as control events
|
|
101
105
|
(`useSessionControl`), not bespoke widgets.
|
|
102
|
-
- `useTurnQueue(sessionId, { events })` — the
|
|
103
|
-
|
|
104
|
-
`
|
|
105
|
-
|
|
106
|
+
- `useTurnQueue(sessionId, { events })` — the one server-authoritative human
|
|
107
|
+
prompt queue with `moveTurn`, crash-safe `editTurn`, identity-preserving
|
|
108
|
+
`steerTurn`, and `removeTurn`. Mutations carry observed revisions and conflicts
|
|
109
|
+
refetch server truth. Live-updates on `turn.*` and `session.queue.*` events — pass the
|
|
106
110
|
`events` log from `useSessionEvents` to reuse its stream, or let it tail the
|
|
107
111
|
session itself.
|
|
108
112
|
- `useGoal(sessionId, { events })` — goal state + autonomy counters
|
|
109
113
|
(`autoContinuations`, `noProgressStreak`) with `pause(rationale?)` /
|
|
110
114
|
`resume()`. Goal-less sessions yield `goal: null`. Live-updates on `goal.*`
|
|
111
115
|
events.
|
|
112
|
-
- `useSessionControl(sessionId)` — `
|
|
113
|
-
`approve`/`reject(approvalId, message?)` for
|
|
116
|
+
- `useSessionControl(sessionId)` — durable `pause(reason?)` / `resume(reason?)`
|
|
117
|
+
workstream controls and `approve`/`reject(approvalId, message?)` for
|
|
118
|
+
`requires_action` approvals. Pause is recursive control state, not lifecycle
|
|
119
|
+
status or queue work; Resume creates no message.
|
|
114
120
|
- `useSession(sessionId)` — fetch one session (optional polling) with
|
|
115
121
|
`updateTitle(title)` (rename) and live title-patching on `session.title_set`.
|
|
116
122
|
- `useFileAttachments()` — the composer's attach flow: stages files, drives the
|
|
@@ -123,7 +129,7 @@ export function App() {
|
|
|
123
129
|
handlers) behind `CommandPalette`.
|
|
124
130
|
- `useWorkspaceSessions()` / `useScheduledTasks()` — workspace lists for
|
|
125
131
|
fleet/manager views (optional polling).
|
|
126
|
-
- `
|
|
132
|
+
- `useVariable sets()` — workspace variable sets with create/update/remove and
|
|
127
133
|
write-only `setVariable`/`deleteVariable` (values never come back on reads).
|
|
128
134
|
- `usePacks()` — capability packs + installations with
|
|
129
135
|
register/enable/remove and `installationFor(packId)`.
|