@opengeni/react 0.28.2 → 0.32.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/dist/approvals.d.ts +14 -0
- package/dist/{chunk-M7X4JZOD.js → chunk-4QOQ2DSR.js} +8 -1
- package/dist/chunk-4QOQ2DSR.js.map +1 -0
- package/dist/{chunk-HQFPO7VX.js → chunk-7CJOAW3V.js} +24 -3
- package/dist/{chunk-HQFPO7VX.js.map → chunk-7CJOAW3V.js.map} +1 -1
- package/dist/{chunk-PMSGE233.js → chunk-A2WITZTI.js} +377 -113
- package/dist/chunk-A2WITZTI.js.map +1 -0
- package/dist/{chunk-BC6RKIHS.js → chunk-GZ4KR67U.js} +11 -11
- package/dist/{chunk-4F2YLLHP.js → chunk-KZRUYCL4.js} +14 -17
- package/dist/chunk-KZRUYCL4.js.map +1 -0
- package/dist/{chunk-OCHBZ2X7.js → chunk-TCCE5ZU5.js} +192 -28
- package/dist/chunk-TCCE5ZU5.js.map +1 -0
- package/dist/chunk-U255M5EZ.js +178 -0
- package/dist/chunk-U255M5EZ.js.map +1 -0
- package/dist/{chunk-XVVQP7A4.js → chunk-WY2QN2CX.js} +2539 -2174
- package/dist/chunk-WY2QN2CX.js.map +1 -0
- package/dist/chunk-ZNNE2VES.js +6413 -0
- package/dist/chunk-ZNNE2VES.js.map +1 -0
- package/dist/client.d.ts +33 -0
- package/dist/commands/index.d.ts +3 -0
- package/dist/commands/registry.d.ts +41 -0
- package/dist/commands/types.d.ts +85 -0
- package/dist/components/approval-surface.d.ts +28 -0
- package/dist/components/chat-composer.d.ts +51 -0
- package/dist/components/code-editor.d.ts +43 -0
- package/dist/components/command-palette.d.ts +25 -0
- package/dist/components/composer-transcription-control.d.ts +36 -0
- package/dist/components/composer.d.ts +277 -0
- package/dist/components/copy-button.d.ts +26 -0
- package/dist/components/desktop-viewer.d.ts +85 -0
- package/dist/components/diff-view.d.ts +38 -0
- package/dist/components/enrollment-consent.d.ts +33 -0
- package/dist/components/enrollment-device-flow.d.ts +27 -0
- package/dist/components/file-browser.d.ts +47 -0
- package/dist/components/fleet-tile.d.ts +18 -0
- package/dist/components/human-input-form.d.ts +47 -0
- package/dist/components/machine-card.d.ts +21 -0
- package/dist/components/machine-dock-bar.d.ts +31 -0
- package/dist/components/machine-health-pill.d.ts +9 -0
- package/dist/components/machine-metrics.d.ts +15 -0
- package/dist/components/machine-status-pill.d.ts +54 -0
- package/dist/components/machines/health.d.ts +25 -0
- package/dist/components/machines/machine-detail.d.ts +14 -0
- package/dist/components/machines/metric-history-chart.d.ts +24 -0
- package/dist/components/machines/metric-sparkline.d.ts +9 -0
- package/dist/components/machines/series.d.ts +24 -0
- package/dist/components/machines-dashboard.d.ts +30 -0
- package/dist/components/markdown.d.ts +31 -0
- package/dist/components/message-timeline.d.ts +98 -0
- package/dist/components/model-picker.d.ts +19 -0
- package/dist/components/pierre-diff.d.ts +34 -0
- package/dist/components/pierre-file.d.ts +27 -0
- package/dist/components/queue-draft-policy.d.ts +7 -0
- package/dist/components/queue-surface-implementation.d.ts +20 -0
- package/dist/components/queue-surface-state.d.ts +12 -0
- package/dist/components/queue-surface.d.ts +12 -0
- package/dist/components/sandbox-files.d.ts +49 -0
- package/dist/components/sandbox-terminal.d.ts +123 -0
- package/dist/components/sandbox-workspace.d.ts +128 -0
- package/dist/components/session-chrome.d.ts +70 -0
- package/dist/components/session-status.d.ts +25 -0
- package/dist/components/soften-streaming-markdown.d.ts +13 -0
- package/dist/components/stream-reveal.d.ts +37 -0
- package/dist/components/tip-follow.d.ts +139 -0
- package/dist/components/tooltip.d.ts +16 -0
- package/dist/components/workbench-changes.d.ts +34 -0
- package/dist/components/workspace-dock.d.ts +35 -0
- package/dist/composer.d.ts +11 -7
- package/dist/composer.js +9 -6
- package/dist/hooks/internal.d.ts +46 -0
- package/dist/hooks/use-available-models.d.ts +37 -0
- package/dist/hooks/use-billing-usage.d.ts +26 -0
- package/dist/hooks/use-codex-accounts.d.ts +69 -0
- package/dist/{use-composer-ClHy1rkL.d.ts → hooks/use-composer.d.ts} +16 -24
- package/dist/hooks/use-desktop-stream.d.ts +43 -0
- package/dist/hooks/use-environments.d.ts +35 -0
- package/dist/{use-file-attachments-BmT8WtqO.d.ts → hooks/use-file-attachments.d.ts} +6 -9
- package/dist/hooks/use-goal.d.ts +46 -0
- package/dist/hooks/use-human-input.d.ts +26 -0
- package/dist/hooks/use-last-started-turn-policy.d.ts +27 -0
- package/dist/hooks/use-machine-chip.d.ts +54 -0
- package/dist/hooks/use-machines.d.ts +81 -0
- package/dist/hooks/use-packs.d.ts +27 -0
- package/dist/hooks/use-relay-frame-stream.d.ts +53 -0
- package/dist/hooks/use-rigs.d.ts +87 -0
- package/dist/hooks/use-sandbox-files.d.ts +108 -0
- package/dist/hooks/use-sandbox-git.d.ts +58 -0
- package/dist/hooks/use-sandbox-terminal.d.ts +62 -0
- package/dist/hooks/use-scheduled-tasks.d.ts +15 -0
- package/dist/hooks/use-session-capabilities.d.ts +83 -0
- package/dist/hooks/use-session-control.d.ts +22 -0
- package/dist/hooks/use-session-events.d.ts +92 -0
- package/dist/hooks/use-session-lineage.d.ts +17 -0
- package/dist/hooks/use-session-mcp-approval-policy.d.ts +23 -0
- package/dist/hooks/use-session.d.ts +23 -0
- package/dist/hooks/use-slash-commands.d.ts +66 -0
- package/dist/hooks/use-terminal-stream.d.ts +46 -0
- package/dist/hooks/use-transcription.d.ts +73 -0
- package/dist/hooks/use-turn-queue.d.ts +44 -0
- package/dist/hooks/use-voice-input.d.ts +25 -0
- package/dist/hooks/use-windowed-sections.d.ts +42 -0
- package/dist/hooks/use-workspace-capture.d.ts +49 -0
- package/dist/hooks/use-workspace-edit.d.ts +73 -0
- package/dist/hooks/use-workspace-sessions.d.ts +30 -0
- package/dist/hooks/use-workspaces.d.ts +22 -0
- package/dist/human-input.d.ts +18 -0
- package/dist/index.d.ts +144 -2119
- package/dist/index.js +421 -324
- package/dist/index.js.map +1 -1
- package/dist/lib/clipboard.d.ts +7 -0
- package/dist/lib/cn.d.ts +3 -0
- package/dist/lib/format.d.ts +48 -0
- package/dist/lib/git-patch.d.ts +8 -0
- package/dist/lib/motion-inspect.d.ts +5 -0
- package/dist/lib/motion.d.ts +14 -0
- package/dist/lib/noto-sans-arabic-loader.d.ts +1 -0
- package/dist/lib/noto-sans-jp-loader.generated.d.ts +1 -0
- package/dist/lib/relay-wire.d.ts +30 -0
- package/dist/lib/use-portal-token-style.d.ts +9 -0
- package/dist/lib/use-theme-type.d.ts +5 -0
- package/dist/lib/use-unicode-fonts.d.ts +12 -0
- package/dist/lib/xterm-renderer.d.ts +19 -0
- package/dist/lib/xterm-theme.d.ts +75 -0
- package/dist/machines.d.ts +30 -413
- package/dist/machines.js +3 -3
- package/dist/model-policy.d.ts +32 -0
- package/dist/model-policy.js +33 -0
- package/dist/model-policy.js.map +1 -0
- package/dist/provider.d.ts +16 -0
- package/dist/{queue-surface-implementation-UQ535OKQ.js → queue-surface-implementation-THPAKGMD.js} +2 -2
- package/dist/{queue-surface-implementation-UQ535OKQ.js.map → queue-surface-implementation-THPAKGMD.js.map} +1 -1
- package/dist/session-context.d.ts +82 -0
- package/dist/session-ui.d.ts +10 -7
- package/dist/session-ui.js +9 -5
- package/dist/session.d.ts +28 -6
- package/dist/session.js +11 -11
- package/dist/timeline/activity-rail.d.ts +19 -0
- package/dist/timeline/disclosure-context.d.ts +14 -0
- package/dist/timeline/entrance.d.ts +14 -0
- package/dist/timeline/fleet-decision-projection.d.ts +9 -0
- package/dist/timeline/fleet-decision-row.d.ts +11 -0
- package/dist/timeline/fold-memory.d.ts +15 -0
- package/dist/timeline/index.d.ts +18 -0
- package/dist/timeline/parsers.d.ts +96 -0
- package/dist/timeline/projection.d.ts +38 -0
- package/dist/timeline/registry.d.ts +40 -0
- package/dist/timeline/screenshot-lightbox.d.ts +26 -0
- package/dist/timeline/seen-activity-ids.d.ts +2 -0
- package/dist/timeline/shared.d.ts +125 -0
- package/dist/timeline/tool-diff.d.ts +8 -0
- package/dist/timeline/tool-display-name.d.ts +10 -0
- package/dist/timeline/tool-renderers.d.ts +5 -0
- package/dist/timeline/turn-summary.d.ts +116 -0
- package/dist/{use-turn-queue-Drm_ypue.d.ts → timeline/types.d.ts} +57 -67
- package/dist/types/machines.d.ts +11 -0
- package/package.json +8 -4
- package/src/client.ts +1 -0
- package/src/components/composer-transcription-control.tsx +278 -130
- package/src/components/composer.tsx +20 -15
- package/src/components/copy-button.tsx +127 -0
- package/src/components/markdown.tsx +231 -32
- package/src/components/message-timeline.tsx +1382 -378
- package/src/components/model-picker.tsx +83 -43
- package/src/components/queue-surface-implementation.tsx +1 -1
- package/src/components/session-chrome.tsx +942 -0
- package/src/components/soften-streaming-markdown.ts +205 -0
- package/src/components/stream-reveal.ts +195 -0
- package/src/components/tip-follow.ts +459 -0
- package/src/components/tooltip.tsx +103 -0
- package/src/composer.ts +6 -0
- package/src/hooks/internal.ts +30 -4
- package/src/hooks/use-available-models.ts +51 -4
- package/src/hooks/use-composer.ts +24 -18
- package/src/hooks/use-last-started-turn-policy.ts +95 -0
- package/src/hooks/use-session-events.ts +359 -5
- package/src/hooks/use-voice-input.ts +232 -0
- package/src/index.ts +49 -1
- package/src/lib/clipboard.ts +58 -0
- package/src/lib/format.ts +18 -0
- package/src/lib/motion-inspect.ts +5 -0
- package/src/lib/motion.ts +80 -0
- package/src/model-policy.ts +210 -0
- package/src/session-ui.ts +7 -0
- package/src/session.ts +2 -0
- package/src/timeline/activity-rail.tsx +46 -7
- package/src/timeline/entrance.tsx +10 -0
- package/src/timeline/fold-memory.ts +52 -0
- package/src/timeline/index.ts +11 -1
- package/src/timeline/projection.ts +252 -47
- package/src/timeline/seen-activity-ids.ts +19 -0
- package/src/timeline/shared.tsx +1 -1
- package/src/timeline/tool-renderers.tsx +75 -6
- package/src/timeline/turn-summary.tsx +387 -97
- package/src/timeline/types.ts +47 -0
- package/styles/index.css +99 -7
- package/styles/tokens.css +44 -3
- package/dist/chunk-4F2YLLHP.js.map +0 -1
- package/dist/chunk-M7X4JZOD.js.map +0 -1
- package/dist/chunk-OCHBZ2X7.js.map +0 -1
- package/dist/chunk-PMSGE233.js.map +0 -1
- package/dist/chunk-WAA247AB.js +0 -3858
- package/dist/chunk-WAA247AB.js.map +0 -1
- package/dist/chunk-XVVQP7A4.js.map +0 -1
- package/dist/composer-BMzimGTO.d.ts +0 -528
- package/dist/session-C3tIXLim.d.ts +0 -264
- package/dist/session-context-CAjlaeZb.d.ts +0 -84
- package/dist/session-ui-B_7cfN5u.d.ts +0 -259
- /package/dist/{chunk-BC6RKIHS.js.map → chunk-GZ4KR67U.js.map} +0 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { SessionEvent, WorkspaceCaptureDegradedReason, WorkspaceCaptureManifest } from "@opengeni/sdk";
|
|
2
|
+
import { type ClientOverride } from "../provider";
|
|
3
|
+
export type UseWorkspaceCaptureOptions = ClientOverride & {
|
|
4
|
+
/** Live event log (usually `useSessionEvents().events`) — a
|
|
5
|
+
* `workspace.revision.captured` for a NEWER revision refreshes the manifest. */
|
|
6
|
+
events?: SessionEvent[] | undefined;
|
|
7
|
+
/** Hold off the mount fetch (e.g. the workbench panel is collapsed). Default true. */
|
|
8
|
+
enabled?: boolean | undefined;
|
|
9
|
+
};
|
|
10
|
+
export type UseWorkspaceCaptureResult = {
|
|
11
|
+
/** The resolved manifest (tree index + per-repo diffs + file refs), or null when
|
|
12
|
+
* no capture exists (falls back to the live/wake path — status quo). */
|
|
13
|
+
capture: WorkspaceCaptureManifest | null;
|
|
14
|
+
/** The loaded capture's monotonic revision, or null when unavailable. */
|
|
15
|
+
revision: number | null;
|
|
16
|
+
/** When the loaded capture was taken (ISO), for the "as of <time>" source badge. */
|
|
17
|
+
capturedAt: string | null;
|
|
18
|
+
/** Whether a capture is available at all (the `{available:false}` discriminator). */
|
|
19
|
+
available: boolean;
|
|
20
|
+
/** Why the newest durable revision is unavailable. null means no capture has
|
|
21
|
+
* been attempted yet; a value means capture explicitly failed closed and
|
|
22
|
+
* consumers must use the live box rather than trust an incomplete snapshot. */
|
|
23
|
+
degradedReason: WorkspaceCaptureDegradedReason | null;
|
|
24
|
+
/** The changed-file count from the capture's stats, resolved on the FIRST GET
|
|
25
|
+
* (from the response's top-level `stats`, before any manifest-URL hop). null
|
|
26
|
+
* until that first resolve; 0 when no capture exists. This is the pre-paint
|
|
27
|
+
* "changes exist?" signal the dock uses to pick its default tab with no
|
|
28
|
+
* embedder events-at-mount contract. */
|
|
29
|
+
fileCount: number | null;
|
|
30
|
+
/** A newer revision has been ANNOUNCED than the one currently loaded (a refresh
|
|
31
|
+
* is in flight or pending). M5's source badge can show a subtle "updating…". */
|
|
32
|
+
isStale: boolean;
|
|
33
|
+
loading: boolean;
|
|
34
|
+
error: Error | null;
|
|
35
|
+
/** Force a re-fetch of the latest capture. */
|
|
36
|
+
refresh: () => Promise<void>;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* The cold-paint data source: fetch the latest turn-end workspace capture with a
|
|
40
|
+
* SINGLE api round-trip on mount (no machine, no Channel-A — this is the <200ms
|
|
41
|
+
* first paint). The manifest is served inline in the common
|
|
42
|
+
* case; a rare >2MB manifest comes back as a short-TTL signed URL we follow.
|
|
43
|
+
*
|
|
44
|
+
* Subscribes to the live event log: a `workspace.revision.captured` for a revision
|
|
45
|
+
* newer than the one loaded triggers a background refresh (stale-while-revalidate).
|
|
46
|
+
* `{available:false}` is a value, never a crash — consumers fall back to the
|
|
47
|
+
* live/wake path exactly as before the capture feature existed.
|
|
48
|
+
*/
|
|
49
|
+
export declare function useWorkspaceCapture(sessionId: string | null | undefined, options?: UseWorkspaceCaptureOptions): UseWorkspaceCaptureResult;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { type ClientOverride } from "../provider";
|
|
2
|
+
/**
|
|
3
|
+
* The wake-on-edit state machine. This hook owns the logic and the UI renders
|
|
4
|
+
* its result. States are explicit and exhaustive:
|
|
5
|
+
*
|
|
6
|
+
* viewing-cold — cold snapshot open, no local edits (editable, cloud).
|
|
7
|
+
* buffering — local edits buffered; the box is not warm and no warm is
|
|
8
|
+
* yet in flight (the host has not attached).
|
|
9
|
+
* warming — edits buffered; the box is actively coming up (the host
|
|
10
|
+
* attached a viewer in response to `wantsWarm`).
|
|
11
|
+
* flushing — the box is warm; the guarded write is in flight.
|
|
12
|
+
* flushed — the buffer was written to the live box.
|
|
13
|
+
* conflict — the live file diverged from the captured base between
|
|
14
|
+
* capture and flush; NO write was issued (C2).
|
|
15
|
+
* readonly-offline — a self-hosted machine that is offline; read-only, no wake.
|
|
16
|
+
*/
|
|
17
|
+
export type WorkspaceEditState = "viewing-cold" | "buffering" | "warming" | "flushing" | "flushed" | "conflict" | "readonly-offline";
|
|
18
|
+
export type WorkspaceEditConflict = {
|
|
19
|
+
path: string;
|
|
20
|
+
/** The capture-served content the edit was based on. */
|
|
21
|
+
base: string;
|
|
22
|
+
/** The live content found on the box at flush time (what would be overwritten). */
|
|
23
|
+
live: string;
|
|
24
|
+
};
|
|
25
|
+
export type UseWorkspaceEditOptions = ClientOverride & {
|
|
26
|
+
/** The file being edited (workspace-relative). null disables the machine. */
|
|
27
|
+
path?: string | null | undefined;
|
|
28
|
+
/** The capture-served content loaded into the editor — the flush base (C2). */
|
|
29
|
+
baseContent?: string | null | undefined;
|
|
30
|
+
/** `capabilities.liveness` — "warm" | "draining" | "cold". Drives the flush. */
|
|
31
|
+
liveness?: string | undefined;
|
|
32
|
+
/** True while the host is actively warming the box (attach in flight, not warm
|
|
33
|
+
* yet) — lifts `buffering` → `warming`. The host sets this after acting on
|
|
34
|
+
* `wantsWarm` (e.g. flipping `attachFiles` on `useSessionCapabilities`). */
|
|
35
|
+
warming?: boolean | undefined;
|
|
36
|
+
/** A self-hosted machine that is OFFLINE: read-only, no remote wake possible. */
|
|
37
|
+
offline?: boolean | undefined;
|
|
38
|
+
/** Called once when the first cold edit needs the box warmed — the host wires
|
|
39
|
+
* this to its liveness primitive (flip `attachFiles`/`attachViewer`). */
|
|
40
|
+
onWarmRequested?: (() => void) | undefined;
|
|
41
|
+
};
|
|
42
|
+
export type UseWorkspaceEditResult = {
|
|
43
|
+
state: WorkspaceEditState;
|
|
44
|
+
/** The editor should be read-only (self-hosted offline). */
|
|
45
|
+
readOnly: boolean;
|
|
46
|
+
/** The current buffered content (null = no local edit yet). */
|
|
47
|
+
buffer: string | null;
|
|
48
|
+
/** The host should warm the box (flip its attach primitive). Latches true from
|
|
49
|
+
* the first cold edit until the buffer flushes or is discarded. */
|
|
50
|
+
wantsWarm: boolean;
|
|
51
|
+
/** Record an edit from the editor (idempotent per identical content). */
|
|
52
|
+
edit: (content: string) => void;
|
|
53
|
+
/** The conflict detail when `state === "conflict"`. */
|
|
54
|
+
conflict: WorkspaceEditConflict | null;
|
|
55
|
+
/** Flush the buffer regardless of the base guard (the user chose "overwrite"
|
|
56
|
+
* from the conflict bar). Writes last-writer-wins. */
|
|
57
|
+
overwrite: () => Promise<void>;
|
|
58
|
+
/** Drop the local buffer and return to viewing the snapshot. */
|
|
59
|
+
discard: () => void;
|
|
60
|
+
error: Error | null;
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Cold-editing without a spinner: the editor opens instantly from the capture,
|
|
64
|
+
* the first keystroke buffers locally AND signals the host to warm the box, and on
|
|
65
|
+
* warm the buffer flushes IF the live file still matches the captured base — else a
|
|
66
|
+
* non-blocking conflict is surfaced and nothing is overwritten.
|
|
67
|
+
*
|
|
68
|
+
* The base guard compares the live content at flush time against `baseContent`
|
|
69
|
+
* (the exact bytes the editor loaded). This is equivalent to the sha256 compare
|
|
70
|
+
* the design specifies — M1 leaves `baseHash` null, so the loaded content IS the
|
|
71
|
+
* authoritative base — and avoids async Web Crypto in the render path.
|
|
72
|
+
*/
|
|
73
|
+
export declare function useWorkspaceEdit(sessionId: string | null | undefined, options?: UseWorkspaceEditOptions): UseWorkspaceEditResult;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { Session } from "@opengeni/sdk";
|
|
2
|
+
import { type ClientOverride } from "../provider";
|
|
3
|
+
export type UseWorkspaceSessionsOptions = ClientOverride & {
|
|
4
|
+
limit?: number | undefined;
|
|
5
|
+
parentSessionId?: string | null | undefined;
|
|
6
|
+
cursor?: string | undefined;
|
|
7
|
+
search?: string | undefined;
|
|
8
|
+
/** Return only the complete personal pinned projection. */
|
|
9
|
+
pinsOnly?: boolean | undefined;
|
|
10
|
+
/** Refresh interval (ms) for fleet/manager views. Off by default. */
|
|
11
|
+
pollIntervalMs?: number | undefined;
|
|
12
|
+
enabled?: boolean | undefined;
|
|
13
|
+
};
|
|
14
|
+
export type UseWorkspaceSessionsResult = {
|
|
15
|
+
/**
|
|
16
|
+
* All visible rows, with pins first. This preserves the pre-pinning hook
|
|
17
|
+
* contract for consumers that only read `sessions`.
|
|
18
|
+
*/
|
|
19
|
+
sessions: Session[];
|
|
20
|
+
/** The complete personal pinned section, also present in `sessions`. */
|
|
21
|
+
pinned: Session[];
|
|
22
|
+
/** True when the server omitted older pins from its bounded pinned section. */
|
|
23
|
+
pinnedTruncated: boolean;
|
|
24
|
+
nextCursor: string | null;
|
|
25
|
+
loading: boolean;
|
|
26
|
+
error: Error | null;
|
|
27
|
+
refresh: () => Promise<void>;
|
|
28
|
+
};
|
|
29
|
+
/** List the workspace's sessions — the data behind fleet and manager views. */
|
|
30
|
+
export declare function useWorkspaceSessions(options?: UseWorkspaceSessionsOptions): UseWorkspaceSessionsResult;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { CreateWorkspaceRequest, UpdateWorkspaceRequest, Workspace } from "@opengeni/sdk";
|
|
2
|
+
import { type ClientOverride } from "../provider";
|
|
3
|
+
export type UseWorkspacesOptions = Pick<ClientOverride, "client"> & {
|
|
4
|
+
pollIntervalMs?: number | undefined;
|
|
5
|
+
enabled?: boolean | undefined;
|
|
6
|
+
};
|
|
7
|
+
export type UseWorkspacesResult = {
|
|
8
|
+
workspaces: Workspace[];
|
|
9
|
+
loading: boolean;
|
|
10
|
+
error: Error | null;
|
|
11
|
+
refresh: () => Promise<void>;
|
|
12
|
+
create: (request: CreateWorkspaceRequest) => Promise<Workspace | null>;
|
|
13
|
+
update: (workspaceId: string, request: UpdateWorkspaceRequest) => Promise<Workspace | null>;
|
|
14
|
+
mutating: boolean;
|
|
15
|
+
mutationError: Error | null;
|
|
16
|
+
clearMutationError: () => void;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* The caller's workspaces (workspace switchers, onboarding). Not scoped to
|
|
20
|
+
* the provider's workspace, so it only needs the client.
|
|
21
|
+
*/
|
|
22
|
+
export declare function useWorkspaces(options?: UseWorkspacesOptions): UseWorkspacesResult;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { HumanInputQuestion, SessionEvent } from "@opengeni/sdk";
|
|
2
|
+
/** Minimal actionable request shape available from the durable event log. */
|
|
3
|
+
export type PendingHumanInputRequest = {
|
|
4
|
+
id: string;
|
|
5
|
+
turnId: string | null;
|
|
6
|
+
questions: HumanInputQuestion[];
|
|
7
|
+
allowSkip: boolean;
|
|
8
|
+
expiresAt: string | null;
|
|
9
|
+
};
|
|
10
|
+
/** Parse one generic `session.humanInput.requested` event defensively. */
|
|
11
|
+
export declare function humanInputRequestFromEvent(event: Pick<SessionEvent, "type" | "payload" | "turnId">): PendingHumanInputRequest | null;
|
|
12
|
+
/**
|
|
13
|
+
* Fold a durable event log into the structured requests that are actionable
|
|
14
|
+
* now. Responses remove one request; a terminal owning turn clears any
|
|
15
|
+
* unresolved requests that died with it. Replaying history cannot resurrect a
|
|
16
|
+
* previously answered card.
|
|
17
|
+
*/
|
|
18
|
+
export declare function projectPendingHumanInputRequests(events: SessionEvent[]): PendingHumanInputRequest[];
|