@belonguniverseai/react-sdk 0.3.5 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -8
- package/dist/api/client.d.ts +40 -1
- package/dist/api/report-client-error.d.ts +1 -1
- package/dist/browser/dom-bridge.d.ts +7 -0
- package/dist/browser/spa-navigate.d.ts +11 -2
- package/dist/component/BelongWidget.d.ts +12 -7
- package/dist/component/{arc-6I9bTNTk.js → arc-BhIvhaIH.js} +2 -2
- package/dist/component/{architectureDiagram-3BPJPVTR-DecTtp8M.js → architectureDiagram-3BPJPVTR-BWNCirdr.js} +3 -3
- package/dist/component/{blockDiagram-GPEHLZMM-D0ShJEdc.js → blockDiagram-GPEHLZMM-BnslF4z5.js} +4 -4
- package/dist/component/{c4Diagram-AAUBKEIU-D-N4NLkS.js → c4Diagram-AAUBKEIU-ByIoAzxn.js} +3 -3
- package/dist/component/{channel-BTRAV_iV.js → channel-BSkI2ZMQ.js} +2 -2
- package/dist/component/{chunk-2J33WTMH-Chgh4n6n.js → chunk-2J33WTMH-DdP5frJt.js} +2 -2
- package/dist/component/{chunk-4BX2VUAB-BR7BZW6m.js → chunk-4BX2VUAB-DlsylVfZ.js} +2 -2
- package/dist/component/{chunk-55IACEB6-D0_e3QRv.js → chunk-55IACEB6-CcJHjxtI.js} +2 -2
- package/dist/component/{chunk-727SXJPM-Cooz66Ae.js → chunk-727SXJPM-IzRNu9Aj.js} +6 -6
- package/dist/component/{chunk-AQP2D5EJ-CAz4YEpg.js → chunk-AQP2D5EJ-DmcGMHHV.js} +4 -4
- package/dist/component/{chunk-FMBD7UC4-C8n0NV45.js → chunk-FMBD7UC4-T7thtdBK.js} +2 -2
- package/dist/component/{chunk-ND2GUHAM-Di6RJblt.js → chunk-ND2GUHAM-Dm_d0Ags.js} +2 -2
- package/dist/component/{chunk-QZHKN3VN-Cii0zOyK.js → chunk-QZHKN3VN-D2PGEfVN.js} +2 -2
- package/dist/component/{classDiagram-4FO5ZUOK-BIqkynKR.js → classDiagram-4FO5ZUOK-Bn7KwDp9.js} +3 -3
- package/dist/component/{classDiagram-v2-Q7XG4LA2-BIqkynKR.js → classDiagram-v2-Q7XG4LA2-Bn7KwDp9.js} +3 -3
- package/dist/component/{cose-bilkent-S5V4N54A-Dq3K4Kak.js → cose-bilkent-S5V4N54A-BtDuNpUN.js} +2 -2
- package/dist/component/{dagre-BM42HDAG-KdRn-NQ2.js → dagre-BM42HDAG-BknZdIOQ.js} +2 -2
- package/dist/component/{diagram-2AECGRRQ-CeJVj827.js → diagram-2AECGRRQ-ISHN0dHe.js} +3 -3
- package/dist/component/{diagram-5GNKFQAL-ceCtRhc4.js → diagram-5GNKFQAL-7gWbpLCQ.js} +4 -4
- package/dist/component/{diagram-KO2AKTUF-CU9xKIPR.js → diagram-KO2AKTUF-B63ZLzkh.js} +3 -3
- package/dist/component/{diagram-LMA3HP47-CRZuMr0r.js → diagram-LMA3HP47-hhw0MjoS.js} +3 -3
- package/dist/component/{diagram-OG6HWLK6-DdO8bLrY.js → diagram-OG6HWLK6-D_L9Gvuh.js} +4 -4
- package/dist/component/{erDiagram-TEJ5UH35-BnPlE6-i.js → erDiagram-TEJ5UH35-BAg27ZHd.js} +5 -5
- package/dist/component/{flowDiagram-I6XJVG4X-Bi70muwl.js → flowDiagram-I6XJVG4X-DDYjK7xG.js} +7 -7
- package/dist/component/{ganttDiagram-6RSMTGT7-FjDKlQ-F.js → ganttDiagram-6RSMTGT7-CDNAiKQG.js} +3 -3
- package/dist/component/{gitGraphDiagram-PVQCEYII-B9GAxjPJ.js → gitGraphDiagram-PVQCEYII-CY1N7jOJ.js} +4 -4
- package/dist/component/{highlighted-body-OFNGDK62-DEhmLiFe.js → highlighted-body-OFNGDK62-DHwLnkF_.js} +2 -2
- package/dist/component/index.js +2 -2
- package/dist/component/{infoDiagram-5YYISTIA-D_z8khpb.js → infoDiagram-5YYISTIA-Cbgk6g6j.js} +2 -2
- package/dist/component/{ishikawaDiagram-YF4QCWOH-DHUQHc7h.js → ishikawaDiagram-YF4QCWOH-BUfiorJj.js} +2 -2
- package/dist/component/{journeyDiagram-JHISSGLW-BdPxTkII.js → journeyDiagram-JHISSGLW-Bh4IizEm.js} +5 -5
- package/dist/component/{kanban-definition-UN3LZRKU-CXo8cG6_.js → kanban-definition-UN3LZRKU-CgWqLfFM.js} +3 -3
- package/dist/component/{linear-azN-TF0f.js → linear-D1rJivs3.js} +2 -2
- package/dist/component/{mermaid-GHXKKRXX-P_Te0BTc.js → mermaid-GHXKKRXX-iO2IZZUN.js} +31615 -30317
- package/dist/component/{mindmap-definition-RKZ34NQL-CVTlgpwY.js → mindmap-definition-RKZ34NQL-DeQED-9b.js} +4 -4
- package/dist/component/{pieDiagram-4H26LBE5-BBqlJN3M.js → pieDiagram-4H26LBE5-CZ5Zt_mz.js} +4 -4
- package/dist/component/{quadrantDiagram-W4KKPZXB-Cq8G5gg8.js → quadrantDiagram-W4KKPZXB-Dib1AukJ.js} +3 -3
- package/dist/component/{requirementDiagram-4Y6WPE33-DE8meVq8.js → requirementDiagram-4Y6WPE33-DubjTJYS.js} +4 -4
- package/dist/component/{sankeyDiagram-5OEKKPKP-rGv9060J.js → sankeyDiagram-5OEKKPKP-Cq2S3XKs.js} +2 -2
- package/dist/component/{sequenceDiagram-3UESZ5HK-CYZCqSg5.js → sequenceDiagram-3UESZ5HK-BUo5k0zn.js} +4 -4
- package/dist/component/{stateDiagram-AJRCARHV-7PfYQio8.js → stateDiagram-AJRCARHV-DJwQp0D7.js} +3 -3
- package/dist/component/{stateDiagram-v2-BHNVJYJU-Bc8Y618M.js → stateDiagram-v2-BHNVJYJU-BX77P5aq.js} +3 -3
- package/dist/component/{timeline-definition-PNZ67QCA-DDLIgmb4.js → timeline-definition-PNZ67QCA-DnQ481VI.js} +3 -3
- package/dist/component/{vennDiagram-CIIHVFJN-BPKi69Hn.js → vennDiagram-CIIHVFJN-BQ0X92lQ.js} +2 -2
- package/dist/component/{wardleyDiagram-YWT4CUSO-Dumz_-ib.js → wardleyDiagram-YWT4CUSO-CMTnjVTA.js} +3 -3
- package/dist/component/{xychartDiagram-2RQKCTM6-DQGacrwk.js → xychartDiagram-2RQKCTM6-BLSiRWug.js} +3 -3
- package/dist/components/embed/AgentChatIcon.d.ts +16 -0
- package/dist/components/embed/AgentPhaseIcon.d.ts +17 -0
- package/dist/components/embed/EmbedAvatar.d.ts +14 -2
- package/dist/components/embed/EmbedRail.d.ts +12 -1
- package/dist/components/embed/EmbedSessions.d.ts +22 -8
- package/dist/embed/adoption-notice.d.ts +22 -0
- package/dist/embed/auth0-cache.d.ts +32 -0
- package/dist/embed/auth0-refresh.d.ts +8 -5
- package/dist/embed/copy.d.ts +2 -0
- package/dist/embed/dock-state.d.ts +16 -0
- package/dist/embed/global.d.ts +6 -0
- package/dist/embed/host-layout-vars.d.ts +24 -0
- package/dist/embed/host-push-controller.d.ts +67 -0
- package/dist/embed/host-surface.d.ts +57 -0
- package/dist/embed/voice/agent-spawn.d.ts +38 -0
- package/dist/embed/voice/audio-utils.d.ts +6 -0
- package/dist/embed/voice/call-active-marker.d.ts +67 -0
- package/dist/embed/voice/line-dispatch.d.ts +13 -4
- package/dist/embed/voice/line-run-reader.d.ts +13 -0
- package/dist/embed/voice/line-slots.d.ts +61 -0
- package/dist/embed/voice/reconnect-offer.d.ts +29 -0
- package/dist/embed/voice/session-create.d.ts +26 -0
- package/dist/embed/voice/voice-http.d.ts +12 -0
- package/dist/embed/voice-bus.d.ts +2 -0
- package/dist/embed/voice-call-lines.d.ts +211 -14
- package/dist/embed/voice-call.d.ts +34 -6
- package/dist/i18n/messages/en.d.ts +12 -0
- package/dist/i18n/messages/surfaces/embedMisc.d.ts +3 -0
- package/dist/i18n/messages/surfaces/header.d.ts +6 -0
- package/dist/i18n/messages/surfaces/sessions.d.ts +3 -0
- package/dist/i18n/messages/surfaces/stream.d.ts +3 -0
- package/dist/stream/belong-chat-transport.d.ts +26 -0
- package/dist/stream/belong-data-parts.d.ts +8 -0
- package/dist/stream/route-dispatch.d.ts +17 -0
- package/dist/stream/stream-state-store.d.ts +7 -6
- package/dist/types/public.d.ts +3 -1
- package/package.json +1 -1
- package/dist/embed/universe-origin.d.ts +0 -24
|
@@ -57,6 +57,7 @@ export declare const en: {
|
|
|
57
57
|
readonly executingTasks: "Working on it…";
|
|
58
58
|
readonly workedSteps_one: "Worked · {{count}} step";
|
|
59
59
|
readonly workedSteps_other: "Worked · {{count}} steps";
|
|
60
|
+
readonly resumingAfterPause: "Taking longer than expected — picking it back up…";
|
|
60
61
|
readonly open: "Open";
|
|
61
62
|
readonly reconnectNeeded: "The {{provider}} session needs reconnecting to continue.";
|
|
62
63
|
readonly reconnect: "Reconnect";
|
|
@@ -82,6 +83,7 @@ export declare const en: {
|
|
|
82
83
|
readonly noSessionsYet: "No sessions yet.";
|
|
83
84
|
readonly untitledSession: "Untitled session";
|
|
84
85
|
readonly updated: "updated";
|
|
86
|
+
readonly loadedIntoAgent: "Loaded into Agent {{line}}";
|
|
85
87
|
};
|
|
86
88
|
readonly scheduled: {
|
|
87
89
|
readonly viewTitle: "Scheduled";
|
|
@@ -211,6 +213,8 @@ export declare const en: {
|
|
|
211
213
|
readonly hotkeyHint: "Hold {{key}} to talk — chat can stay closed";
|
|
212
214
|
readonly expand: "Expand";
|
|
213
215
|
readonly collapse: "Collapse";
|
|
216
|
+
readonly spawnAgent: "New agent";
|
|
217
|
+
readonly closeAgent: "Close {{label}}";
|
|
214
218
|
};
|
|
215
219
|
readonly files: {
|
|
216
220
|
readonly refreshFiles: "Refresh files";
|
|
@@ -270,6 +274,7 @@ export declare const en: {
|
|
|
270
274
|
readonly workspaceLoadError: "Couldn't load your workspace files.";
|
|
271
275
|
readonly workspaceNoFiles: "No files yet — what Belong writes in your workspace shows up here.";
|
|
272
276
|
readonly workspaceNoMatches: "No matches.";
|
|
277
|
+
readonly workspaceWaking: "Waking up your workspace — your files will appear in a moment…";
|
|
273
278
|
readonly csvEmpty: "This file is empty.";
|
|
274
279
|
readonly csvRowLimit: "Showing the first {{shown}} of {{total}} rows — download for the full file.";
|
|
275
280
|
readonly preview: "Preview";
|
|
@@ -433,6 +438,7 @@ export declare const en: {
|
|
|
433
438
|
readonly endCall: "End call";
|
|
434
439
|
readonly dismiss: "Dismiss";
|
|
435
440
|
readonly startCall: "Start voice call";
|
|
441
|
+
readonly reconnectCall: "Reconnect voice call";
|
|
436
442
|
};
|
|
437
443
|
readonly callScreen: {
|
|
438
444
|
readonly title: "Voice call";
|
|
@@ -474,6 +480,12 @@ export declare const en: {
|
|
|
474
480
|
readonly lineWorking: "working";
|
|
475
481
|
readonly lineReady: "ready";
|
|
476
482
|
readonly lineFailed: "failed";
|
|
483
|
+
readonly lineIdle: "idle";
|
|
484
|
+
readonly lineNotStarted: "not started";
|
|
485
|
+
readonly lineNoChat: "no chat yet";
|
|
486
|
+
readonly activity: "Activity";
|
|
487
|
+
readonly showConversationLog: "Show conversation log";
|
|
488
|
+
readonly hideConversationLog: "Hide conversation log";
|
|
477
489
|
readonly ambientTypingCode: "Typing code…";
|
|
478
490
|
readonly ambientReviewingDiff: "Reviewing the diff…";
|
|
479
491
|
readonly ambientRunningChecks: "Running checks…";
|
|
@@ -17,6 +17,7 @@ export declare const embedMiscEn: {
|
|
|
17
17
|
readonly workspaceLoadError: "Couldn't load your workspace files.";
|
|
18
18
|
readonly workspaceNoFiles: "No files yet — what Belong writes in your workspace shows up here.";
|
|
19
19
|
readonly workspaceNoMatches: "No matches.";
|
|
20
|
+
readonly workspaceWaking: "Waking up your workspace — your files will appear in a moment…";
|
|
20
21
|
readonly csvEmpty: "This file is empty.";
|
|
21
22
|
readonly csvRowLimit: "Showing the first {{shown}} of {{total}} rows — download for the full file.";
|
|
22
23
|
readonly preview: "Preview";
|
|
@@ -62,6 +63,7 @@ export declare const embedMiscEs: {
|
|
|
62
63
|
workspaceLoadError: string;
|
|
63
64
|
workspaceNoFiles: string;
|
|
64
65
|
workspaceNoMatches: string;
|
|
66
|
+
workspaceWaking: string;
|
|
65
67
|
csvEmpty: string;
|
|
66
68
|
csvRowLimit: string;
|
|
67
69
|
preview: string;
|
|
@@ -107,6 +109,7 @@ export declare const embedMiscPt: {
|
|
|
107
109
|
workspaceLoadError: string;
|
|
108
110
|
workspaceNoFiles: string;
|
|
109
111
|
workspaceNoMatches: string;
|
|
112
|
+
workspaceWaking: string;
|
|
110
113
|
csvEmpty: string;
|
|
111
114
|
csvRowLimit: string;
|
|
112
115
|
preview: string;
|
|
@@ -15,6 +15,8 @@ export declare const headerEn: {
|
|
|
15
15
|
readonly hotkeyHint: "Hold {{key}} to talk — chat can stay closed";
|
|
16
16
|
readonly expand: "Expand";
|
|
17
17
|
readonly collapse: "Collapse";
|
|
18
|
+
readonly spawnAgent: "New agent";
|
|
19
|
+
readonly closeAgent: "Close {{label}}";
|
|
18
20
|
};
|
|
19
21
|
};
|
|
20
22
|
export declare const headerEs: {
|
|
@@ -33,6 +35,8 @@ export declare const headerEs: {
|
|
|
33
35
|
hotkeyHint: string;
|
|
34
36
|
expand: string;
|
|
35
37
|
collapse: string;
|
|
38
|
+
spawnAgent: string;
|
|
39
|
+
closeAgent: string;
|
|
36
40
|
};
|
|
37
41
|
};
|
|
38
42
|
export declare const headerPt: {
|
|
@@ -51,5 +55,7 @@ export declare const headerPt: {
|
|
|
51
55
|
hotkeyHint: string;
|
|
52
56
|
expand: string;
|
|
53
57
|
collapse: string;
|
|
58
|
+
spawnAgent: string;
|
|
59
|
+
closeAgent: string;
|
|
54
60
|
};
|
|
55
61
|
};
|
|
@@ -18,6 +18,7 @@ export declare const sessionsEn: {
|
|
|
18
18
|
readonly noSessionsYet: "No sessions yet.";
|
|
19
19
|
readonly untitledSession: "Untitled session";
|
|
20
20
|
readonly updated: "updated";
|
|
21
|
+
readonly loadedIntoAgent: "Loaded into Agent {{line}}";
|
|
21
22
|
};
|
|
22
23
|
};
|
|
23
24
|
export declare const sessionsEs: {
|
|
@@ -39,6 +40,7 @@ export declare const sessionsEs: {
|
|
|
39
40
|
noSessionsYet: string;
|
|
40
41
|
untitledSession: string;
|
|
41
42
|
updated: string;
|
|
43
|
+
loadedIntoAgent: string;
|
|
42
44
|
};
|
|
43
45
|
};
|
|
44
46
|
export declare const sessionsPt: {
|
|
@@ -60,5 +62,6 @@ export declare const sessionsPt: {
|
|
|
60
62
|
noSessionsYet: string;
|
|
61
63
|
untitledSession: string;
|
|
62
64
|
updated: string;
|
|
65
|
+
loadedIntoAgent: string;
|
|
63
66
|
};
|
|
64
67
|
};
|
|
@@ -57,6 +57,7 @@ export declare const streamEn: {
|
|
|
57
57
|
readonly executingTasks: "Working on it…";
|
|
58
58
|
readonly workedSteps_one: "Worked · {{count}} step";
|
|
59
59
|
readonly workedSteps_other: "Worked · {{count}} steps";
|
|
60
|
+
readonly resumingAfterPause: "Taking longer than expected — picking it back up…";
|
|
60
61
|
readonly open: "Open";
|
|
61
62
|
readonly reconnectNeeded: "The {{provider}} session needs reconnecting to continue.";
|
|
62
63
|
readonly reconnect: "Reconnect";
|
|
@@ -116,6 +117,7 @@ export declare const streamEs: {
|
|
|
116
117
|
executingTasks: string;
|
|
117
118
|
workedSteps_one: string;
|
|
118
119
|
workedSteps_other: string;
|
|
120
|
+
resumingAfterPause: string;
|
|
119
121
|
open: string;
|
|
120
122
|
reconnectNeeded: string;
|
|
121
123
|
reconnect: string;
|
|
@@ -175,6 +177,7 @@ export declare const streamPt: {
|
|
|
175
177
|
executingTasks: string;
|
|
176
178
|
workedSteps_one: string;
|
|
177
179
|
workedSteps_other: string;
|
|
180
|
+
resumingAfterPause: string;
|
|
178
181
|
open: string;
|
|
179
182
|
reconnectNeeded: string;
|
|
180
183
|
reconnect: string;
|
|
@@ -410,18 +410,22 @@ export declare const wireStreamPartSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
410
410
|
data: z.ZodObject<{
|
|
411
411
|
status: z.ZodEnum<["continuing", "completed", "cancelled", "failed", "throttled"]>;
|
|
412
412
|
message: z.ZodOptional<z.ZodString>;
|
|
413
|
+
retryable: z.ZodOptional<z.ZodBoolean>;
|
|
413
414
|
}, "strip", z.ZodTypeAny, {
|
|
414
415
|
status: "completed" | "failed" | "cancelled" | "continuing" | "throttled";
|
|
415
416
|
message?: string | undefined;
|
|
417
|
+
retryable?: boolean | undefined;
|
|
416
418
|
}, {
|
|
417
419
|
status: "completed" | "failed" | "cancelled" | "continuing" | "throttled";
|
|
418
420
|
message?: string | undefined;
|
|
421
|
+
retryable?: boolean | undefined;
|
|
419
422
|
}>;
|
|
420
423
|
}, "strip", z.ZodTypeAny, {
|
|
421
424
|
id: string;
|
|
422
425
|
data: {
|
|
423
426
|
status: "completed" | "failed" | "cancelled" | "continuing" | "throttled";
|
|
424
427
|
message?: string | undefined;
|
|
428
|
+
retryable?: boolean | undefined;
|
|
425
429
|
};
|
|
426
430
|
type: "data-status";
|
|
427
431
|
}, {
|
|
@@ -429,6 +433,7 @@ export declare const wireStreamPartSchema: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
429
433
|
data: {
|
|
430
434
|
status: "completed" | "failed" | "cancelled" | "continuing" | "throttled";
|
|
431
435
|
message?: string | undefined;
|
|
436
|
+
retryable?: boolean | undefined;
|
|
432
437
|
};
|
|
433
438
|
type: "data-status";
|
|
434
439
|
}>, z.ZodObject<{
|
|
@@ -667,6 +672,22 @@ export declare const RECONNECT_MAX_CONSECUTIVE_FAILURES = 10;
|
|
|
667
672
|
* instead — the same discipline browser/control-channel.ts already applies.
|
|
668
673
|
*/
|
|
669
674
|
export declare const STALL_TIMEOUT_MS = 30000;
|
|
675
|
+
/**
|
|
676
|
+
* How long a retryable terminal (`data-status {status:"failed",
|
|
677
|
+
* retryable:true}` — a turn-deadline abort whose task WILL be reactivated on
|
|
678
|
+
* the same run/stream) may sit with no subsequent delivered event before the
|
|
679
|
+
* transport stops waiting and promotes it to a real failure. Reactivation is
|
|
680
|
+
* normally near-instant (the post-drain outbox recheck fires as the aborted
|
|
681
|
+
* drain settles) but the resumed turn can take a while to emit its first
|
|
682
|
+
* event (sandbox boot, transcript hydrate); the fleet-wide outbox sweep is
|
|
683
|
+
* the slowest legitimate path (≤60s period + ~30s first event). Without this
|
|
684
|
+
* bound a run that never resumes would hold the connection open forever —
|
|
685
|
+
* the server's 15s keepalives feed the stall watchdog, so no drop ever
|
|
686
|
+
* occurs and the composer stays wedged. Kept ≤ the persisted-cursor
|
|
687
|
+
* freshness window (stream-state-store RESUME_MAX_AGE_MS, 120s) so a reload
|
|
688
|
+
* anywhere inside an armed grace can still resume the run cursor.
|
|
689
|
+
*/
|
|
690
|
+
export declare const RESUME_GRACE_MS = 120000;
|
|
670
691
|
export type BelongChatTransportOptions = {
|
|
671
692
|
/** Belong cloud base URL, e.g. `http://localhost:8787`. */
|
|
672
693
|
readonly apiBaseUrl: string;
|
|
@@ -680,6 +701,11 @@ export type BelongChatTransportOptions = {
|
|
|
680
701
|
* production uses `STALL_TIMEOUT_MS`.
|
|
681
702
|
*/
|
|
682
703
|
readonly stallTimeoutMs?: number;
|
|
704
|
+
/**
|
|
705
|
+
* Retryable-terminal grace override (§25). Tests shrink it to tens of ms;
|
|
706
|
+
* production uses `RESUME_GRACE_MS`.
|
|
707
|
+
*/
|
|
708
|
+
readonly resumeGraceMs?: number;
|
|
683
709
|
/**
|
|
684
710
|
* Workspace isolation: the host workspace this transport's session belongs
|
|
685
711
|
* to. Defaults to the CURRENT scope at construction — captured once, so a
|
|
@@ -147,6 +147,14 @@ export type ArtifactData = {
|
|
|
147
147
|
export type StatusData = {
|
|
148
148
|
readonly status: RunStatusKind;
|
|
149
149
|
readonly message?: string | undefined;
|
|
150
|
+
/**
|
|
151
|
+
* Resume promise on a "failed" status: the backend verified the session
|
|
152
|
+
* still has pending work, so outbox recovery will reactivate the task and
|
|
153
|
+
* keep streaming into the SAME run/stream. The transport keeps its cursor
|
|
154
|
+
* open on it (no finalize) and the renderer shows a quiet "picking it back
|
|
155
|
+
* up" pill instead of a scary failure badge.
|
|
156
|
+
*/
|
|
157
|
+
readonly retryable?: boolean | undefined;
|
|
150
158
|
};
|
|
151
159
|
/**
|
|
152
160
|
* F3 — per-turn token usage + compaction context. Emitted once per turn at
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The ONE seam that turns a `data-navigation` part into a host route-handler
|
|
3
|
+
* call — shared by the foreground renderer (`ai-sdk-part-renderers.tsx`'s
|
|
4
|
+
* `NavigationRenderer`) and a BACKGROUND line's run reader
|
|
5
|
+
* (`voice/line-run-reader.ts`), so a navigation the model dispatches on a
|
|
6
|
+
* background agent actually reaches the host instead of being silently
|
|
7
|
+
* dropped (a background line has no renderer to pick it up).
|
|
8
|
+
*
|
|
9
|
+
* Every failure mode (no handler registered, the handler throwing, the
|
|
10
|
+
* handler resolving `{ ok: false }`) collapses to one of three outcomes —
|
|
11
|
+
* never a throw — so both call sites can treat this as a plain result.
|
|
12
|
+
*/
|
|
13
|
+
export type RouteDispatchOutcome = "ok" | "failed" | "no_handler";
|
|
14
|
+
export declare const dispatchRouteNavigation: (data: {
|
|
15
|
+
readonly routeName: string;
|
|
16
|
+
readonly params: Readonly<Record<string, string>>;
|
|
17
|
+
}) => Promise<RouteDispatchOutcome>;
|
|
@@ -45,7 +45,8 @@ export type PersistedStreamState = z.infer<typeof streamStateSchema>;
|
|
|
45
45
|
* is demoted off the live run cursor.
|
|
46
46
|
*/
|
|
47
47
|
export declare const readStreamState: (workspaceId?: string | null) => PersistedStreamState | null;
|
|
48
|
-
export
|
|
48
|
+
export type StreamStateWriteMode = "select" | "select_if_empty" | "preserve_selection";
|
|
49
|
+
export declare const writeStreamState: (state: Omit<PersistedStreamState, "updatedAt">, workspaceId?: string | null, mode?: StreamStateWriteMode) => void;
|
|
49
50
|
/**
|
|
50
51
|
* Clear THIS TAB's pointer (New chat). Removes only the per-tab sessionStorage
|
|
51
52
|
* record and marks the tab "seeded" so a reload stays blank instead of
|
|
@@ -63,11 +64,11 @@ export declare const clearStreamState: (workspaceId?: string | null) => void;
|
|
|
63
64
|
*/
|
|
64
65
|
export declare const readResumableStreamState: (workspaceId?: string | null) => PersistedStreamState | null;
|
|
65
66
|
/**
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
67
|
+
* Select one Session (sessions menu switch / new). A Session with a live cursor
|
|
68
|
+
* parked by this tab restores that cursor so the next ChatRoute mount resumes
|
|
69
|
+
* its working run. Historical/terminal Sessions restore from history with no
|
|
70
|
+
* run cursor. Passing null clears only the selected pointer; parked live runs
|
|
71
|
+
* remain available when the user comes back to them.
|
|
71
72
|
*/
|
|
72
73
|
export declare const setActiveSessionId: (sessionId: string | null) => void;
|
|
73
74
|
/**
|
package/dist/types/public.d.ts
CHANGED
|
@@ -259,8 +259,10 @@ export type BelongGlobal = {
|
|
|
259
259
|
readonly __forceAgentLines?: (lines: readonly {
|
|
260
260
|
line: number;
|
|
261
261
|
label: string;
|
|
262
|
-
status: "working" | "ready" | "failed" | "needs_approval";
|
|
262
|
+
status: "idle" | "working" | "ready" | "failed" | "needs_approval";
|
|
263
263
|
sessionId?: string;
|
|
264
|
+
currentStepLabel?: string;
|
|
265
|
+
currentPhase?: "coding" | "files" | "actions";
|
|
264
266
|
}[]) => void;
|
|
265
267
|
};
|
|
266
268
|
declare global {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@belonguniverseai/react-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Belong — embeddable React AI assistant dock. Mount <BelongWidget> in your app tree with getToken dependency-injection auth.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The host page's canonical origin — the BEL-111 `universeOrigin` component
|
|
3
|
-
* prop. The dock's cross-origin navigation rebasing (`browser/spa-navigate.ts`)
|
|
4
|
-
* and the cross-origin block in `browser/dom-bridge.ts` treat this as "the host
|
|
5
|
-
* app's origin": a URL on a DIFFERENT origin is foreign (blocked / left for a
|
|
6
|
-
* full load), and same-app env variants (prod↔stage) are rebased onto it.
|
|
7
|
-
*
|
|
8
|
-
* A single source so every branch agrees — reading `globalThis.location`
|
|
9
|
-
* directly in some branches and a configured value in others would rebase
|
|
10
|
-
* inconsistently. When unset it defaults to the live page origin, so the
|
|
11
|
-
* script-tag embed and any host that never passes `universeOrigin` behave
|
|
12
|
-
* exactly as before.
|
|
13
|
-
*/
|
|
14
|
-
/** Register the host's canonical origin. Null / empty clears it (→ live origin). */
|
|
15
|
-
export declare const setUniverseOrigin: (origin: string | null | undefined) => void;
|
|
16
|
-
/** The configured universe origin string, or the live page origin when unset. */
|
|
17
|
-
export declare const getUniverseOrigin: () => string;
|
|
18
|
-
/**
|
|
19
|
-
* The universe origin as a `URL` (for `.origin` + `.hostname`), or null when it
|
|
20
|
-
* isn't a parseable absolute origin (e.g. a sandboxed `"null"` origin). Callers
|
|
21
|
-
* treat null as "can't tell" and fall back to leaving the URL untouched /
|
|
22
|
-
* refusing a client-side nav — matching the pre-existing safe defaults.
|
|
23
|
-
*/
|
|
24
|
-
export declare const getUniverseUrl: () => URL | null;
|