@opengeni/react 0.48.0 → 0.52.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/README.md +90 -2
- package/dist/artifacts-document.d.ts +3 -0
- package/dist/artifacts-document.js +17 -0
- package/dist/artifacts-document.js.map +1 -0
- package/dist/artifacts-presentation.d.ts +3 -0
- package/dist/artifacts-presentation.js +17 -0
- package/dist/artifacts-presentation.js.map +1 -0
- package/dist/artifacts-spreadsheet.d.ts +3 -0
- package/dist/artifacts-spreadsheet.js +17 -0
- package/dist/artifacts-spreadsheet.js.map +1 -0
- package/dist/artifacts.d.ts +2 -0
- package/dist/artifacts.js +170 -0
- package/dist/artifacts.js.map +1 -0
- package/dist/chunk-6BBWWOOU.js +82 -0
- package/dist/chunk-6BBWWOOU.js.map +1 -0
- package/dist/{chunk-FWXGSNXT.js → chunk-724BW4TW.js} +585 -34
- package/dist/chunk-724BW4TW.js.map +1 -0
- package/dist/chunk-7I2KB3OK.js +3895 -0
- package/dist/chunk-7I2KB3OK.js.map +1 -0
- package/dist/chunk-7WCLAEFV.js +2828 -0
- package/dist/chunk-7WCLAEFV.js.map +1 -0
- package/dist/{chunk-I4MPFDRP.js → chunk-FWS3KC3Z.js} +3 -3
- package/dist/{chunk-EKZH6IDG.js → chunk-HDBG7XGO.js} +62 -1
- package/dist/chunk-HDBG7XGO.js.map +1 -0
- package/dist/chunk-HUIKIDM5.js +2148 -0
- package/dist/chunk-HUIKIDM5.js.map +1 -0
- package/dist/{chunk-XCNTXWBB.js → chunk-JAGDUCZQ.js} +854 -340
- package/dist/chunk-JAGDUCZQ.js.map +1 -0
- package/dist/{chunk-LHLYWG5R.js → chunk-JR3QFY6B.js} +413 -37
- package/dist/chunk-JR3QFY6B.js.map +1 -0
- package/dist/chunk-JVYQRRC4.js +53 -0
- package/dist/chunk-JVYQRRC4.js.map +1 -0
- package/dist/chunk-KCGXPP5V.js +157 -0
- package/dist/chunk-KCGXPP5V.js.map +1 -0
- package/dist/chunk-PEI6RANI.js +3234 -0
- package/dist/chunk-PEI6RANI.js.map +1 -0
- package/dist/{chunk-NJ7M2B6Z.js → chunk-ROIRTM37.js} +18 -10
- package/dist/{chunk-NJ7M2B6Z.js.map → chunk-ROIRTM37.js.map} +1 -1
- package/dist/{chunk-O4VXOBGF.js → chunk-WSK7G5LE.js} +70 -2
- package/dist/chunk-WSK7G5LE.js.map +1 -0
- package/dist/{chunk-OL6QVXGF.js → chunk-X4S56Y2H.js} +27 -7
- package/dist/{chunk-OL6QVXGF.js.map → chunk-X4S56Y2H.js.map} +1 -1
- package/dist/client.d.ts +7 -1
- package/dist/clipboard.d.ts +1 -0
- package/dist/clipboard.js +7 -0
- package/dist/clipboard.js.map +1 -0
- package/dist/commands/index.d.ts +3 -3
- package/dist/commands/registry.d.ts +1 -1
- package/dist/commands/types.d.ts +1 -1
- package/dist/components/approval-surface.d.ts +2 -2
- package/dist/components/artifacts/artifact-surface.d.ts +18 -0
- package/dist/components/artifacts/document-editor.d.ts +172 -0
- package/dist/components/artifacts/editable-artifact-ui.d.ts +13 -0
- package/dist/components/artifacts/editable-artifact-workbench.d.ts +49 -0
- package/dist/components/artifacts/editable-document.d.ts +24 -0
- package/dist/components/artifacts/editable-presentation.d.ts +24 -0
- package/dist/components/artifacts/editable-spreadsheet.d.ts +32 -0
- package/dist/components/artifacts/index.d.ts +8 -0
- package/dist/components/artifacts/presentation-editor.d.ts +297 -0
- package/dist/components/artifacts/spreadsheet-canvas.d.ts +120 -0
- package/dist/components/artifacts/spreadsheet-grid.d.ts +113 -0
- package/dist/components/browser-viewer.d.ts +29 -0
- package/dist/components/chat-composer.d.ts +8 -8
- package/dist/components/code-editor.d.ts +25 -3
- package/dist/components/command-palette.d.ts +2 -2
- package/dist/components/composer-transcription-control.d.ts +2 -2
- package/dist/components/composer.d.ts +17 -17
- package/dist/components/computer-viewer.d.ts +23 -0
- package/dist/components/copy-button.d.ts +2 -2
- package/dist/components/desktop-viewer.d.ts +25 -21
- package/dist/components/diff-view.d.ts +1 -1
- package/dist/components/enrollment-consent.d.ts +1 -1
- package/dist/components/enrollment-device-flow.d.ts +1 -1
- package/dist/components/file-browser.d.ts +2 -2
- package/dist/components/fleet-tile.d.ts +1 -1
- package/dist/components/generated-video-player.d.ts +10 -0
- package/dist/components/human-input-form.d.ts +1 -1
- package/dist/components/human-input-surface.d.ts +2 -2
- package/dist/components/interactive-workbench-viewers.d.ts +2 -0
- package/dist/components/machine-card.d.ts +2 -2
- package/dist/components/machine-dock-bar.d.ts +3 -3
- package/dist/components/machine-health-pill.d.ts +2 -2
- package/dist/components/machine-input-display.d.ts +1 -1
- package/dist/components/machine-metrics.d.ts +2 -2
- package/dist/components/machine-status-pill.d.ts +4 -4
- package/dist/components/machines/health.d.ts +1 -1
- package/dist/components/machines/machine-detail.d.ts +3 -3
- package/dist/components/machines/metric-history-chart.d.ts +1 -1
- package/dist/components/machines/metric-sparkline.d.ts +2 -2
- package/dist/components/machines/series.d.ts +2 -2
- package/dist/components/machines-dashboard.d.ts +2 -2
- package/dist/components/markdown.d.ts +1 -1
- package/dist/components/message-timeline.d.ts +12 -5
- package/dist/components/model-picker.d.ts +2 -2
- package/dist/components/model-policy-picker.d.ts +7 -7
- package/dist/components/pierre-diff.d.ts +1 -1
- package/dist/components/pierre-file.d.ts +1 -1
- package/dist/components/queue-draft-policy.d.ts +1 -1
- package/dist/components/queue-surface-implementation.d.ts +3 -3
- package/dist/components/queue-surface-state.d.ts +4 -4
- package/dist/components/queue-surface.d.ts +5 -5
- package/dist/components/sandbox-files.d.ts +3 -3
- package/dist/components/sandbox-terminal.d.ts +21 -4
- package/dist/components/sandbox-workspace.d.ts +25 -9
- package/dist/components/session-chrome.d.ts +4 -4
- package/dist/components/session-status.d.ts +2 -2
- package/dist/components/timeline-annotation-selection.d.ts +9 -0
- package/dist/components/timeline-annotations-dialog.d.ts +16 -0
- package/dist/components/timeline-annotations.d.ts +13 -0
- package/dist/components/tooltip.d.ts +4 -4
- package/dist/components/user-message-body.d.ts +2 -2
- package/dist/components/workbench-changes.d.ts +2 -2
- package/dist/components/workspace-dock.d.ts +1 -1
- package/dist/composer.d.ts +11 -11
- package/dist/composer.js +5 -5
- package/dist/hooks/internal.d.ts +1 -1
- package/dist/hooks/use-attached-browsers.d.ts +21 -0
- package/dist/hooks/use-available-models.d.ts +2 -2
- package/dist/hooks/use-billing-usage.d.ts +1 -1
- package/dist/hooks/use-browser-frame-stream.d.ts +28 -0
- package/dist/hooks/use-browser-identities.d.ts +26 -0
- package/dist/hooks/use-browser-session.d.ts +28 -0
- package/dist/hooks/use-browser-sessions.d.ts +32 -0
- package/dist/hooks/use-codex-accounts.d.ts +2 -2
- package/dist/hooks/use-composer.d.ts +36 -9
- package/dist/hooks/use-computer-frame-stream.d.ts +24 -0
- package/dist/hooks/use-computer-session.d.ts +28 -0
- package/dist/hooks/use-computer-sessions.d.ts +28 -0
- package/dist/hooks/use-desktop-stream.d.ts +1 -1
- package/dist/hooks/use-environments.d.ts +1 -1
- package/dist/hooks/use-file-attachments.d.ts +1 -1
- package/dist/hooks/use-goal.d.ts +2 -2
- package/dist/hooks/use-human-input.d.ts +2 -2
- package/dist/hooks/use-last-started-turn-policy.d.ts +2 -2
- package/dist/hooks/use-machine-chip.d.ts +2 -2
- package/dist/hooks/use-machines.d.ts +4 -4
- package/dist/hooks/use-packs.d.ts +7 -2
- package/dist/hooks/use-rigs.d.ts +1 -1
- package/dist/hooks/use-sandbox-files.d.ts +6 -4
- package/dist/hooks/use-sandbox-git.d.ts +6 -5
- package/dist/hooks/use-sandbox-terminal.d.ts +1 -1
- package/dist/hooks/use-scheduled-tasks.d.ts +1 -1
- package/dist/hooks/use-session-capabilities.d.ts +5 -4
- package/dist/hooks/use-session-control.d.ts +1 -1
- package/dist/hooks/use-session-events.d.ts +2 -2
- package/dist/hooks/use-session-lineage.d.ts +1 -1
- package/dist/hooks/use-session-mcp-approval-policy.d.ts +2 -2
- package/dist/hooks/use-session.d.ts +2 -2
- package/dist/hooks/use-slash-commands.d.ts +1 -1
- package/dist/hooks/use-terminal-stream.d.ts +8 -2
- package/dist/hooks/use-turn-queue.d.ts +2 -2
- package/dist/hooks/use-video-artifact-playback.d.ts +9 -0
- package/dist/hooks/use-voice-input.d.ts +1 -1
- package/dist/hooks/use-workspace-capture.d.ts +1 -1
- package/dist/hooks/use-workspace-edit.d.ts +1 -1
- package/dist/hooks/use-workspace-sessions.d.ts +1 -1
- package/dist/hooks/use-workspaces.d.ts +1 -1
- package/dist/index.d.ts +158 -155
- package/dist/index.js +906 -462
- package/dist/index.js.map +1 -1
- package/dist/interaction.d.ts +23 -0
- package/dist/interaction.js +36 -0
- package/dist/interaction.js.map +1 -0
- package/dist/interactive-workbench-viewers-KHNOHWQE.js +13 -0
- package/dist/interactive-workbench-viewers-KHNOHWQE.js.map +1 -0
- package/dist/lib/relay-wire.d.ts +4 -0
- package/dist/lib/sandbox-liveness.d.ts +9 -0
- package/dist/lib/terminal-capability.d.ts +5 -0
- package/dist/lib/xterm-theme.d.ts +1 -1
- package/dist/machines.d.ts +30 -30
- package/dist/machines.js +3 -3
- package/dist/provider.d.ts +4 -4
- package/dist/{queue-surface-implementation-U5JFG7HT.js → queue-surface-implementation-2KVJTYXH.js} +100 -48
- package/dist/queue-surface-implementation-2KVJTYXH.js.map +1 -0
- package/dist/realtime/dropdown-menu.d.ts +8 -8
- package/dist/realtime/realtime-control.d.ts +6 -6
- package/dist/realtime.d.ts +4 -4
- package/dist/realtime.js +3 -3
- package/dist/session-context.d.ts +19 -1
- package/dist/session-ui.d.ts +14 -14
- package/dist/session-ui.js +5 -4
- package/dist/session.d.ts +28 -28
- package/dist/session.js +5 -5
- package/dist/timeline/activity-rail.d.ts +5 -3
- package/dist/timeline/disclosure-context.d.ts +1 -1
- package/dist/timeline/fleet-decision-projection.d.ts +1 -1
- package/dist/timeline/fleet-decision-row.d.ts +3 -3
- package/dist/timeline/index.d.ts +19 -19
- package/dist/timeline/parsers.d.ts +4 -1
- package/dist/timeline/projection.d.ts +3 -3
- package/dist/timeline/registry.d.ts +8 -2
- package/dist/timeline/screenshot-lightbox.d.ts +2 -2
- package/dist/timeline/shared.d.ts +21 -10
- package/dist/timeline/tool-diff.d.ts +2 -2
- package/dist/timeline/tool-renderers.d.ts +1 -1
- package/dist/timeline/turn-summary.d.ts +3 -3
- package/dist/timeline/types.d.ts +39 -3
- package/dist/timeline-annotation-selection-3L7LHGG2.js +187 -0
- package/dist/timeline-annotation-selection-3L7LHGG2.js.map +1 -0
- package/dist/timeline-annotations-dialog-U7EVLR75.js +196 -0
- package/dist/timeline-annotations-dialog-U7EVLR75.js.map +1 -0
- package/package.json +36 -7
- package/src/artifacts-document.ts +31 -0
- package/src/artifacts-presentation.ts +36 -0
- package/src/artifacts-spreadsheet.ts +21 -0
- package/src/artifacts.ts +86 -0
- package/src/client.ts +87 -1
- package/src/clipboard.ts +2 -0
- package/src/components/artifacts/artifact-surface.tsx +93 -0
- package/src/components/artifacts/document-editor.tsx +2255 -0
- package/src/components/artifacts/editable-artifact-ui.tsx +89 -0
- package/src/components/artifacts/editable-artifact-workbench.tsx +203 -0
- package/src/components/artifacts/editable-document.tsx +657 -0
- package/src/components/artifacts/editable-presentation.tsx +1020 -0
- package/src/components/artifacts/editable-spreadsheet.tsx +733 -0
- package/src/components/artifacts/index.ts +99 -0
- package/src/components/artifacts/presentation-editor.tsx +3148 -0
- package/src/components/artifacts/spreadsheet-canvas.ts +799 -0
- package/src/components/artifacts/spreadsheet-grid.tsx +2129 -0
- package/src/components/browser-viewer.tsx +1592 -0
- package/src/components/chat-composer.tsx +13 -0
- package/src/components/code-editor.tsx +89 -30
- package/src/components/composer-transcription-control.tsx +10 -6
- package/src/components/computer-viewer.tsx +1139 -0
- package/src/components/desktop-viewer.tsx +101 -73
- package/src/components/generated-video-player.tsx +89 -0
- package/src/components/interactive-workbench-viewers.ts +2 -0
- package/src/components/machine-input-display.ts +3 -0
- package/src/components/message-timeline.tsx +289 -32
- package/src/components/queue-surface-implementation.tsx +116 -60
- package/src/components/sandbox-files.tsx +2 -2
- package/src/components/sandbox-terminal.tsx +106 -41
- package/src/components/sandbox-workspace.tsx +215 -87
- package/src/components/session-chrome.tsx +53 -13
- package/src/components/timeline-annotation-selection.tsx +221 -0
- package/src/components/timeline-annotations-dialog.tsx +213 -0
- package/src/components/timeline-annotations.tsx +84 -0
- package/src/components/workbench-changes.tsx +188 -31
- package/src/hooks/use-attached-browsers.ts +152 -0
- package/src/hooks/use-browser-frame-stream.ts +316 -0
- package/src/hooks/use-browser-identities.ts +225 -0
- package/src/hooks/use-browser-session.ts +476 -0
- package/src/hooks/use-browser-sessions.ts +281 -0
- package/src/hooks/use-composer.ts +769 -24
- package/src/hooks/use-computer-frame-stream.ts +311 -0
- package/src/hooks/use-computer-session.ts +442 -0
- package/src/hooks/use-computer-sessions.ts +245 -0
- package/src/hooks/use-machine-chip.ts +5 -3
- package/src/hooks/use-machines.ts +33 -3
- package/src/hooks/use-packs.ts +51 -0
- package/src/hooks/use-sandbox-files.ts +98 -55
- package/src/hooks/use-sandbox-git.ts +93 -38
- package/src/hooks/use-sandbox-terminal.ts +3 -2
- package/src/hooks/use-session-capabilities.ts +59 -46
- package/src/hooks/use-terminal-stream.ts +102 -23
- package/src/hooks/use-video-artifact-playback.ts +28 -0
- package/src/hooks/use-workspace-edit.ts +2 -1
- package/src/index.ts +10 -0
- package/src/interaction.ts +71 -0
- package/src/lib/relay-wire.ts +4 -0
- package/src/lib/sandbox-liveness.ts +11 -0
- package/src/lib/terminal-capability.ts +10 -0
- package/src/session-context.ts +90 -0
- package/src/timeline/activity-rail.tsx +19 -3
- package/src/timeline/index.ts +3 -0
- package/src/timeline/parsers.ts +14 -1
- package/src/timeline/projection.ts +211 -14
- package/src/timeline/registry.ts +13 -1
- package/src/timeline/screenshot-lightbox.tsx +19 -9
- package/src/timeline/shared.tsx +56 -8
- package/src/timeline/tool-renderers.tsx +303 -50
- package/src/timeline/types.ts +55 -3
- package/styles/compiled.css +248 -15
- package/styles/index.css +15 -0
- package/styles/responsive.css +13 -1
- package/dist/chunk-EKZH6IDG.js.map +0 -1
- package/dist/chunk-FWXGSNXT.js.map +0 -1
- package/dist/chunk-LHLYWG5R.js.map +0 -1
- package/dist/chunk-O4VXOBGF.js.map +0 -1
- package/dist/chunk-XCNTXWBB.js.map +0 -1
- package/dist/fleet-decision-projection-SLNZMS42.js +0 -241
- package/dist/fleet-decision-projection-SLNZMS42.js.map +0 -1
- package/dist/queue-surface-implementation-U5JFG7HT.js.map +0 -1
- /package/dist/{chunk-I4MPFDRP.js.map → chunk-FWS3KC3Z.js.map} +0 -0
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { type ComposerDraft, type EffectiveControlResumeOption, type EffectiveSessionControl, type ResourceRef, type SendMessageInput, type SessionEvent } from "@opengeni/sdk";
|
|
2
|
-
import { type EmbeddedSessionClientOverride } from "../session-context";
|
|
3
|
-
import { type SessionEventFeedOptions } from "./internal";
|
|
4
|
-
export type ComposerSendExtras = Omit<SendMessageInput, "text" | "clientEventId">;
|
|
1
|
+
import { type ComposerDraft, type DraftTimelineAnnotation, type EffectiveControlResumeOption, type EffectiveSessionControl, type ResourceRef, type SendMessageInput, type SessionEvent } from "@opengeni/sdk";
|
|
2
|
+
import { type EmbeddedSessionClientOverride } from "../session-context.js";
|
|
3
|
+
import { type SessionEventFeedOptions } from "./internal.js";
|
|
4
|
+
export type ComposerSendExtras = Omit<SendMessageInput, "text" | "clientEventId" | "annotations">;
|
|
5
5
|
export type UseComposerOptions = EmbeddedSessionClientOverride & SessionEventFeedOptions & {
|
|
6
|
+
/** Called synchronously after an ordinary Send is accepted by the local UI. */
|
|
7
|
+
onSubmitted?: ((text: string, input: SendMessageInput) => void) | undefined;
|
|
6
8
|
/** Called with the exact accepted wire input after a successful send. */
|
|
7
9
|
onSent?: ((text: string, input: SendMessageInput) => void) | undefined;
|
|
8
10
|
/**
|
|
@@ -24,17 +26,40 @@ export type UseComposerOptions = EmbeddedSessionClientOverride & SessionEventFee
|
|
|
24
26
|
/** Disable remote composer-draft reads and writes for embedded hosts. */
|
|
25
27
|
draftPersistence?: "durable" | "disabled" | undefined;
|
|
26
28
|
};
|
|
29
|
+
export type ComposerOptimisticMessage = {
|
|
30
|
+
clientEventId: string;
|
|
31
|
+
text: string;
|
|
32
|
+
annotations: DraftTimelineAnnotation[];
|
|
33
|
+
resources: ResourceRef[];
|
|
34
|
+
occurredAt: string;
|
|
35
|
+
state: "sending" | "queued" | "failed";
|
|
36
|
+
error?: string | undefined;
|
|
37
|
+
outcomeUnknown?: boolean | undefined;
|
|
38
|
+
};
|
|
27
39
|
export type ComposerState = {
|
|
28
40
|
value: string;
|
|
29
41
|
setValue: (value: string) => void;
|
|
42
|
+
annotations?: DraftTimelineAnnotation[] | undefined;
|
|
43
|
+
addAnnotation?: ((annotation: DraftTimelineAnnotation) => void) | undefined;
|
|
44
|
+
updateAnnotation?: ((id: string, note: string) => void) | undefined;
|
|
45
|
+
removeAnnotation?: ((id: string) => void) | undefined;
|
|
46
|
+
/** Newly captured annotation the review surface should focus. */
|
|
47
|
+
annotationReviewTargetId?: string | null | undefined;
|
|
48
|
+
clearAnnotationReviewTarget?: (() => void) | undefined;
|
|
30
49
|
/** Read the current draft synchronously before a destructive replacement. */
|
|
31
50
|
hasDraftContent: () => boolean;
|
|
32
51
|
/** Append the draft behind prompts already visible in the queue. */
|
|
33
52
|
send: (text?: string) => Promise<boolean>;
|
|
53
|
+
/** Locally acknowledged ordinary sends awaiting durable timeline reconciliation. */
|
|
54
|
+
optimisticMessages?: ComposerOptimisticMessage[] | undefined;
|
|
55
|
+
retryOptimisticMessage?: ((clientEventId: string) => void) | undefined;
|
|
56
|
+
removeOptimisticMessage?: ((clientEventId: string) => void) | undefined;
|
|
34
57
|
/** Supersede current direction with the draft. */
|
|
35
58
|
steer: (text?: string) => Promise<boolean>;
|
|
36
59
|
/** Optimistic-to-durable projection for a Steer that has not started yet. */
|
|
37
60
|
steering?: ComposerSteeringState | null | undefined;
|
|
61
|
+
/** Immediate mutation-receipt projection while physical cancellation settles. */
|
|
62
|
+
stoppingAttempt?: "current" | "previous" | null | undefined;
|
|
38
63
|
sending: boolean;
|
|
39
64
|
canSend: boolean;
|
|
40
65
|
/** Pause the session without deleting its prompt queue. */
|
|
@@ -65,6 +90,8 @@ export type ComposerSteeringState = {
|
|
|
65
90
|
clientEventId: string | null;
|
|
66
91
|
triggerEventId: string | null;
|
|
67
92
|
turnId: string | null;
|
|
93
|
+
/** True only when the accepted Steer durably interrupted a live attempt. */
|
|
94
|
+
stoppingPreviousAttempt?: boolean | undefined;
|
|
68
95
|
};
|
|
69
96
|
/**
|
|
70
97
|
* Draft + send + Pause/Resume state for the chat composer — the only
|
|
@@ -76,12 +103,12 @@ export declare function useComposer(sessionId: string | null | undefined, option
|
|
|
76
103
|
/** Events that can atomically replace or clear this subject's durable draft. */
|
|
77
104
|
export declare function isComposerDraftEvent(event: Pick<SessionEvent, "type">): boolean;
|
|
78
105
|
/**
|
|
79
|
-
* Default text for a
|
|
80
|
-
* Kept non-empty so the wire contract (`text: z.string().min(1)`) and
|
|
81
|
-
* worker's non-whitespace guard accept it
|
|
82
|
-
* `resources`.
|
|
106
|
+
* Default text for a resource-only message (attachments present, no typed
|
|
107
|
+
* draft). Kept non-empty so the wire contract (`text: z.string().min(1)`) and
|
|
108
|
+
* the worker's non-whitespace guard accept it. The export name is retained for
|
|
109
|
+
* compatibility now that repositories can ride beside files in `resources`.
|
|
83
110
|
*/
|
|
84
|
-
export declare const FILE_ONLY_MESSAGE_TEXT = "(see attached
|
|
111
|
+
export declare const FILE_ONLY_MESSAGE_TEXT = "(see attached context)";
|
|
85
112
|
/** Resolve possibly-deferred extras to a concrete bag (function evaluated now). */
|
|
86
113
|
export declare function resolveSendExtras(extras: ComposerSendExtras | (() => ComposerSendExtras) | undefined): ComposerSendExtras;
|
|
87
114
|
/**
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type ComputerFrame, type ComputerFrameStreamOptions, type ComputerSessionAttachment } from "@opengeni/sdk/interaction";
|
|
2
|
+
import { type EmbeddedComputerInteractionClientOverride } from "../session-context.js";
|
|
3
|
+
export type ComputerFrameConnectionState = "idle" | "attaching" | "connecting" | "live" | "reconnecting" | "error";
|
|
4
|
+
export type ComputerFrameWebSocket = Pick<WebSocket, "binaryType" | "readyState" | "close" | "addEventListener" | "removeEventListener"> & {
|
|
5
|
+
send(data: ArrayBuffer): void;
|
|
6
|
+
};
|
|
7
|
+
export type ComputerFrameWebSocketFactory = (url: string, protocols: string[]) => ComputerFrameWebSocket;
|
|
8
|
+
export type UseComputerFrameStreamOptions = EmbeddedComputerInteractionClientOverride & {
|
|
9
|
+
computerSessionId: string | null;
|
|
10
|
+
targetId: string | null;
|
|
11
|
+
enabled?: boolean | undefined;
|
|
12
|
+
stream?: ComputerFrameStreamOptions | undefined;
|
|
13
|
+
webSocketFactory?: ComputerFrameWebSocketFactory | undefined;
|
|
14
|
+
};
|
|
15
|
+
export type UseComputerFrameStreamResult = {
|
|
16
|
+
state: ComputerFrameConnectionState;
|
|
17
|
+
frame: ComputerFrame | null;
|
|
18
|
+
attachment: Pick<ComputerSessionAttachment, "computerSessionId" | "controllerGeneration" | "targetId" | "expiresAt"> | null;
|
|
19
|
+
error: Error | null;
|
|
20
|
+
reconnect: () => void;
|
|
21
|
+
};
|
|
22
|
+
/** Reconnecting, latest-only ComputerSession media attachment. Grants remain in
|
|
23
|
+
* WebSocket subprotocols or the relay's authenticated first binary message. */
|
|
24
|
+
export declare function useComputerFrameStream(options: UseComputerFrameStreamOptions): UseComputerFrameStreamResult;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ComputerAction, ComputerActionReceipt, ComputerFrame, ComputerObservation, ComputerSession, ComputerTarget } from "@opengeni/sdk/interaction";
|
|
2
|
+
import { type EmbeddedComputerInteractionClientOverride } from "../session-context.js";
|
|
3
|
+
export type UseComputerSessionOptions = EmbeddedComputerInteractionClientOverride & {
|
|
4
|
+
computerSessionId: string | null;
|
|
5
|
+
enabled?: boolean | undefined;
|
|
6
|
+
pollIntervalMs?: number | undefined;
|
|
7
|
+
};
|
|
8
|
+
export type UseComputerSessionResult = {
|
|
9
|
+
session: ComputerSession | null;
|
|
10
|
+
targets: ComputerTarget[];
|
|
11
|
+
selectedTarget: ComputerTarget | null;
|
|
12
|
+
observation: ComputerObservation | null;
|
|
13
|
+
loading: boolean;
|
|
14
|
+
mutating: boolean;
|
|
15
|
+
error: Error | null;
|
|
16
|
+
refresh: () => Promise<void>;
|
|
17
|
+
/** Changes only this viewer's target cursor; it never takes ownership or
|
|
18
|
+
* foregrounds an application. */
|
|
19
|
+
selectTarget: (targetId: string) => Promise<ComputerTarget>;
|
|
20
|
+
act: (action: ComputerAction, operationId?: string) => Promise<ComputerActionReceipt>;
|
|
21
|
+
/** Dispatch pointer input against the exact displayed frame. */
|
|
22
|
+
actFromFrame: (action: Extract<ComputerAction, {
|
|
23
|
+
type: "pointer";
|
|
24
|
+
}>, frame: ComputerFrame, operationId?: string) => Promise<ComputerActionReceipt>;
|
|
25
|
+
};
|
|
26
|
+
/** Selected ComputerSession state. Semantic and pixel input share the same
|
|
27
|
+
* generation-fenced controller operation stream used by agents. */
|
|
28
|
+
export declare function useComputerSession(options: UseComputerSessionOptions): UseComputerSessionResult;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ComputerSession, ComputerSessionMutationResponse, CreateComputerSessionRequest } from "@opengeni/sdk/interaction";
|
|
2
|
+
import type { EmbeddedComputerInteractionClientLike } from "../client.js";
|
|
3
|
+
import { type EmbeddedComputerInteractionClientOverride } from "../session-context.js";
|
|
4
|
+
export type UseComputerSessionsOptions = EmbeddedComputerInteractionClientOverride & {
|
|
5
|
+
/** Current agent/session relevance. Workspace peers remain in `sessions`. */
|
|
6
|
+
sessionId?: string | undefined;
|
|
7
|
+
enabled?: boolean | undefined;
|
|
8
|
+
/** Temporary invalidation path until the interaction event stream lands. */
|
|
9
|
+
pollIntervalMs?: number | undefined;
|
|
10
|
+
};
|
|
11
|
+
export type UseComputerSessionsResult = {
|
|
12
|
+
revision: number;
|
|
13
|
+
sessions: ComputerSession[];
|
|
14
|
+
relevantSessions: ComputerSession[];
|
|
15
|
+
loading: boolean;
|
|
16
|
+
refreshing: boolean;
|
|
17
|
+
error: Error | null;
|
|
18
|
+
refresh: () => Promise<void>;
|
|
19
|
+
create: (request: Omit<CreateComputerSessionRequest, "operationId"> & {
|
|
20
|
+
operationId?: string;
|
|
21
|
+
}) => Promise<ComputerSessionMutationResponse>;
|
|
22
|
+
end: (computerSessionId: string, operationId?: string) => Promise<ComputerSessionMutationResponse>;
|
|
23
|
+
};
|
|
24
|
+
/** Workspace-wide ComputerSession registry. Associations rank relevance but
|
|
25
|
+
* never hide peer resources or create an ownership boundary. */
|
|
26
|
+
export declare function useComputerSessions(options?: UseComputerSessionsOptions): UseComputerSessionsResult;
|
|
27
|
+
/** Exported for narrow proxy implementations and tests. */
|
|
28
|
+
export type ComputerSessionsClient = EmbeddedComputerInteractionClientLike;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type DesktopConnectionState, type DesktopRfbFactory, type DesktopStreamCapability } from "@opengeni/sdk";
|
|
2
2
|
import { type RefObject } from "react";
|
|
3
|
-
import { type DesktopWebSocketFactory } from "./use-relay-frame-stream";
|
|
3
|
+
import { type DesktopWebSocketFactory } from "./use-relay-frame-stream.js";
|
|
4
4
|
export type UseDesktopStreamOptions = {
|
|
5
5
|
/** The desktop cell of the negotiated capabilities (`capabilities.DesktopStream`). */
|
|
6
6
|
capability: DesktopStreamCapability | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CreateVariableSetRequest, UpdateVariableSetRequest, VariableSet, VariableSetSecret, VariableSetVariableMetadata } from "@opengeni/sdk";
|
|
2
|
-
import { type ClientOverride } from "../provider";
|
|
2
|
+
import { type ClientOverride } from "../provider.js";
|
|
3
3
|
export type UseVariableSetsOptions = ClientOverride & {
|
|
4
4
|
pollIntervalMs?: number | undefined;
|
|
5
5
|
enabled?: boolean | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { FileAsset, FileResourceRef } from "@opengeni/sdk";
|
|
2
|
-
import { type EmbeddedFileAttachmentClientOverride } from "../session-context";
|
|
2
|
+
import { type EmbeddedFileAttachmentClientOverride } from "../session-context.js";
|
|
3
3
|
export type UseFileAttachmentsOptions = EmbeddedFileAttachmentClientOverride & {
|
|
4
4
|
/**
|
|
5
5
|
* Only files matching this predicate are accepted by {@link
|
package/dist/hooks/use-goal.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type SessionEvent, type SessionGoal } from "@opengeni/sdk";
|
|
2
|
-
import { type EmbeddedGoalClientOverride } from "../session-context";
|
|
3
|
-
import { type SessionEventFeedOptions } from "./internal";
|
|
2
|
+
import { type EmbeddedGoalClientOverride } from "../session-context.js";
|
|
3
|
+
import { type SessionEventFeedOptions } from "./internal.js";
|
|
4
4
|
/** Event types that change the session goal (set/updated/completed/paused/...). */
|
|
5
5
|
export declare function isGoalEvent(event: Pick<SessionEvent, "type">): boolean;
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SessionEvent, SessionHumanInputRequest, SubmitHumanInputResponseRequest } from "@opengeni/sdk";
|
|
2
|
-
import { type EmbeddedHumanInputClientOverride } from "../session-context";
|
|
3
|
-
import { type SessionEventFeedOptions } from "./internal";
|
|
2
|
+
import { type EmbeddedHumanInputClientOverride } from "../session-context.js";
|
|
3
|
+
import { type SessionEventFeedOptions } from "./internal.js";
|
|
4
4
|
/** Events that can create, settle, or invalidate an actionable request. */
|
|
5
5
|
export declare function isHumanInputEvent(event: Pick<SessionEvent, "type">): boolean;
|
|
6
6
|
export type UseHumanInputRequestsOptions = EmbeddedHumanInputClientOverride & SessionEventFeedOptions & {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { LatencyMode, ReasoningEffort, SessionEvent } from "@opengeni/sdk";
|
|
2
|
-
import { type ClientOverride } from "../session-context";
|
|
3
|
-
import { type SessionEventFeedOptions } from "./internal";
|
|
2
|
+
import { type ClientOverride } from "../session-context.js";
|
|
3
|
+
import { type SessionEventFeedOptions } from "./internal.js";
|
|
4
4
|
/** Refresh when a turn actually admits — not on composer picker / queue-only changes. */
|
|
5
5
|
export declare function isLastStartedTurnPolicyEvent(event: Pick<SessionEvent, "type">): boolean;
|
|
6
6
|
export type LastStartedTurnPolicy = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { MachineState } from "@opengeni/sdk";
|
|
2
|
-
import type { SessionCapabilitiesState } from "./use-session-capabilities";
|
|
2
|
+
import type { SessionCapabilitiesState } from "./use-session-capabilities.js";
|
|
3
3
|
/** The one truthful machine indicator. Honest staleness beats
|
|
4
4
|
* fake liveness: a cold/asleep box reads "offline — as of <time>", never "live". */
|
|
5
5
|
export type MachineChipState = "live" | "waking" | "offline";
|
|
@@ -36,7 +36,7 @@ export declare function formatAsOf(capturedAt: string, now: number): string;
|
|
|
36
36
|
* it; the whole point is a deterministic, testable projection).
|
|
37
37
|
*
|
|
38
38
|
* Precedence:
|
|
39
|
-
* 1. warm
|
|
39
|
+
* 1. warm lease → **live** (a holder-confirmed box always wins).
|
|
40
40
|
* 2. actively warming (negotiating, wake-on-edit, or a reconnecting/enrolling
|
|
41
41
|
* machine) → **waking**.
|
|
42
42
|
* 3. everything else (a cold/asleep box, a self-hosted machine that's offline,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { RemoveEnrollmentRequest, RemoveEnrollmentResponse } from "@opengeni/sdk";
|
|
2
|
-
import { type ClientOverride } from "../provider";
|
|
3
|
-
import type { MachinesResponse, MachineView, MetricSample } from "../types/machines";
|
|
1
|
+
import type { RemoveEnrollmentRequest, RemoveEnrollmentResponse, SwapActiveSandboxResponse } from "@opengeni/sdk";
|
|
2
|
+
import { type ClientOverride } from "../provider.js";
|
|
3
|
+
import type { MachinesResponse, MachineView, MetricSample } from "../types/machines.js";
|
|
4
4
|
/**
|
|
5
5
|
* The slice of the SDK client the Machines surface needs. The method NAMES +
|
|
6
6
|
* SIGNATURES match M10's `OpenGeniClient` (`listMachines`, `machineMetricsSeries`)
|
|
@@ -35,7 +35,7 @@ export type MachinesClientLike = {
|
|
|
35
35
|
*/
|
|
36
36
|
swapActiveSandbox?: (workspaceId: string, sessionId: string, request: {
|
|
37
37
|
target: string;
|
|
38
|
-
}) => Promise<
|
|
38
|
+
}) => Promise<SwapActiveSandboxResponse>;
|
|
39
39
|
/**
|
|
40
40
|
* Host-supplied swap adapter (an escape hatch). When present it wins over the
|
|
41
41
|
* default `swapActiveSandbox` path. Session-scoped, like the swap it backs.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { CapabilityPack, EnablePackRequest, PackInstallation, RegisterCapabilityPackRequest, WorkspaceRegisteredPack } from "@opengeni/sdk";
|
|
2
|
-
import { type ClientOverride } from "../provider";
|
|
1
|
+
import type { CapabilityPack, EnablePackRequest, InstallPackRequest, PackInstallationPreview, PackInstallation, PackUninstallPreview, PreviewPackInstallationRequest, RegisterCapabilityPackRequest, UninstallPackRequest, UninstallPackResult, WorkspaceRegisteredPack } from "@opengeni/sdk";
|
|
2
|
+
import { type ClientOverride } from "../provider.js";
|
|
3
3
|
export type UsePacksOptions = ClientOverride & {
|
|
4
4
|
pollIntervalMs?: number | undefined;
|
|
5
5
|
enabled?: boolean | undefined;
|
|
@@ -16,7 +16,12 @@ export type UsePacksResult = {
|
|
|
16
16
|
refresh: () => Promise<void>;
|
|
17
17
|
/** Register (or replace) a workspace-scoped pack manifest. */
|
|
18
18
|
register: (manifest: RegisterCapabilityPackRequest) => Promise<WorkspaceRegisteredPack | null>;
|
|
19
|
+
/** @deprecated Use previewInstallation + install for component/Rig-aware Packs. */
|
|
19
20
|
enable: (packId: string, request?: EnablePackRequest) => Promise<PackInstallation | null>;
|
|
21
|
+
previewInstallation: (packId: string, request?: PreviewPackInstallationRequest) => Promise<PackInstallationPreview | null>;
|
|
22
|
+
install: (packId: string, request: InstallPackRequest) => Promise<PackInstallation | null>;
|
|
23
|
+
previewUninstall: (packId: string) => Promise<PackUninstallPreview | null>;
|
|
24
|
+
uninstall: (packId: string, request: UninstallPackRequest) => Promise<UninstallPackResult | null>;
|
|
20
25
|
/** Unregister a workspace-scoped pack (built-ins cannot be removed). */
|
|
21
26
|
remove: (packId: string) => Promise<boolean>;
|
|
22
27
|
mutating: boolean;
|
package/dist/hooks/use-rigs.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CreateRigRequest, ProposeRigChangeRequest, Rig, RigChange, RigVersion, UpdateRigRequest } from "@opengeni/sdk";
|
|
2
|
-
import { type ClientOverride } from "../provider";
|
|
2
|
+
import { type ClientOverride } from "../provider.js";
|
|
3
3
|
export type UseRigsOptions = ClientOverride & {
|
|
4
4
|
pollIntervalMs?: number | undefined;
|
|
5
5
|
enabled?: boolean | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { FsReadResponse, FsWriteResponse, OpenGeniRequestOptions, SessionEvent, WorkspaceCaptureManifest } from "@opengeni/sdk";
|
|
2
|
-
import { type ClientOverride } from "../provider";
|
|
1
|
+
import type { FsReadResponse, FsWriteResponse, OpenGeniRequestOptions, SessionCapabilities, SessionEvent, WorkspaceCaptureManifest } from "@opengeni/sdk";
|
|
2
|
+
import { type ClientOverride } from "../provider.js";
|
|
3
3
|
/** The git-status overlay a file row may carry (tints modified files in the tree). */
|
|
4
4
|
export type FileTreeStatus = "added" | "modified" | "deleted" | "renamed" | "untracked";
|
|
5
5
|
export type CapturedFileUnavailableReason = "not-captured" | "too-large" | "content-missing";
|
|
@@ -52,12 +52,14 @@ export type UseSandboxFilesOptions = ClientOverride & {
|
|
|
52
52
|
active?: boolean | undefined;
|
|
53
53
|
/** Repository roots advertised by capabilities, relative to the workspace. */
|
|
54
54
|
repoPaths?: readonly string[] | undefined;
|
|
55
|
-
/** The lease liveness
|
|
55
|
+
/** The lease liveness. `null` means capability negotiation has not produced
|
|
56
|
+
* an authoritative lifecycle value yet and therefore blocks live I/O. Omitting
|
|
57
|
+
* the option preserves the legacy direct-hook behavior. The structured FileSystem
|
|
56
58
|
* capability is advertised even on a COLD box, so the mount-time list can race
|
|
57
59
|
* the box: it lists before the box is warm, gets an empty/errored result, and
|
|
58
60
|
* (with no `fs.changed` event) never re-lists. Passing liveness re-lists when
|
|
59
61
|
* the box first becomes warm, so the tree populates as soon as the box is up. */
|
|
60
|
-
liveness?:
|
|
62
|
+
liveness?: SessionCapabilities["liveness"] | null | undefined;
|
|
61
63
|
/** The latest turn-end workspace capture (from `useWorkspaceCapture`). The tree
|
|
62
64
|
* paints immediately from this durable index, then a warm box reconciles live
|
|
63
65
|
* in place. If that live read fails, the capture remains a truthful read-only
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { GitFileDiff, SessionEvent, WorkspaceCaptureManifest } from "@opengeni/sdk";
|
|
2
|
-
import { type ClientOverride } from "../provider";
|
|
1
|
+
import type { GitFileDiff, SessionCapabilities, SessionEvent, WorkspaceCaptureManifest } from "@opengeni/sdk";
|
|
2
|
+
import { type ClientOverride } from "../provider.js";
|
|
3
3
|
export type UseSandboxGitOptions = ClientOverride & {
|
|
4
4
|
/** Live event log (usually `useSessionEvents().events`) — drives auto-refresh
|
|
5
5
|
* on `git.changed`. */
|
|
@@ -19,9 +19,10 @@ export type UseSandboxGitOptions = ClientOverride & {
|
|
|
19
19
|
enabled?: boolean | undefined;
|
|
20
20
|
/** Pause live reads/invalidation while preserving the last rendered result. */
|
|
21
21
|
active?: boolean | undefined;
|
|
22
|
-
/** Lease liveness
|
|
23
|
-
*
|
|
24
|
-
|
|
22
|
+
/** Lease liveness. `null` means capability negotiation is still pending and
|
|
23
|
+
* blocks live I/O. When not warm, the diff is served from the capture instead
|
|
24
|
+
* of a live `gitDiff` RPC. Omission preserves legacy direct-hook behavior. */
|
|
25
|
+
liveness?: SessionCapabilities["liveness"] | null | undefined;
|
|
25
26
|
/** The latest turn-end capture (from `useWorkspaceCapture`). Seeds the diff
|
|
26
27
|
* immediately; a warm box reconciles live and leaves this durable review
|
|
27
28
|
* surface in place if the live request is temporarily unavailable. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SessionEvent } from "@opengeni/sdk";
|
|
2
|
-
import { type ClientOverride } from "../provider";
|
|
2
|
+
import { type ClientOverride } from "../provider.js";
|
|
3
3
|
export type TerminalChunk = {
|
|
4
4
|
/** Stable key (the source event id) so the xterm writer tracks a written-cursor. */
|
|
5
5
|
id: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ScheduledTask } from "@opengeni/sdk";
|
|
2
|
-
import { type ClientOverride } from "../provider";
|
|
2
|
+
import { type ClientOverride } from "../provider.js";
|
|
3
3
|
export type UseScheduledTasksOptions = ClientOverride & {
|
|
4
4
|
limit?: number | undefined;
|
|
5
5
|
pollIntervalMs?: number | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type SessionCapabilities, type SessionEvent } from "@opengeni/sdk";
|
|
2
|
-
import { type ClientOverride } from "../provider";
|
|
2
|
+
import { type ClientOverride } from "../provider.js";
|
|
3
3
|
export type SessionCapabilitiesState = "idle" | "negotiating" | "ready" | "cold" | "on-demand" | "error";
|
|
4
4
|
export type UseSessionCapabilitiesOptions = ClientOverride & {
|
|
5
5
|
/**
|
|
@@ -59,7 +59,8 @@ export type UseSessionCapabilitiesResult = {
|
|
|
59
59
|
error: Error | null;
|
|
60
60
|
/**
|
|
61
61
|
* 409 from the desktop attach: the un-redacted (or shared) plane needs explicit
|
|
62
|
-
* acknowledgment before a viewer holder is granted.
|
|
62
|
+
* acknowledgment before a viewer holder is granted. The workbench uses this
|
|
63
|
+
* to complete acknowledgment automatically while Desktop is opening.
|
|
63
64
|
*/
|
|
64
65
|
acknowledgmentRequired: "unredacted" | "shared" | null;
|
|
65
66
|
/** 429 from the desktop attach: the per-session viewer cap is reached. */
|
|
@@ -77,7 +78,7 @@ export type UseSessionCapabilitiesResult = {
|
|
|
77
78
|
*
|
|
78
79
|
* Degradation is a value, never a crash: an unsupported surface comes back
|
|
79
80
|
* `available:false`/`transport:null` + a `reason`; the components render the
|
|
80
|
-
* reason-aware empty state. 409 (
|
|
81
|
-
* typed signals, not thrown.
|
|
81
|
+
* reason-aware empty state. 409 (acknowledgment) and 429 (viewer cap) are
|
|
82
|
+
* surfaced as typed signals, not thrown.
|
|
82
83
|
*/
|
|
83
84
|
export declare function useSessionCapabilities(sessionId: string | null | undefined, options?: UseSessionCapabilitiesOptions): UseSessionCapabilitiesResult;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SessionControlResponse, SessionEvent } from "@opengeni/sdk";
|
|
2
|
-
import { type EmbeddedSessionClientOverride } from "../session-context";
|
|
2
|
+
import { type EmbeddedSessionClientOverride } from "../session-context.js";
|
|
3
3
|
export type UseSessionControlOptions = EmbeddedSessionClientOverride;
|
|
4
4
|
export type UseSessionControlResult = {
|
|
5
5
|
pause: (reason?: string) => Promise<SessionControlResponse | null>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SessionEvent, SessionStatus, StreamConnectionState } from "@opengeni/sdk";
|
|
2
|
-
import { type EmbeddedSessionClientOverride } from "../session-context";
|
|
3
|
-
import type { TimelineItem } from "../timeline/types";
|
|
2
|
+
import { type EmbeddedSessionClientOverride } from "../session-context.js";
|
|
3
|
+
import type { TimelineItem } from "../timeline/types.js";
|
|
4
4
|
export type SessionEventsConnectionState = StreamConnectionState | "idle" | "ended" | "error";
|
|
5
5
|
export type UseSessionEventsOptions = EmbeddedSessionClientOverride & {
|
|
6
6
|
/** Resume after this sequence (exclusive). Nonzero keeps full replay/resume semantics. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SessionEvent, SessionLineageResponse } from "@opengeni/sdk";
|
|
2
|
-
import { type EmbeddedSessionLineageClientOverride } from "../session-context";
|
|
2
|
+
import { type EmbeddedSessionLineageClientOverride } from "../session-context.js";
|
|
3
3
|
export type UseSessionLineageOptions = EmbeddedSessionLineageClientOverride & {
|
|
4
4
|
events?: SessionEvent[] | undefined;
|
|
5
5
|
/** Refresh interval (ms). Off by default. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SessionEvent, SessionMcpApprovalPolicy, SessionMcpServerMetadata, UpdateSessionMcpApprovalPolicyResponse } from "@opengeni/sdk";
|
|
2
|
-
import { type EmbeddedSessionMcpApprovalPolicyClientOverride } from "../session-context";
|
|
3
|
-
import { type SessionEventFeedOptions } from "./internal";
|
|
2
|
+
import { type EmbeddedSessionMcpApprovalPolicyClientOverride } from "../session-context.js";
|
|
3
|
+
import { type SessionEventFeedOptions } from "./internal.js";
|
|
4
4
|
export declare function isSessionMcpApprovalPolicyEvent(event: Pick<SessionEvent, "type" | "payload">, serverId?: string): boolean;
|
|
5
5
|
export type UseSessionMcpApprovalPolicyOptions = EmbeddedSessionMcpApprovalPolicyClientOverride & SessionEventFeedOptions & {
|
|
6
6
|
/** Optional safety-net polling (ms). Off by default; policy events drive refreshes. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Session, SessionEvent } from "@opengeni/sdk";
|
|
2
|
-
import { type EmbeddedSessionReadClientOverride } from "../session-context";
|
|
3
|
-
import { type SessionEventFeedOptions } from "./internal";
|
|
2
|
+
import { type EmbeddedSessionReadClientOverride } from "../session-context.js";
|
|
3
|
+
import { type SessionEventFeedOptions } from "./internal.js";
|
|
4
4
|
export type UseSessionOptions = EmbeddedSessionReadClientOverride & SessionEventFeedOptions & {
|
|
5
5
|
/** Re-fetch on an interval (ms). Off by default — pair with `useSessionEvents` for live status. */
|
|
6
6
|
pollIntervalMs?: number | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { KeyboardEvent } from "react";
|
|
2
|
-
import type { CommandContext, SlashCommand } from "../commands/types";
|
|
2
|
+
import type { CommandContext, SlashCommand } from "../commands/types.js";
|
|
3
3
|
/**
|
|
4
4
|
* Context the composer supplies for command execution and visibility. The
|
|
5
5
|
* composer owns the UI affordances (notice/openHelp/clearView/confirm), so they
|
|
@@ -6,7 +6,7 @@ export type UseTerminalStreamOptions = {
|
|
|
6
6
|
* The stream connects ONLY when `transport === "pty-ws"` and `url` is set; on a
|
|
7
7
|
* cold box (`transport === "sse-events"` / no url) it stays idle and the caller
|
|
8
8
|
* falls back to the Channel-A read-only firehose. */
|
|
9
|
-
capability: Pick<TerminalCapability, "transport" | "url" | "token"> | null;
|
|
9
|
+
capability: Pick<TerminalCapability, "transport" | "url" | "token" | "expiresAt"> | null;
|
|
10
10
|
/** Called for each OUTPUT payload from ttyd (write verbatim into xterm). */
|
|
11
11
|
onOutput?: ((data: string) => void) | undefined;
|
|
12
12
|
/** Called when ttyd sends a SET_WINDOW_TITLE frame. */
|
|
@@ -19,13 +19,19 @@ export type UseTerminalStreamResult = {
|
|
|
19
19
|
/** True once the ttyd socket is open (and the auth frame has been sent). */
|
|
20
20
|
connected: boolean;
|
|
21
21
|
status: TerminalStreamStatus;
|
|
22
|
-
/** Pipe a keystroke/paste to
|
|
22
|
+
/** Pipe a keystroke/paste to PTY stdin. Input during CONNECTING is bounded and
|
|
23
|
+
* replayed only after ttyd authentication succeeds. */
|
|
23
24
|
write: (data: string) => void;
|
|
24
25
|
/** Tell ttyd the PTY window changed size (on xterm fit/resize). */
|
|
25
26
|
resize: (cols: number, rows: number) => void;
|
|
26
27
|
/** Tear the socket down (the effect also tears down on unmount / url change). */
|
|
27
28
|
disconnect: () => void;
|
|
28
29
|
};
|
|
30
|
+
export declare const MAX_PENDING_TERMINAL_INPUT_CODE_UNITS: number;
|
|
31
|
+
/** A bearer must remain valid long enough to finish a new websocket handshake.
|
|
32
|
+
* Existing open sockets are unaffected: this is evaluated only when the
|
|
33
|
+
* credential identity changes and the connection effect attempts a new socket. */
|
|
34
|
+
export declare function terminalStreamCredentialUsable(capability: Pick<TerminalCapability, "transport" | "url" | "expiresAt"> | null | undefined, nowMs?: number): boolean;
|
|
29
35
|
/**
|
|
30
36
|
* Drive a ttyd PTY-over-websocket connection from a `pty-ws` Terminal capability,
|
|
31
37
|
* symmetric with `use-desktop-stream` (the noVNC-over-tunnel hook). The scoped
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ComposerDraft, EffectiveSessionControl, McpPersonalConnectionSummary, SessionEvent, SessionQueueSnapshot, SessionPendingInputPreview, SessionTurn } from "@opengeni/sdk";
|
|
2
|
-
import { type EmbeddedSessionClientOverride } from "../session-context";
|
|
3
|
-
import { type SessionEventFeedOptions } from "./internal";
|
|
2
|
+
import { type EmbeddedSessionClientOverride } from "../session-context.js";
|
|
3
|
+
import { type SessionEventFeedOptions } from "./internal.js";
|
|
4
4
|
/** Events that can change the authoritative prompt queue or effective control. */
|
|
5
5
|
export declare function isTurnQueueEvent(event: Pick<SessionEvent, "type">): boolean;
|
|
6
6
|
export type QueueMutationKind = "move" | "edit" | "steer" | "delete";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { VideoArtifactPlaybackLoader } from "../timeline/index.js";
|
|
2
|
+
import { type ClientOverride } from "../session-context.js";
|
|
3
|
+
/**
|
|
4
|
+
* Bind the current public SDK client/workspace to MessageTimeline's renewable
|
|
5
|
+
* video-source boundary. Proxy hosts may omit the method until they support
|
|
6
|
+
* retained video; the failure remains local to the player instead of loading
|
|
7
|
+
* any video bytes through React.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useVideoArtifactPlaybackLoader(options?: ClientOverride): VideoArtifactPlaybackLoader;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ClientVoiceInputConfig, type OpenGeniClient } from "@opengeni/sdk";
|
|
2
|
-
import { type VoiceRecordingStore } from "../voice-recording-store";
|
|
2
|
+
import { type VoiceRecordingStore } from "../voice-recording-store.js";
|
|
3
3
|
export type VoiceInputStatus = "idle" | "requesting-permission" | "recording" | "saving" | "transcribing" | "retrying" | "recovered" | "transcript-ready" | "error";
|
|
4
4
|
export type UseVoiceInputOptions = {
|
|
5
5
|
client: VoiceInputClient | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SessionEvent, WorkspaceCaptureDegradedReason, WorkspaceCaptureManifest } from "@opengeni/sdk";
|
|
2
|
-
import { type ClientOverride } from "../provider";
|
|
2
|
+
import { type ClientOverride } from "../provider.js";
|
|
3
3
|
export type UseWorkspaceCaptureOptions = ClientOverride & {
|
|
4
4
|
/** Live event log (usually `useSessionEvents().events`) — a
|
|
5
5
|
* `workspace.revision.captured` for a NEWER revision refreshes the manifest. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Session } from "@opengeni/sdk";
|
|
2
|
-
import { type ClientOverride } from "../provider";
|
|
2
|
+
import { type ClientOverride } from "../provider.js";
|
|
3
3
|
export type UseWorkspaceSessionsOptions = ClientOverride & {
|
|
4
4
|
limit?: number | undefined;
|
|
5
5
|
parentSessionId?: string | null | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CreateWorkspaceRequest, UpdateWorkspaceRequest, Workspace } from "@opengeni/sdk";
|
|
2
|
-
import { type ClientOverride } from "../provider";
|
|
2
|
+
import { type ClientOverride } from "../provider.js";
|
|
3
3
|
export type UseWorkspacesOptions = Pick<ClientOverride, "client"> & {
|
|
4
4
|
pollIntervalMs?: number | undefined;
|
|
5
5
|
enabled?: boolean | undefined;
|