@opengeni/react 0.26.0 → 0.26.2
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 +16 -4
- package/dist/{chunk-F4CFWKVI.js → chunk-4F2YLLHP.js} +2 -2
- package/dist/{chunk-YU5PGUK7.js → chunk-BC6RKIHS.js} +2 -2
- package/dist/{chunk-HIWPQYWI.js → chunk-HQFPO7VX.js} +78 -28
- package/dist/chunk-HQFPO7VX.js.map +1 -0
- package/dist/{chunk-MP6237JB.js → chunk-NBYNFI5T.js} +10 -7
- package/dist/chunk-NBYNFI5T.js.map +1 -0
- package/dist/{chunk-TMH6HZWF.js → chunk-XVVQP7A4.js} +2 -2
- package/dist/{composer-DoC4veX1.d.ts → composer-BMzimGTO.d.ts} +3 -3
- package/dist/composer.d.ts +4 -4
- package/dist/composer.js +3 -3
- package/dist/index.d.ts +14 -14
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/dist/machines.d.ts +1 -1
- package/dist/machines.js +2 -2
- package/dist/{session-Du_FsrZ1.d.ts → session-LsampPc6.d.ts} +7 -7
- package/dist/{session-context-rgrfElMl.d.ts → session-context-CAjlaeZb.d.ts} +31 -5
- package/dist/{session-ui-BqQDH7YV.d.ts → session-ui-BPOV-tuY.d.ts} +2 -2
- package/dist/session-ui.d.ts +4 -4
- package/dist/session.d.ts +5 -5
- package/dist/session.js +3 -3
- package/dist/{use-composer-BnEzheSk.d.ts → use-composer-ClHy1rkL.d.ts} +1 -1
- package/dist/{use-file-attachments-C0kpHrs9.d.ts → use-file-attachments-BmT8WtqO.d.ts} +2 -2
- package/dist/{use-turn-queue-3rkJwjFv.d.ts → use-turn-queue-aDnQvzVz.d.ts} +2 -2
- package/package.json +2 -2
- package/src/client.ts +23 -8
- package/src/components/sandbox-workspace.tsx +2 -0
- package/src/hooks/internal.ts +2 -2
- package/src/hooks/use-file-attachments.ts +6 -3
- package/src/hooks/use-goal.ts +3 -3
- package/src/hooks/use-session-lineage.ts +6 -3
- package/src/hooks/use-session.ts +3 -3
- package/src/index.ts +5 -0
- package/src/session-context.ts +138 -40
- package/src/session.ts +8 -0
- package/dist/chunk-HIWPQYWI.js.map +0 -1
- package/dist/chunk-MP6237JB.js.map +0 -1
- /package/dist/{chunk-F4CFWKVI.js.map → chunk-4F2YLLHP.js.map} +0 -0
- /package/dist/{chunk-YU5PGUK7.js.map → chunk-BC6RKIHS.js.map} +0 -0
- /package/dist/{chunk-TMH6HZWF.js.map → chunk-XVVQP7A4.js.map} +0 -0
package/dist/machines.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MachineState, MetricSample, MachineView, MachineKind, MachinesResponse } from '@opengeni/sdk';
|
|
2
2
|
export { MachineKind, MachineMetricsSeriesResponse, MachineState, MachineView, MachinesResponse, MetricSample } from '@opengeni/sdk';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
-
import { C as ClientOverride } from './session-context-
|
|
4
|
+
import { C as ClientOverride } from './session-context-CAjlaeZb.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* The three connection-status pill values the UI surfaces across the dashboard,
|
package/dist/machines.js
CHANGED
|
@@ -24,9 +24,9 @@ import {
|
|
|
24
24
|
healthPulses,
|
|
25
25
|
pointsFor,
|
|
26
26
|
useMachines
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-BC6RKIHS.js";
|
|
28
28
|
import "./chunk-TK7G6XLT.js";
|
|
29
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-HQFPO7VX.js";
|
|
30
30
|
import "./chunk-M7X4JZOD.js";
|
|
31
31
|
export {
|
|
32
32
|
CONNECTION_STATUS_META,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { k as EmbeddedSessionReadClientOverride, a as EmbeddedSessionClientOverride, l as EmbeddedGoalClientOverride, m as EmbeddedSessionMcpApprovalPolicyClientOverride, n as EmbeddedSessionLineageClientOverride, o as EmbeddedHumanInputClientOverride } from './session-context-CAjlaeZb.js';
|
|
2
2
|
import { Session, SessionEvent, StreamConnectionState, SessionStatus, SessionGoal, SessionControlResponse, SessionMcpServerMetadata, SessionMcpApprovalPolicy, UpdateSessionMcpApprovalPolicyResponse, SessionLineageResponse, HumanInputQuestion, SessionHumanInputRequest, SubmitHumanInputResponseRequest } from '@opengeni/sdk';
|
|
3
|
-
import { S as SessionEventFeedOptions } from './use-composer-
|
|
4
|
-
import { e as TimelineItem, d as TimelineGroup } from './use-turn-queue-
|
|
5
|
-
import './use-file-attachments-
|
|
3
|
+
import { S as SessionEventFeedOptions } from './use-composer-ClHy1rkL.js';
|
|
4
|
+
import { e as TimelineItem, d as TimelineGroup } from './use-turn-queue-aDnQvzVz.js';
|
|
5
|
+
import './use-file-attachments-BmT8WtqO.js';
|
|
6
6
|
|
|
7
|
-
type UseSessionOptions =
|
|
7
|
+
type UseSessionOptions = EmbeddedSessionReadClientOverride & SessionEventFeedOptions & {
|
|
8
8
|
/** Re-fetch on an interval (ms). Off by default — pair with `useSessionEvents` for live status. */
|
|
9
9
|
pollIntervalMs?: number | undefined;
|
|
10
10
|
};
|
|
@@ -91,7 +91,7 @@ declare function boundBrowserSessionEventWindow(events: readonly SessionEvent[],
|
|
|
91
91
|
|
|
92
92
|
/** Event types that change the session goal (set/updated/completed/paused/...). */
|
|
93
93
|
declare function isGoalEvent(event: Pick<SessionEvent, "type">): boolean;
|
|
94
|
-
type UseGoalOptions =
|
|
94
|
+
type UseGoalOptions = EmbeddedGoalClientOverride & SessionEventFeedOptions & {
|
|
95
95
|
/** Optional safety-net polling (ms). Off by default — event refreshes drive updates. */
|
|
96
96
|
pollIntervalMs?: number | undefined;
|
|
97
97
|
};
|
|
@@ -169,7 +169,7 @@ type UseSessionMcpApprovalPolicyResult = {
|
|
|
169
169
|
*/
|
|
170
170
|
declare function useSessionMcpApprovalPolicy(sessionId: string | null | undefined, serverId: string | null | undefined, options?: UseSessionMcpApprovalPolicyOptions): UseSessionMcpApprovalPolicyResult;
|
|
171
171
|
|
|
172
|
-
type UseSessionLineageOptions =
|
|
172
|
+
type UseSessionLineageOptions = EmbeddedSessionLineageClientOverride & {
|
|
173
173
|
events?: SessionEvent[] | undefined;
|
|
174
174
|
/** Refresh interval (ms). Off by default. */
|
|
175
175
|
pollIntervalMs?: number | undefined;
|
|
@@ -18,10 +18,20 @@ type SessionClientLike = Pick<OpenGeniClient, "getClientConfig" | "getSession" |
|
|
|
18
18
|
type EmbeddedSessionClientLike = Pick<OpenGeniClient, "getSession" | "listEvents" | "streamEvents" | "getComposerDraft" | "saveComposerDraft" | "sendMessage" | "steerMessage" | "getQueue" | "moveQueueItem" | "editQueueItem" | "steerQueueItem" | "deleteQueueItem" | "pauseSession" | "resumeSession" | "sendApprovalDecision"> & {
|
|
19
19
|
setWorkspaceInferenceState?: OpenGeniClient["setWorkspaceInferenceState"] | undefined;
|
|
20
20
|
};
|
|
21
|
-
/**
|
|
22
|
-
type
|
|
23
|
-
/**
|
|
24
|
-
type
|
|
21
|
+
/** Event-read surface shared by hooks that optionally tail a session. */
|
|
22
|
+
type EmbeddedSessionEventClientLike = Pick<OpenGeniClient, "getSession" | "streamEvents">;
|
|
23
|
+
/** Exact client surface required by {@link useSession}. */
|
|
24
|
+
type EmbeddedSessionReadClientLike = EmbeddedSessionEventClientLike & Pick<OpenGeniClient, "getSession" | "updateSession">;
|
|
25
|
+
/** Exact client surface required by {@link useGoal}. */
|
|
26
|
+
type EmbeddedGoalClientLike = EmbeddedSessionEventClientLike & Pick<OpenGeniClient, "getGoal" | "updateGoal" | "deleteGoal">;
|
|
27
|
+
/** Exact client surface required by {@link useSessionLineage}. */
|
|
28
|
+
type EmbeddedSessionLineageClientLike = EmbeddedSessionEventClientLike & Pick<OpenGeniClient, "getSessionLineage">;
|
|
29
|
+
/** Exact client surface required by {@link useFileAttachments}. */
|
|
30
|
+
type EmbeddedFileAttachmentClientLike = Pick<OpenGeniClient, "uploadFile">;
|
|
31
|
+
/** Exact client surface required by structured human-input hooks. */
|
|
32
|
+
type EmbeddedHumanInputSessionClientLike = EmbeddedSessionEventClientLike & Pick<OpenGeniClient, "listHumanInputRequests" | "submitHumanInputResponse">;
|
|
33
|
+
/** Exact client surface required by MCP approval-policy hooks. */
|
|
34
|
+
type EmbeddedSessionMcpApprovalPolicyClientLike = EmbeddedSessionEventClientLike & Pick<OpenGeniClient, "updateSessionMcpApprovalPolicy">;
|
|
25
35
|
|
|
26
36
|
type OpenGeniContextValue = {
|
|
27
37
|
client: SessionClientLike;
|
|
@@ -47,6 +57,22 @@ type EmbeddedSessionMcpApprovalPolicyClientOverride = {
|
|
|
47
57
|
client?: EmbeddedSessionMcpApprovalPolicyClientLike | undefined;
|
|
48
58
|
workspaceId?: string | undefined;
|
|
49
59
|
};
|
|
60
|
+
type EmbeddedSessionReadClientOverride = {
|
|
61
|
+
client?: EmbeddedSessionReadClientLike | undefined;
|
|
62
|
+
workspaceId?: string | undefined;
|
|
63
|
+
};
|
|
64
|
+
type EmbeddedGoalClientOverride = {
|
|
65
|
+
client?: EmbeddedGoalClientLike | undefined;
|
|
66
|
+
workspaceId?: string | undefined;
|
|
67
|
+
};
|
|
68
|
+
type EmbeddedSessionLineageClientOverride = {
|
|
69
|
+
client?: EmbeddedSessionLineageClientLike | undefined;
|
|
70
|
+
workspaceId?: string | undefined;
|
|
71
|
+
};
|
|
72
|
+
type EmbeddedFileAttachmentClientOverride = {
|
|
73
|
+
client?: EmbeddedFileAttachmentClientLike | undefined;
|
|
74
|
+
workspaceId?: string | undefined;
|
|
75
|
+
};
|
|
50
76
|
/** Resolve client + workspace from explicit overrides or the provider. */
|
|
51
77
|
declare function useOpenGeni(override?: ClientOverride): OpenGeniContextValue;
|
|
52
78
|
/**
|
|
@@ -55,4 +81,4 @@ declare function useOpenGeni(override?: ClientOverride): OpenGeniContextValue;
|
|
|
55
81
|
*/
|
|
56
82
|
declare function useOpenGeniClient(override?: Pick<ClientOverride, "client">): SessionClientLike;
|
|
57
83
|
|
|
58
|
-
export { type ClientOverride as C, type
|
|
84
|
+
export { type ClientOverride as C, type EmbeddedFileAttachmentClientOverride as E, type OpenGeniContextValue as O, type SessionClientLike as S, type EmbeddedSessionClientOverride as a, type EmbeddedFileAttachmentClientLike as b, type EmbeddedGoalClientLike as c, type EmbeddedHumanInputSessionClientLike as d, type EmbeddedSessionClientLike as e, type EmbeddedSessionEventClientLike as f, type EmbeddedSessionLineageClientLike as g, type EmbeddedSessionMcpApprovalPolicyClientLike as h, type EmbeddedSessionReadClientLike as i, useOpenGeniClient as j, type EmbeddedSessionReadClientOverride as k, type EmbeddedGoalClientOverride as l, type EmbeddedSessionMcpApprovalPolicyClientOverride as m, type EmbeddedSessionLineageClientOverride as n, type EmbeddedHumanInputClientOverride as o, useOpenGeni as u };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { SessionHumanInputRequest, SubmitHumanInputResponseRequest, HumanInputQuestion, HumanInputAnswer, SessionEvent, SessionStatus } from '@opengeni/sdk';
|
|
3
3
|
import { ReactNode, ComponentType } from 'react';
|
|
4
|
-
import { h as UseTurnQueueResult, f as ToolCallItem, e as TimelineItem, a as AgentMessageItem, i as UserMessageItem, b as AuthNeededItem } from './use-turn-queue-
|
|
5
|
-
import { C as ComposerState } from './use-composer-
|
|
4
|
+
import { h as UseTurnQueueResult, f as ToolCallItem, e as TimelineItem, a as AgentMessageItem, i as UserMessageItem, b as AuthNeededItem } from './use-turn-queue-aDnQvzVz.js';
|
|
5
|
+
import { C as ComposerState } from './use-composer-ClHy1rkL.js';
|
|
6
6
|
|
|
7
7
|
/** The sole human prompt queue: compact above Goal, Agents, and composer. */
|
|
8
8
|
type QueueSurfaceCommonProps = {
|
package/dist/session-ui.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { H as HumanInputAnswerDraft, a as HumanInputForm, b as HumanInputFormMessages, d as HumanInputFormProps, M as MessageTimeline, e as MessageTimelineProps, Q as QueueSurface, f as QueueSurfaceProps, g as TimelineRow } from './session-ui-
|
|
1
|
+
export { H as HumanInputAnswerDraft, a as HumanInputForm, b as HumanInputFormMessages, d as HumanInputFormProps, M as MessageTimeline, e as MessageTimelineProps, Q as QueueSurface, f as QueueSurfaceProps, g as TimelineRow } from './session-ui-BPOV-tuY.js';
|
|
2
2
|
import 'react/jsx-runtime';
|
|
3
3
|
import '@opengeni/sdk';
|
|
4
4
|
import 'react';
|
|
5
|
-
import './use-turn-queue-
|
|
6
|
-
import './session-context-
|
|
7
|
-
import './use-composer-
|
|
5
|
+
import './use-turn-queue-aDnQvzVz.js';
|
|
6
|
+
import './session-context-CAjlaeZb.js';
|
|
7
|
+
import './use-composer-ClHy1rkL.js';
|
package/dist/session.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { P as PendingApproval, a as PendingHumanInputRequest, f as SessionEventsConnectionState, U as UseGoalOptions, g as UseGoalResult, h as UseHumanInputRequestsOptions, i as UseHumanInputRequestsResult, j as UseSessionControlOptions, k as UseSessionControlResult, l as UseSessionEventsOptions, m as UseSessionEventsResult, n as UseSessionLineageOptions, o as UseSessionLineageResult, p as UseSessionMcpApprovalPolicyOptions, q as UseSessionMcpApprovalPolicyResult, r as UseSessionOptions, s as UseSessionResult, t as approvalsFromRequiresAction, v as buildTimeline, w as creditExhaustedFromEvents, x as extractSessionRef, y as groupTimeline, z as humanInputRequestFromEvent, A as isGoalEvent, C as isHumanInputEvent, D as isLineageRefreshEvent, E as isSessionMcpApprovalPolicyEvent, F as isTitleEvent, G as projectPendingApprovals, H as projectPendingHumanInputRequests, I as sessionStatusFromEvents, J as toolDisplayName, K as useGoal, L as useHumanInputRequests, M as useSession, N as useSessionControl, O as useSessionEvents, Q as useSessionLineage, R as useSessionMcpApprovalPolicy } from './session-
|
|
3
|
-
export { a as ComposerSendExtras, C as ComposerState, F as FILE_ONLY_MESSAGE_TEXT, U as UseComposerOptions, c as composeSendInput, s as shouldSteerOnKey, b as shouldSubmitOnKey, u as useComposer } from './use-composer-
|
|
4
|
-
export { F as FileAttachment, a as UseFileAttachmentsOptions, U as UseFileAttachmentsResult, u as useFileAttachments } from './use-file-attachments-
|
|
5
|
-
export { A as ActivityItem, a as AgentMessageItem, b as AuthNeededItem, G as GoalItem, M as MemoryItem, N as NoticeItem, Q as QueueMutationKind, R as ReasoningItem, S as SandboxItem, c as SessionStatusItem, d as TimelineGroup, e as TimelineItem, f as ToolCallItem, g as TurnEndItem, T as TurnOutcome, U as UseTurnQueueOptions, h as UseTurnQueueResult, i as UserMessageItem, k as WorkerCompletionItem, W as WorkerItem, j as isTurnQueueEvent, u as useTurnQueue } from './use-turn-queue-
|
|
1
|
+
export { a as ClientOverride, b as FileAttachmentClientLike, E as FileAttachmentClientOverride, c as GoalClientLike, l as GoalClientOverride, o as HumanInputClientOverride, d as HumanInputSessionClientLike, e as SessionClientLike, g as SessionLineageClientLike, n as SessionLineageClientOverride, h as SessionMcpApprovalPolicyClientLike, m as SessionMcpApprovalPolicyClientOverride, i as SessionReadClientLike, k as SessionReadClientOverride } from './session-context-CAjlaeZb.js';
|
|
2
|
+
export { P as PendingApproval, a as PendingHumanInputRequest, f as SessionEventsConnectionState, U as UseGoalOptions, g as UseGoalResult, h as UseHumanInputRequestsOptions, i as UseHumanInputRequestsResult, j as UseSessionControlOptions, k as UseSessionControlResult, l as UseSessionEventsOptions, m as UseSessionEventsResult, n as UseSessionLineageOptions, o as UseSessionLineageResult, p as UseSessionMcpApprovalPolicyOptions, q as UseSessionMcpApprovalPolicyResult, r as UseSessionOptions, s as UseSessionResult, t as approvalsFromRequiresAction, v as buildTimeline, w as creditExhaustedFromEvents, x as extractSessionRef, y as groupTimeline, z as humanInputRequestFromEvent, A as isGoalEvent, C as isHumanInputEvent, D as isLineageRefreshEvent, E as isSessionMcpApprovalPolicyEvent, F as isTitleEvent, G as projectPendingApprovals, H as projectPendingHumanInputRequests, I as sessionStatusFromEvents, J as toolDisplayName, K as useGoal, L as useHumanInputRequests, M as useSession, N as useSessionControl, O as useSessionEvents, Q as useSessionLineage, R as useSessionMcpApprovalPolicy } from './session-LsampPc6.js';
|
|
3
|
+
export { a as ComposerSendExtras, C as ComposerState, F as FILE_ONLY_MESSAGE_TEXT, U as UseComposerOptions, c as composeSendInput, s as shouldSteerOnKey, b as shouldSubmitOnKey, u as useComposer } from './use-composer-ClHy1rkL.js';
|
|
4
|
+
export { F as FileAttachment, a as UseFileAttachmentsOptions, U as UseFileAttachmentsResult, u as useFileAttachments } from './use-file-attachments-BmT8WtqO.js';
|
|
5
|
+
export { A as ActivityItem, a as AgentMessageItem, b as AuthNeededItem, G as GoalItem, M as MemoryItem, N as NoticeItem, Q as QueueMutationKind, R as ReasoningItem, S as SandboxItem, c as SessionStatusItem, d as TimelineGroup, e as TimelineItem, f as ToolCallItem, g as TurnEndItem, T as TurnOutcome, U as UseTurnQueueOptions, h as UseTurnQueueResult, i as UserMessageItem, k as WorkerCompletionItem, W as WorkerItem, j as isTurnQueueEvent, u as useTurnQueue } from './use-turn-queue-aDnQvzVz.js';
|
|
6
6
|
import '@opengeni/sdk';
|
package/dist/session.js
CHANGED
|
@@ -18,15 +18,15 @@ import {
|
|
|
18
18
|
useSessionLineage,
|
|
19
19
|
useSessionMcpApprovalPolicy,
|
|
20
20
|
useTurnQueue
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-NBYNFI5T.js";
|
|
22
22
|
import {
|
|
23
23
|
FILE_ONLY_MESSAGE_TEXT,
|
|
24
24
|
composeSendInput,
|
|
25
25
|
shouldSteerOnKey,
|
|
26
26
|
shouldSubmitOnKey,
|
|
27
27
|
useComposer
|
|
28
|
-
} from "./chunk-
|
|
29
|
-
import "./chunk-
|
|
28
|
+
} from "./chunk-4F2YLLHP.js";
|
|
29
|
+
import "./chunk-HQFPO7VX.js";
|
|
30
30
|
import {
|
|
31
31
|
buildTimeline,
|
|
32
32
|
creditExhaustedFromEvents,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SessionEvent, EffectiveControlResumeOption, ComposerDraft, ResourceRef, SendMessageInput, EffectiveSessionControl } from '@opengeni/sdk';
|
|
2
|
-
import {
|
|
2
|
+
import { a as EmbeddedSessionClientOverride } from './session-context-CAjlaeZb.js';
|
|
3
3
|
|
|
4
4
|
type SessionEventFeedOptions = {
|
|
5
5
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FileAsset, FileResourceRef } from '@opengeni/sdk';
|
|
2
|
-
import {
|
|
2
|
+
import { E as EmbeddedFileAttachmentClientOverride } from './session-context-CAjlaeZb.js';
|
|
3
3
|
|
|
4
|
-
type UseFileAttachmentsOptions =
|
|
4
|
+
type UseFileAttachmentsOptions = EmbeddedFileAttachmentClientOverride & {
|
|
5
5
|
/**
|
|
6
6
|
* Only files matching this predicate are accepted by {@link
|
|
7
7
|
* UseFileAttachmentsResult.addFromPaste} (the clipboard path). Defaults to
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ToolAuthNeededPayload, ResourceRef, ToolRef, SessionStatus, SessionQueueSnapshot, SessionTurn, EffectiveSessionControl, ComposerDraft, SessionEvent } from '@opengeni/sdk';
|
|
2
|
-
import {
|
|
3
|
-
import { S as SessionEventFeedOptions } from './use-composer-
|
|
2
|
+
import { a as EmbeddedSessionClientOverride } from './session-context-CAjlaeZb.js';
|
|
3
|
+
import { S as SessionEventFeedOptions } from './use-composer-ClHy1rkL.js';
|
|
4
4
|
|
|
5
5
|
type UserMessageItem = {
|
|
6
6
|
kind: "user-message";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeni/react",
|
|
3
|
-
"version": "0.26.
|
|
3
|
+
"version": "0.26.2",
|
|
4
4
|
"description": "React hooks and styled components for OpenGeni: live session streaming, chat composer, message timeline, session status, and fleet views — token-themed (CSS variables), dark-first, built on Tailwind v4 + Radix + Motion.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"@dnd-kit/utilities": "3.2.2",
|
|
67
67
|
"@fontsource-variable/noto-sans-arabic": "5.2.10",
|
|
68
68
|
"@fontsource-variable/noto-sans-jp": "5.2.10",
|
|
69
|
-
"@opengeni/sdk": "^0.26.
|
|
69
|
+
"@opengeni/sdk": "^0.26.1",
|
|
70
70
|
"clsx": "^2.1.1",
|
|
71
71
|
"lucide-react": "^1.8.0",
|
|
72
72
|
"motion": "^12.0.0",
|
package/src/client.ts
CHANGED
|
@@ -145,13 +145,28 @@ export type EmbeddedSessionClientLike = Pick<
|
|
|
145
145
|
setWorkspaceInferenceState?: OpenGeniClient["setWorkspaceInferenceState"] | undefined;
|
|
146
146
|
};
|
|
147
147
|
|
|
148
|
-
/**
|
|
149
|
-
export type
|
|
150
|
-
Pick<
|
|
151
|
-
OpenGeniClient,
|
|
152
|
-
"listHumanInputRequests" | "getHumanInputRequest" | "submitHumanInputResponse"
|
|
153
|
-
>;
|
|
148
|
+
/** Event-read surface shared by hooks that optionally tail a session. */
|
|
149
|
+
export type EmbeddedSessionEventClientLike = Pick<OpenGeniClient, "getSession" | "streamEvents">;
|
|
154
150
|
|
|
155
|
-
/**
|
|
156
|
-
export type
|
|
151
|
+
/** Exact client surface required by {@link useSession}. */
|
|
152
|
+
export type EmbeddedSessionReadClientLike = EmbeddedSessionEventClientLike &
|
|
153
|
+
Pick<OpenGeniClient, "getSession" | "updateSession">;
|
|
154
|
+
|
|
155
|
+
/** Exact client surface required by {@link useGoal}. */
|
|
156
|
+
export type EmbeddedGoalClientLike = EmbeddedSessionEventClientLike &
|
|
157
|
+
Pick<OpenGeniClient, "getGoal" | "updateGoal" | "deleteGoal">;
|
|
158
|
+
|
|
159
|
+
/** Exact client surface required by {@link useSessionLineage}. */
|
|
160
|
+
export type EmbeddedSessionLineageClientLike = EmbeddedSessionEventClientLike &
|
|
161
|
+
Pick<OpenGeniClient, "getSessionLineage">;
|
|
162
|
+
|
|
163
|
+
/** Exact client surface required by {@link useFileAttachments}. */
|
|
164
|
+
export type EmbeddedFileAttachmentClientLike = Pick<OpenGeniClient, "uploadFile">;
|
|
165
|
+
|
|
166
|
+
/** Exact client surface required by structured human-input hooks. */
|
|
167
|
+
export type EmbeddedHumanInputSessionClientLike = EmbeddedSessionEventClientLike &
|
|
168
|
+
Pick<OpenGeniClient, "listHumanInputRequests" | "submitHumanInputResponse">;
|
|
169
|
+
|
|
170
|
+
/** Exact client surface required by MCP approval-policy hooks. */
|
|
171
|
+
export type EmbeddedSessionMcpApprovalPolicyClientLike = EmbeddedSessionEventClientLike &
|
|
157
172
|
Pick<OpenGeniClient, "updateSessionMcpApprovalPolicy">;
|
|
@@ -90,6 +90,8 @@ function captureDegradedMessage(reason: string): string {
|
|
|
90
90
|
return "Workspace capture is incomplete because repository discovery timed out. Live files remain authoritative.";
|
|
91
91
|
case "repository_discovery_result_limit_exceeded":
|
|
92
92
|
return "Workspace capture is incomplete because the repository limit was exceeded. Live files remain authoritative.";
|
|
93
|
+
case "repository_read_unavailable":
|
|
94
|
+
return "Workspace capture is incomplete because repository changes could not be read. Live files remain authoritative.";
|
|
93
95
|
default:
|
|
94
96
|
return "Workspace capture is incomplete because repository discovery failed. Live files remain authoritative.";
|
|
95
97
|
}
|
package/src/hooks/internal.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SessionEvent } from "@opengeni/sdk";
|
|
2
2
|
import { useCallback, useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
3
|
-
import type {
|
|
3
|
+
import type { EmbeddedSessionEventClientLike } from "../client";
|
|
4
4
|
|
|
5
5
|
export type AsyncListState<T> = {
|
|
6
6
|
data: T | null;
|
|
@@ -215,7 +215,7 @@ export type SessionEventFeedOptions = {
|
|
|
215
215
|
* `events` log or tails the stream directly (reconnect handled by the SDK).
|
|
216
216
|
*/
|
|
217
217
|
export function useSessionEventTrigger(
|
|
218
|
-
client:
|
|
218
|
+
client: EmbeddedSessionEventClientLike,
|
|
219
219
|
workspaceId: string,
|
|
220
220
|
sessionId: string | null | undefined,
|
|
221
221
|
match: (event: SessionEvent) => boolean,
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import type { FileAsset, FileResourceRef } from "@opengeni/sdk";
|
|
2
2
|
import { useCallback, useRef, useState } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
useEmbeddedFileAttachments,
|
|
5
|
+
type EmbeddedFileAttachmentClientOverride,
|
|
6
|
+
} from "../session-context";
|
|
4
7
|
|
|
5
|
-
export type UseFileAttachmentsOptions =
|
|
8
|
+
export type UseFileAttachmentsOptions = EmbeddedFileAttachmentClientOverride & {
|
|
6
9
|
/**
|
|
7
10
|
* Only files matching this predicate are accepted by {@link
|
|
8
11
|
* UseFileAttachmentsResult.addFromPaste} (the clipboard path). Defaults to
|
|
@@ -78,7 +81,7 @@ const isImage = (file: File): boolean => file.type.startsWith("image/");
|
|
|
78
81
|
export function useFileAttachments(
|
|
79
82
|
options: UseFileAttachmentsOptions = {},
|
|
80
83
|
): UseFileAttachmentsResult {
|
|
81
|
-
const { client, workspaceId } =
|
|
84
|
+
const { client, workspaceId } = useEmbeddedFileAttachments(options);
|
|
82
85
|
const pasteFilter = options.pasteFilter ?? isImage;
|
|
83
86
|
const [attachments, setAttachments] = useState<FileAttachment[]>([]);
|
|
84
87
|
// Keep the source File per attachment id so a failed upload can be retried
|
package/src/hooks/use-goal.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { OpenGeniApiError, type SessionEvent, type SessionGoal } from "@opengeni/sdk";
|
|
2
2
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { useEmbeddedGoal, type EmbeddedGoalClientOverride } from "../session-context";
|
|
4
4
|
import {
|
|
5
5
|
useDebouncedCallback,
|
|
6
6
|
useMutationRunner,
|
|
@@ -30,7 +30,7 @@ export function isGoalRefreshEvent(event: Pick<SessionEvent, "type">): boolean {
|
|
|
30
30
|
);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
export type UseGoalOptions =
|
|
33
|
+
export type UseGoalOptions = EmbeddedGoalClientOverride &
|
|
34
34
|
SessionEventFeedOptions & {
|
|
35
35
|
/** Optional safety-net polling (ms). Off by default — event refreshes drive updates. */
|
|
36
36
|
pollIntervalMs?: number | undefined;
|
|
@@ -71,7 +71,7 @@ export function useGoal(
|
|
|
71
71
|
sessionId: string | null | undefined,
|
|
72
72
|
options: UseGoalOptions = {},
|
|
73
73
|
): UseGoalResult {
|
|
74
|
-
const { client, workspaceId } =
|
|
74
|
+
const { client, workspaceId } = useEmbeddedGoal(options);
|
|
75
75
|
const enabled = (options.enabled ?? true) && Boolean(sessionId);
|
|
76
76
|
const sharedEvents = options.events;
|
|
77
77
|
const sharedFeed = sharedEvents !== undefined;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import type { SessionEvent, SessionLineageResponse } from "@opengeni/sdk";
|
|
2
2
|
import { useCallback, useEffect, useRef } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
useEmbeddedSessionLineage,
|
|
5
|
+
type EmbeddedSessionLineageClientOverride,
|
|
6
|
+
} from "../session-context";
|
|
4
7
|
import { useDebouncedCallback, usePolledValue, useSessionEventTrigger } from "./internal";
|
|
5
8
|
|
|
6
|
-
export type UseSessionLineageOptions =
|
|
9
|
+
export type UseSessionLineageOptions = EmbeddedSessionLineageClientOverride & {
|
|
7
10
|
events?: SessionEvent[] | undefined;
|
|
8
11
|
/** Refresh interval (ms). Off by default. */
|
|
9
12
|
pollIntervalMs?: number | undefined;
|
|
@@ -58,7 +61,7 @@ export function useSessionLineage(
|
|
|
58
61
|
options: UseSessionLineageOptions = {},
|
|
59
62
|
): UseSessionLineageResult {
|
|
60
63
|
const { client, workspaceId, workspaceControlEvent, registerSessionReconciler } =
|
|
61
|
-
|
|
64
|
+
useEmbeddedSessionLineage(options);
|
|
62
65
|
const enabled = (options.enabled ?? true) && Boolean(sessionId);
|
|
63
66
|
const load = useCallback(
|
|
64
67
|
async () =>
|
package/src/hooks/use-session.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Session, SessionEvent } from "@opengeni/sdk";
|
|
2
2
|
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { useEmbeddedSessionRead, type EmbeddedSessionReadClientOverride } from "../session-context";
|
|
4
4
|
import {
|
|
5
5
|
useMutationRunner,
|
|
6
6
|
usePolledValue,
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
type SessionEventFeedOptions,
|
|
9
9
|
} from "./internal";
|
|
10
10
|
|
|
11
|
-
export type UseSessionOptions =
|
|
11
|
+
export type UseSessionOptions = EmbeddedSessionReadClientOverride &
|
|
12
12
|
SessionEventFeedOptions & {
|
|
13
13
|
/** Re-fetch on an interval (ms). Off by default — pair with `useSessionEvents` for live status. */
|
|
14
14
|
pollIntervalMs?: number | undefined;
|
|
@@ -38,7 +38,7 @@ export function useSession(
|
|
|
38
38
|
options: UseSessionOptions = {},
|
|
39
39
|
): UseSessionResult {
|
|
40
40
|
const { client, workspaceId, workspaceControlEvent, registerSessionReconciler } =
|
|
41
|
-
|
|
41
|
+
useEmbeddedSessionRead(options);
|
|
42
42
|
const enabled = (options.enabled ?? true) && Boolean(sessionId);
|
|
43
43
|
const [override, setOverride] = useState<Session | null>(null);
|
|
44
44
|
const { run, mutating, mutationError, clearMutationError } = useMutationRunner();
|
package/src/index.ts
CHANGED
|
@@ -8,8 +8,13 @@
|
|
|
8
8
|
// @source "../node_modules/@opengeni/react/src";
|
|
9
9
|
|
|
10
10
|
export type {
|
|
11
|
+
EmbeddedFileAttachmentClientLike,
|
|
12
|
+
EmbeddedGoalClientLike,
|
|
11
13
|
EmbeddedHumanInputSessionClientLike,
|
|
14
|
+
EmbeddedSessionEventClientLike,
|
|
15
|
+
EmbeddedSessionLineageClientLike,
|
|
12
16
|
EmbeddedSessionMcpApprovalPolicyClientLike,
|
|
17
|
+
EmbeddedSessionReadClientLike,
|
|
13
18
|
EmbeddedSessionClientLike,
|
|
14
19
|
SessionClientLike,
|
|
15
20
|
} from "./client";
|
package/src/session-context.ts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import type { StreamConnectionState, WorkspaceControlEvent } from "@opengeni/sdk";
|
|
2
2
|
import { createContext, useContext } from "react";
|
|
3
3
|
import type {
|
|
4
|
+
EmbeddedFileAttachmentClientLike,
|
|
5
|
+
EmbeddedGoalClientLike,
|
|
4
6
|
EmbeddedHumanInputSessionClientLike,
|
|
5
|
-
EmbeddedSessionMcpApprovalPolicyClientLike,
|
|
6
7
|
EmbeddedSessionClientLike,
|
|
8
|
+
EmbeddedSessionLineageClientLike,
|
|
9
|
+
EmbeddedSessionMcpApprovalPolicyClientLike,
|
|
10
|
+
EmbeddedSessionReadClientLike,
|
|
7
11
|
SessionClientLike,
|
|
8
12
|
} from "./client";
|
|
9
13
|
|
|
@@ -46,22 +50,61 @@ export type EmbeddedSessionMcpApprovalPolicyClientOverride = {
|
|
|
46
50
|
workspaceId?: string | undefined;
|
|
47
51
|
};
|
|
48
52
|
|
|
53
|
+
export type EmbeddedSessionReadClientOverride = {
|
|
54
|
+
client?: EmbeddedSessionReadClientLike | undefined;
|
|
55
|
+
workspaceId?: string | undefined;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export type EmbeddedGoalClientOverride = {
|
|
59
|
+
client?: EmbeddedGoalClientLike | undefined;
|
|
60
|
+
workspaceId?: string | undefined;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export type EmbeddedSessionLineageClientOverride = {
|
|
64
|
+
client?: EmbeddedSessionLineageClientLike | undefined;
|
|
65
|
+
workspaceId?: string | undefined;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export type EmbeddedFileAttachmentClientOverride = {
|
|
69
|
+
client?: EmbeddedFileAttachmentClientLike | undefined;
|
|
70
|
+
workspaceId?: string | undefined;
|
|
71
|
+
};
|
|
72
|
+
|
|
49
73
|
export type EmbeddedSessionContextValue = Omit<OpenGeniContextValue, "client"> & {
|
|
50
74
|
client: EmbeddedSessionClientLike;
|
|
51
75
|
};
|
|
52
76
|
|
|
53
|
-
|
|
54
|
-
|
|
77
|
+
type EmbeddedClientOverride<TClient> = {
|
|
78
|
+
client?: TClient | undefined;
|
|
79
|
+
workspaceId?: string | undefined;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
type EmbeddedClientContextValue<TClient> = Omit<OpenGeniContextValue, "client"> & {
|
|
83
|
+
client: TClient;
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
function useEmbeddedClientRefinement<TClient extends object>(
|
|
87
|
+
override: EmbeddedClientOverride<TClient>,
|
|
88
|
+
requiredMethods: readonly string[],
|
|
89
|
+
hookName: string,
|
|
90
|
+
): EmbeddedClientContextValue<TClient> {
|
|
55
91
|
const context = useContext(OpenGeniContext);
|
|
56
|
-
const
|
|
92
|
+
const candidate = override.client ?? context?.client;
|
|
57
93
|
const workspaceId = override.workspaceId ?? context?.workspaceId;
|
|
58
|
-
if (!
|
|
94
|
+
if (!candidate || !workspaceId) {
|
|
59
95
|
throw new Error(
|
|
60
96
|
"@opengeni/react: no OpenGeni client/workspace available. Wrap the tree in <OpenGeniProvider> or pass { client, workspaceId } to the hook.",
|
|
61
97
|
);
|
|
62
98
|
}
|
|
99
|
+
const methods = candidate as Record<string, unknown>;
|
|
100
|
+
const missing = requiredMethods.filter((method) => typeof methods[method] !== "function");
|
|
101
|
+
if (missing.length > 0) {
|
|
102
|
+
throw new Error(
|
|
103
|
+
`@opengeni/react: ${hookName} requires client method${missing.length === 1 ? "" : "s"} ${missing.join(", ")}.`,
|
|
104
|
+
);
|
|
105
|
+
}
|
|
63
106
|
return {
|
|
64
|
-
client,
|
|
107
|
+
client: candidate as TClient,
|
|
65
108
|
workspaceId,
|
|
66
109
|
workspaceControlEvent: context?.workspaceControlEvent ?? null,
|
|
67
110
|
workspaceControlConnectionState: context?.workspaceControlConnectionState ?? "idle",
|
|
@@ -70,14 +113,14 @@ export function useOpenGeni(override: ClientOverride = {}): OpenGeniContextValue
|
|
|
70
113
|
};
|
|
71
114
|
}
|
|
72
115
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
):
|
|
116
|
+
function eventClientMethods(override: object, directMethods: readonly string[]): readonly string[] {
|
|
117
|
+
const hasSharedEventFeed =
|
|
118
|
+
"events" in override && (override as { events?: unknown }).events !== undefined;
|
|
119
|
+
return hasSharedEventFeed ? directMethods : ["getSession", "streamEvents", ...directMethods];
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/** Resolve client + workspace from explicit overrides or the provider. */
|
|
123
|
+
export function useOpenGeni(override: ClientOverride = {}): OpenGeniContextValue {
|
|
81
124
|
const context = useContext(OpenGeniContext);
|
|
82
125
|
const client = override.client ?? context?.client;
|
|
83
126
|
const workspaceId = override.workspaceId ?? context?.workspaceId;
|
|
@@ -96,6 +139,77 @@ export function useEmbeddedSession(
|
|
|
96
139
|
};
|
|
97
140
|
}
|
|
98
141
|
|
|
142
|
+
/**
|
|
143
|
+
* Resolve the narrow client required by the session-only hooks. The full
|
|
144
|
+
* provider client is structurally compatible, while an explicit host proxy
|
|
145
|
+
* only needs to expose session/event/composer/queue/control operations.
|
|
146
|
+
*/
|
|
147
|
+
export function useEmbeddedSession(
|
|
148
|
+
override: EmbeddedSessionClientOverride = {},
|
|
149
|
+
): EmbeddedSessionContextValue {
|
|
150
|
+
return useEmbeddedClientRefinement(
|
|
151
|
+
override,
|
|
152
|
+
[
|
|
153
|
+
"getSession",
|
|
154
|
+
"listEvents",
|
|
155
|
+
"streamEvents",
|
|
156
|
+
"getComposerDraft",
|
|
157
|
+
"saveComposerDraft",
|
|
158
|
+
"sendMessage",
|
|
159
|
+
"steerMessage",
|
|
160
|
+
"getQueue",
|
|
161
|
+
"moveQueueItem",
|
|
162
|
+
"editQueueItem",
|
|
163
|
+
"steerQueueItem",
|
|
164
|
+
"deleteQueueItem",
|
|
165
|
+
"pauseSession",
|
|
166
|
+
"resumeSession",
|
|
167
|
+
"sendApprovalDecision",
|
|
168
|
+
],
|
|
169
|
+
"session hooks",
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/** Resolve the exact client surface required by `useSession`. */
|
|
174
|
+
export function useEmbeddedSessionRead(
|
|
175
|
+
override: EmbeddedSessionReadClientOverride = {},
|
|
176
|
+
): EmbeddedClientContextValue<EmbeddedSessionReadClientLike> {
|
|
177
|
+
return useEmbeddedClientRefinement(
|
|
178
|
+
override,
|
|
179
|
+
eventClientMethods(override, ["getSession", "updateSession"]),
|
|
180
|
+
"useSession",
|
|
181
|
+
);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/** Resolve the exact client surface required by `useGoal`. */
|
|
185
|
+
export function useEmbeddedGoal(
|
|
186
|
+
override: EmbeddedGoalClientOverride = {},
|
|
187
|
+
): EmbeddedClientContextValue<EmbeddedGoalClientLike> {
|
|
188
|
+
return useEmbeddedClientRefinement(
|
|
189
|
+
override,
|
|
190
|
+
eventClientMethods(override, ["getGoal", "updateGoal", "deleteGoal"]),
|
|
191
|
+
"useGoal",
|
|
192
|
+
);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/** Resolve the exact client surface required by `useSessionLineage`. */
|
|
196
|
+
export function useEmbeddedSessionLineage(
|
|
197
|
+
override: EmbeddedSessionLineageClientOverride = {},
|
|
198
|
+
): EmbeddedClientContextValue<EmbeddedSessionLineageClientLike> {
|
|
199
|
+
return useEmbeddedClientRefinement(
|
|
200
|
+
override,
|
|
201
|
+
eventClientMethods(override, ["getSessionLineage"]),
|
|
202
|
+
"useSessionLineage",
|
|
203
|
+
);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/** Resolve the exact client surface required by `useFileAttachments`. */
|
|
207
|
+
export function useEmbeddedFileAttachments(
|
|
208
|
+
override: EmbeddedFileAttachmentClientOverride = {},
|
|
209
|
+
): EmbeddedClientContextValue<EmbeddedFileAttachmentClientLike> {
|
|
210
|
+
return useEmbeddedClientRefinement(override, ["uploadFile"], "useFileAttachments");
|
|
211
|
+
}
|
|
212
|
+
|
|
99
213
|
/**
|
|
100
214
|
* Resolve the structured-input refinement without widening the baseline
|
|
101
215
|
* session-only proxy contract.
|
|
@@ -106,21 +220,11 @@ export function useEmbeddedHumanInputSession(override: EmbeddedHumanInputClientO
|
|
|
106
220
|
> & {
|
|
107
221
|
client: EmbeddedHumanInputSessionClientLike;
|
|
108
222
|
} {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
typeof client.submitHumanInputResponse !== "function"
|
|
115
|
-
) {
|
|
116
|
-
throw new Error(
|
|
117
|
-
"@opengeni/react: useHumanInputRequests requires listHumanInputRequests, getHumanInputRequest, and submitHumanInputResponse.",
|
|
118
|
-
);
|
|
119
|
-
}
|
|
120
|
-
return {
|
|
121
|
-
...embedded,
|
|
122
|
-
client: client as EmbeddedHumanInputSessionClientLike,
|
|
123
|
-
};
|
|
223
|
+
return useEmbeddedClientRefinement(
|
|
224
|
+
override,
|
|
225
|
+
eventClientMethods(override, ["listHumanInputRequests", "submitHumanInputResponse"]),
|
|
226
|
+
"useHumanInputRequests",
|
|
227
|
+
);
|
|
124
228
|
}
|
|
125
229
|
|
|
126
230
|
/** Resolve the approval-policy refinement without widening session-only hosts. */
|
|
@@ -129,17 +233,11 @@ export function useEmbeddedSessionMcpApprovalPolicy(
|
|
|
129
233
|
): Omit<EmbeddedSessionContextValue, "client"> & {
|
|
130
234
|
client: EmbeddedSessionMcpApprovalPolicyClientLike;
|
|
131
235
|
} {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
);
|
|
138
|
-
}
|
|
139
|
-
return {
|
|
140
|
-
...embedded,
|
|
141
|
-
client: client as EmbeddedSessionMcpApprovalPolicyClientLike,
|
|
142
|
-
};
|
|
236
|
+
return useEmbeddedClientRefinement(
|
|
237
|
+
override,
|
|
238
|
+
eventClientMethods(override, ["getSession", "updateSessionMcpApprovalPolicy"]),
|
|
239
|
+
"useSessionMcpApprovalPolicy",
|
|
240
|
+
);
|
|
143
241
|
}
|
|
144
242
|
|
|
145
243
|
/**
|