@opengeni/react 3.7.0-canary.0 → 3.7.0-canary.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/artifacts.js +24 -5
- package/dist/artifacts.js.map +1 -1
- package/dist/{browser-viewer-E5DDEFQ4.js → browser-viewer-NTD6UIPR.js} +3 -3
- package/dist/{chunk-W2RGYBCV.js → chunk-24M4YBCL.js} +4 -4
- package/dist/{chunk-DOK4KZF2.js → chunk-5IXTJTK3.js} +1322 -392
- package/dist/chunk-5IXTJTK3.js.map +1 -0
- package/dist/chunk-5PQJOCX5.js +902 -0
- package/dist/chunk-5PQJOCX5.js.map +1 -0
- package/dist/{chunk-R55HFTT3.js → chunk-INGB2N5R.js} +4305 -4019
- package/dist/chunk-INGB2N5R.js.map +1 -0
- package/dist/{chunk-FJBOU2TH.js → chunk-MOWYEBCQ.js} +1728 -12
- package/dist/chunk-MOWYEBCQ.js.map +1 -0
- package/dist/chunk-PAJU5KKL.js +331 -0
- package/dist/chunk-PAJU5KKL.js.map +1 -0
- package/dist/{chunk-VTOREEXF.js → chunk-PLYRL5ER.js} +24 -2
- package/dist/{chunk-VTOREEXF.js.map → chunk-PLYRL5ER.js.map} +1 -1
- package/dist/{chunk-YVCHAQZY.js → chunk-ZFOFY5ST.js} +27 -349
- package/dist/chunk-ZFOFY5ST.js.map +1 -0
- package/dist/components/artifacts/published-html-artifact-frame.d.ts +3 -2
- package/dist/components/session-chrome.d.ts +37 -4
- package/dist/components/session-commands-panel.d.ts +6 -0
- package/dist/components/session-conversation.d.ts +14 -0
- package/dist/components/timeline-anchor.d.ts +21 -0
- package/dist/composer.js +2 -3
- package/dist/conversation-timeline.d.ts +5 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.js +716 -914
- package/dist/index.js.map +1 -1
- package/dist/interaction.js +2 -2
- package/dist/lib/format.d.ts +5 -0
- package/dist/machines.js +3 -2
- package/dist/session-ui.d.ts +3 -0
- package/dist/session-ui.js +14 -4
- package/dist/session.js +19 -19
- package/dist/timeline/types.d.ts +3 -1
- package/package.json +2 -2
- package/src/components/artifacts/published-html-artifact-frame.tsx +27 -4
- package/src/components/machine-input-display.ts +6 -0
- package/src/components/message-timeline.tsx +320 -197
- package/src/components/session-chrome.tsx +498 -125
- package/src/components/session-commands-panel.tsx +113 -0
- package/src/components/session-conversation.tsx +141 -0
- package/src/components/timeline-anchor.tsx +91 -0
- package/src/conversation-timeline.ts +83 -0
- package/src/hooks/use-session-background-commands.ts +21 -10
- package/src/hooks/use-session-events.ts +36 -14
- package/src/hooks/use-session.ts +23 -2
- package/src/index.ts +4 -0
- package/src/lib/format.ts +32 -0
- package/src/session-ui.ts +3 -0
- package/src/timeline/projection.ts +6 -12
- package/src/timeline/types.ts +4 -0
- package/styles/compiled.css +495 -411
- package/styles/index.css +23 -0
- package/dist/chunk-7EAFGICR.js +0 -302
- package/dist/chunk-7EAFGICR.js.map +0 -1
- package/dist/chunk-C6WDLHBA.js +0 -2590
- package/dist/chunk-C6WDLHBA.js.map +0 -1
- package/dist/chunk-DOK4KZF2.js.map +0 -1
- package/dist/chunk-FJBOU2TH.js.map +0 -1
- package/dist/chunk-R55HFTT3.js.map +0 -1
- package/dist/chunk-YVCHAQZY.js.map +0 -1
- /package/dist/{browser-viewer-E5DDEFQ4.js.map → browser-viewer-NTD6UIPR.js.map} +0 -0
- /package/dist/{chunk-W2RGYBCV.js.map → chunk-24M4YBCL.js.map} +0 -0
package/src/index.ts
CHANGED
|
@@ -462,6 +462,8 @@ export type { CommandPaletteProps } from "./components/command-palette";
|
|
|
462
462
|
|
|
463
463
|
// Components
|
|
464
464
|
export { ChatComposer } from "./components/chat-composer";
|
|
465
|
+
export { SessionConversation } from "./components/session-conversation";
|
|
466
|
+
export type { SessionConversationProps } from "./components/session-conversation";
|
|
465
467
|
export type { ChatComposerProps } from "./components/chat-composer";
|
|
466
468
|
export { ComposerTranscriptionControl } from "./components/composer-transcription-control";
|
|
467
469
|
export type {
|
|
@@ -600,8 +602,10 @@ export {
|
|
|
600
602
|
formatClockTime,
|
|
601
603
|
formatRelativeTime,
|
|
602
604
|
humanizeFailureReason,
|
|
605
|
+
presentFailure,
|
|
603
606
|
isCreditExhaustion,
|
|
604
607
|
stringifyPayload,
|
|
605
608
|
truncate,
|
|
606
609
|
tryParseJson,
|
|
607
610
|
} from "./lib/format";
|
|
611
|
+
export { SessionCommandsPanel } from "./components/session-commands-panel";
|
package/src/lib/format.ts
CHANGED
|
@@ -186,3 +186,35 @@ export function humanizeFailureReason(reason: string | null): string | null {
|
|
|
186
186
|
}
|
|
187
187
|
return reason;
|
|
188
188
|
}
|
|
189
|
+
|
|
190
|
+
/** Project failure diagnostics without changing the stored event, including legacy retry wrappers. */
|
|
191
|
+
export function presentFailure(payload: Record<string, unknown>): {
|
|
192
|
+
reason: string | null;
|
|
193
|
+
safetyRefusal: boolean;
|
|
194
|
+
} {
|
|
195
|
+
const text = (key: string): string | null => {
|
|
196
|
+
const value = payload[key];
|
|
197
|
+
return typeof value === "string" && value.trim() ? value : null;
|
|
198
|
+
};
|
|
199
|
+
const message = text("error") ?? text("message");
|
|
200
|
+
const detail = text("lastRetryableError") ?? text("detail");
|
|
201
|
+
const safetyRefusal =
|
|
202
|
+
payload.code === "provider_safety_refusal" ||
|
|
203
|
+
[message, detail].some(
|
|
204
|
+
(value) =>
|
|
205
|
+
value !== null && /\bthis request was blocked by our safety systems\b/i.test(value),
|
|
206
|
+
);
|
|
207
|
+
if (safetyRefusal) {
|
|
208
|
+
return {
|
|
209
|
+
reason: `The model provider blocked this request.${detail || message ? ` ${detail ?? message}` : ""}`,
|
|
210
|
+
safetyRefusal: true,
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
return {
|
|
214
|
+
reason:
|
|
215
|
+
detail && detail !== message
|
|
216
|
+
? [humanizeFailureReason(message), humanizeFailureReason(detail)].filter(Boolean).join(" ")
|
|
217
|
+
: humanizeFailureReason(message),
|
|
218
|
+
safetyRefusal: false,
|
|
219
|
+
};
|
|
220
|
+
}
|
package/src/session-ui.ts
CHANGED
|
@@ -25,6 +25,8 @@ export type {
|
|
|
25
25
|
TurnSummaryOptions,
|
|
26
26
|
} from "./timeline/turn-summary";
|
|
27
27
|
export { QueueSurface } from "./components/queue-surface";
|
|
28
|
+
export { SessionConversation } from "./components/session-conversation";
|
|
29
|
+
export type { SessionConversationProps } from "./components/session-conversation";
|
|
28
30
|
export type { QueueSurfaceProps } from "./components/queue-surface";
|
|
29
31
|
export {
|
|
30
32
|
SessionChrome,
|
|
@@ -38,3 +40,4 @@ export type {
|
|
|
38
40
|
SessionChromeSignalId,
|
|
39
41
|
SessionChromeSignalTone,
|
|
40
42
|
} from "./components/session-chrome";
|
|
43
|
+
export { SessionCommandsPanel } from "./components/session-commands-panel";
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
import fleetDecisionItem from "./fleet-decision-projection";
|
|
11
11
|
import {
|
|
12
12
|
CREDIT_EXHAUSTION_MESSAGE,
|
|
13
|
-
|
|
13
|
+
presentFailure,
|
|
14
14
|
isCreditExhaustion,
|
|
15
15
|
tryParseJson,
|
|
16
16
|
} from "../lib/format";
|
|
@@ -1050,6 +1050,7 @@ export function buildTimeline(events: SessionEvent[]): TimelineItem[] {
|
|
|
1050
1050
|
id: `${pendingWaitOutcome.id}-visible-outcome`,
|
|
1051
1051
|
tone: "waiting",
|
|
1052
1052
|
text: waitingOutcomeText(pendingWaitOutcome.reason),
|
|
1053
|
+
recordedOutcome: true,
|
|
1053
1054
|
occurredAt: pendingWaitOutcome.occurredAt,
|
|
1054
1055
|
});
|
|
1055
1056
|
}
|
|
@@ -1853,8 +1854,7 @@ function isTurnBoundary(group: TimelineGroup | undefined): boolean {
|
|
|
1853
1854
|
(group.item.kind === "user-message" ||
|
|
1854
1855
|
group.item.kind === "human-input" ||
|
|
1855
1856
|
group.item.kind === "context-compaction" ||
|
|
1856
|
-
|
|
1857
|
-
group.item.members.some((member) => member.kind === "media_generation_result")) ||
|
|
1857
|
+
group.item.kind === "machine-input-batch" ||
|
|
1858
1858
|
(group.item.kind === "notice" && group.item.tone === "input")))
|
|
1859
1859
|
);
|
|
1860
1860
|
}
|
|
@@ -2021,6 +2021,8 @@ function machineInputMembers(value: unknown): MachineInputBatchItem["members"] {
|
|
|
2021
2021
|
const kinds = new Set<MachineInputBatchItem["members"][number]["kind"]>([
|
|
2022
2022
|
"scheduled_occurrence",
|
|
2023
2023
|
"goal_continuation",
|
|
2024
|
+
"background_command_result",
|
|
2025
|
+
"session_wait_timeout",
|
|
2024
2026
|
"agent_message",
|
|
2025
2027
|
"agent_steer_instruction",
|
|
2026
2028
|
"child_terminal_result",
|
|
@@ -2273,15 +2275,7 @@ function elapsedDurationMs(startedAt: string, completedAt: string): number | nul
|
|
|
2273
2275
|
}
|
|
2274
2276
|
|
|
2275
2277
|
function failureMessage(payload: Record<string, unknown>): string | null {
|
|
2276
|
-
|
|
2277
|
-
const value = payload[key];
|
|
2278
|
-
if (typeof value === "string" && value.trim().length > 0) {
|
|
2279
|
-
// Auth/quota provider errors are rewritten for the right audience
|
|
2280
|
-
// (raw text remains in the event payload for debug surfaces).
|
|
2281
|
-
return humanizeFailureReason(value);
|
|
2282
|
-
}
|
|
2283
|
-
}
|
|
2284
|
-
return null;
|
|
2278
|
+
return presentFailure(payload).reason;
|
|
2285
2279
|
}
|
|
2286
2280
|
|
|
2287
2281
|
function goalText(payload: Record<string, unknown>): string | null {
|
package/src/timeline/types.ts
CHANGED
|
@@ -349,6 +349,8 @@ export type NoticeItem = {
|
|
|
349
349
|
id: string;
|
|
350
350
|
tone: "waiting" | "cancelled" | "failed" | "input";
|
|
351
351
|
text: string;
|
|
352
|
+
/** A preserved turn-end outcome, not a claim about current session state. */
|
|
353
|
+
recordedOutcome?: true;
|
|
352
354
|
/** Optional evidence kept inspectable without overwhelming the main rail. */
|
|
353
355
|
details?: { label: string; value: unknown };
|
|
354
356
|
action?: { label: string; url: string };
|
|
@@ -378,6 +380,8 @@ export type MachineInputMember = {
|
|
|
378
380
|
kind:
|
|
379
381
|
| "scheduled_occurrence"
|
|
380
382
|
| "goal_continuation"
|
|
383
|
+
| "background_command_result"
|
|
384
|
+
| "session_wait_timeout"
|
|
381
385
|
| "agent_message"
|
|
382
386
|
| "agent_steer_instruction"
|
|
383
387
|
| "child_terminal_result"
|