@oxy-hq/sdk 2.12.0 → 2.13.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/dist/index.cjs +62 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +163 -2
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +163 -2
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +62 -2
- package/dist/index.mjs.map +1 -1
- package/dist/{react-DcT-mUPj.cjs → react-CkAQg9wB.cjs} +65 -5
- package/dist/react-CkAQg9wB.cjs.map +1 -0
- package/dist/{react-BXGyzgz0.mjs → react-Cq3xULOr.mjs} +65 -5
- package/dist/react-Cq3xULOr.mjs.map +1 -0
- package/dist/{react-DW7Z96sD.d.mts → react-D-Sf973d.d.cts} +87 -2
- package/dist/react-D-Sf973d.d.cts.map +1 -0
- package/dist/{react-DW7Z96sD.d.cts → react-D-Sf973d.d.mts} +87 -2
- package/dist/react-D-Sf973d.d.mts.map +1 -0
- package/dist/shell.cjs +35 -1
- package/dist/shell.cjs.map +1 -1
- package/dist/shell.d.cts +25 -2
- package/dist/shell.d.cts.map +1 -1
- package/dist/shell.d.mts +25 -2
- package/dist/shell.d.mts.map +1 -1
- package/dist/shell.mjs +34 -2
- package/dist/shell.mjs.map +1 -1
- package/package.json +2 -2
- package/dist/react-BXGyzgz0.mjs.map +0 -1
- package/dist/react-DW7Z96sD.d.cts.map +0 -1
- package/dist/react-DW7Z96sD.d.mts.map +0 -1
- package/dist/react-DcT-mUPj.cjs.map +0 -1
package/dist/shell.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { a as AppFetcher, n as AgentRunEvent } from "./react-
|
|
2
|
+
import { a as AppFetcher, n as AgentRunEvent } from "./react-D-Sf973d.cjs";
|
|
3
3
|
import { _ as OxyReach } from "./function-context-D8eyZuw_.cjs";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { ReactNode } from "react";
|
|
@@ -229,10 +229,12 @@ interface ShellContextData {
|
|
|
229
229
|
/** Product-surface navigation targets, host-aware. `settings` opens the
|
|
230
230
|
* Unified Settings Dialog via the SPA's `?settings=<section>` deep link
|
|
231
231
|
* (optional: absent on servers older than the link). */
|
|
232
|
+
/** `login` is the product's login page, for `signOut()`; absent on a server that predates it. */
|
|
232
233
|
links: {
|
|
233
234
|
home: string;
|
|
234
235
|
threads: string;
|
|
235
236
|
settings?: string;
|
|
237
|
+
login?: string;
|
|
236
238
|
};
|
|
237
239
|
/** Viewer display identity; null on unauthenticated/local modes. */
|
|
238
240
|
user: ShellContextUser | null;
|
|
@@ -284,6 +286,27 @@ interface ViewerIdentity {
|
|
|
284
286
|
* edit what it renders, and the function's `ctx.user.reach` is the gate.
|
|
285
287
|
*/
|
|
286
288
|
declare function useIdentity(): ViewerIdentity;
|
|
289
|
+
/**
|
|
290
|
+
* Where a signed-out person lands: the product's login page, with this app
|
|
291
|
+
* as the place to come back to.
|
|
292
|
+
*
|
|
293
|
+
* `loginUrl` is `links.login` from the shell context — the product host's,
|
|
294
|
+
* which a custom-app subdomain cannot derive — and `/login` on the current
|
|
295
|
+
* origin when the context is unavailable or the server predates the field.
|
|
296
|
+
* `returnTo` is the app's own address, which it knows legitimately.
|
|
297
|
+
*/
|
|
298
|
+
declare function signOutUrl(loginUrl: string | null | undefined, returnTo: string): string;
|
|
299
|
+
/**
|
|
300
|
+
* End the platform session, then leave for the login page.
|
|
301
|
+
*
|
|
302
|
+
* `GET /api/logout` clears the session cookie server-side. That is the same
|
|
303
|
+
* cookie a crew member's PIN session rides, so on an enrolled tablet the login
|
|
304
|
+
* page comes back as "Who's on shift?" and returns to the app after the next
|
|
305
|
+
* PIN; elsewhere it is the ordinary sign-in. Throws when the server refused,
|
|
306
|
+
* so a caller can say so rather than navigate away from a session that still
|
|
307
|
+
* exists. Pass the app's `fetcher` from `useOxyApp()` so credentials ride.
|
|
308
|
+
*/
|
|
309
|
+
declare function signOut(fetcher: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>, loginUrl?: string | null, returnTo?: string): Promise<void>;
|
|
287
310
|
//#endregion
|
|
288
311
|
//#region src/shell/Tooltip.d.ts
|
|
289
312
|
/**
|
|
@@ -374,5 +397,5 @@ declare function WorkspaceTile({ name, logoUrl }: {
|
|
|
374
397
|
logoUrl?: string;
|
|
375
398
|
}): import("react").JSX.Element;
|
|
376
399
|
//#endregion
|
|
377
|
-
export { AnswerChart, type AnswerChartProps, AskDock, type AskDockProps, Breadcrumb, type ChartBlock, type ChartBlockConfig, OXY_MARK_PATH, OxyMark, OxyShell, type OxyShellProps, OxygenFactoryMark, type RailItem, ReasoningTrace, type ReasoningTraceProps, type ShellContextApp, type ShellContextData, type ShellContextUser, ShellRail, ShellTooltip, SystemIndicator, type ThreadSummary, type ThreadTranscript, TopBar, type TraceItem, type TraceStep, type TraceStepStatus, type TranscriptTurn, type UseShellContextResult, type UseThreadHistoryResult, type ViewerIdentity, WorkspaceClock, WorkspaceTile, buildTraceSteps, fetchThreadTranscript, useIdentity, useShellContext, useThreadHistory, workspaceLogoUrl };
|
|
400
|
+
export { AnswerChart, type AnswerChartProps, AskDock, type AskDockProps, Breadcrumb, type ChartBlock, type ChartBlockConfig, OXY_MARK_PATH, OxyMark, OxyShell, type OxyShellProps, OxygenFactoryMark, type RailItem, ReasoningTrace, type ReasoningTraceProps, type ShellContextApp, type ShellContextData, type ShellContextUser, ShellRail, ShellTooltip, SystemIndicator, type ThreadSummary, type ThreadTranscript, TopBar, type TraceItem, type TraceStep, type TraceStepStatus, type TranscriptTurn, type UseShellContextResult, type UseThreadHistoryResult, type ViewerIdentity, WorkspaceClock, WorkspaceTile, buildTraceSteps, fetchThreadTranscript, signOut, signOutUrl, useIdentity, useShellContext, useThreadHistory, workspaceLogoUrl };
|
|
378
401
|
//# sourceMappingURL=shell.d.cts.map
|
package/dist/shell.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shell.d.cts","names":[],"sources":["../src/shell/AnswerChart.tsx","../src/shell/AskDock.tsx","../src/shell/logoUrl.ts","../src/shell/marks.tsx","../src/shell/OxyShell.tsx","../src/shell/trace.ts","../src/shell/ReasoningTrace.tsx","../src/shell/ShellRail.tsx","../src/shell/shellContext.ts","../src/shell/Tooltip.tsx","../src/shell/TopBar.tsx","../src/shell/threadHistory.ts","../src/shell/WorkspaceTile.tsx"],"mappings":";;;;;;UAYiB;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;UAGe;EACf,QAAQ;EACR;EACA;;UA8ce;EACf,OAAO;EACP;;;;;iBAMc,cAAc,OAAO,aAAa,mBAAgB,MAAA,IAAA;;;UCzUjD;;EAEf;;EAEA;;EAEA;;EAEA;EACA;EACA;EACA;;;;;;iBAuEc,UACd,SACA,eACA,aACA,aACA,MACA,SACA,aACC,eAAY,MAAA,IAAA;;;;;;;;cC7PF,mBAAgB,oBAAsB,qBAAqB;;;;cCA3D;;;iBAKG,UAAU;EAAe;oBAAoB,IAAA;;;;;;iBAyB7C,oBAAoB;EAAe;oBAAoB,IAAA;;;UC+BtD;EACf,UAAU;;EAEV;;;;;EAKA,aAAa;;;EAGb,cAAc;;;EAGd,aAAa;;EAEb;;;EAGA;;;;;;;;EAQA;EACA;;;;;EAKA;;;;EAIA;;;;;;iBAsDc,WACd,UACA,WACA,YACA,aACA,YACA,YACA,WACA,gBACA,WACA,kBACA,oBACC,gCAAa,IAAA;;;KC9JJ;UAEK;EACf;EACA;EACA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;EACA;EACA;;UAGe;EACf;EACA;EACA;EACA,QAAQ;EACR,OAAO;;;;iBA8IO,gBAAgB,QAAQ,kBAAkB;;;UCvDzC;EACf,OAAO;;EAEP;;EAEA;IAAQ;IAAe;;EACvB;;;;iBAKc,iBAAiB,OAAO,WAAmB,KAAK,aAAa,sCAAmB,IAAA;;;;;;;KCxHpF;EACV;EACA;;;EAGA;EACA;EACA;EACA,OAAO;EACP;EACA;EACA;EACA;;;;;;;iBAuDc,YACd,KACA,QACA,aACA,QACA;EAEA,MAAM;EACN,QAAQ;EACR,cAAc;EACd,SAAS;EACT;oBACD,IAAA;;;UC7EgB;EACf;EACA;EACA;;EAEA;EACA;;;EAGA;;EAEA;;UAGe;EACf;IAAa;IAAY;;EACzB;IAAO;IAAY;IAAc;;;EAEjC;;EAEA,MAAM
|
|
1
|
+
{"version":3,"file":"shell.d.cts","names":[],"sources":["../src/shell/AnswerChart.tsx","../src/shell/AskDock.tsx","../src/shell/logoUrl.ts","../src/shell/marks.tsx","../src/shell/OxyShell.tsx","../src/shell/trace.ts","../src/shell/ReasoningTrace.tsx","../src/shell/ShellRail.tsx","../src/shell/shellContext.ts","../src/shell/Tooltip.tsx","../src/shell/TopBar.tsx","../src/shell/threadHistory.ts","../src/shell/WorkspaceTile.tsx"],"mappings":";;;;;;UAYiB;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;UAGe;EACf,QAAQ;EACR;EACA;;UA8ce;EACf,OAAO;EACP;;;;;iBAMc,cAAc,OAAO,aAAa,mBAAgB,MAAA,IAAA;;;UCzUjD;;EAEf;;EAEA;;EAEA;;EAEA;EACA;EACA;EACA;;;;;;iBAuEc,UACd,SACA,eACA,aACA,aACA,MACA,SACA,aACC,eAAY,MAAA,IAAA;;;;;;;;cC7PF,mBAAgB,oBAAsB,qBAAqB;;;;cCA3D;;;iBAKG,UAAU;EAAe;oBAAoB,IAAA;;;;;;iBAyB7C,oBAAoB;EAAe;oBAAoB,IAAA;;;UC+BtD;EACf,UAAU;;EAEV;;;;;EAKA,aAAa;;;EAGb,cAAc;;;EAGd,aAAa;;EAEb;;;EAGA;;;;;;;;EAQA;EACA;;;;;EAKA;;;;EAIA;;;;;;iBAsDc,WACd,UACA,WACA,YACA,aACA,YACA,YACA,WACA,gBACA,WACA,kBACA,oBACC,gCAAa,IAAA;;;KC9JJ;UAEK;EACf;EACA;EACA;;EAEA;;EAEA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A,QAAQ;;UAGO;EACf;EACA,OAAO;;UAGQ;EACf,SAAS;EACT;EACA,OAAO;;EAEP;;;;;;;iBAQc,oBAAoB;;;;;iBAyCd,sBACpB,SAAS,YACT,mBACA,mBACC,QAAQ;;;;;;iBCnFK,gBAAgB,MAAM;EAAa;EAAc;oBAAkB,IAAA"}
|
package/dist/shell.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { a as AppFetcher, n as AgentRunEvent } from "./react-
|
|
2
|
+
import { a as AppFetcher, n as AgentRunEvent } from "./react-D-Sf973d.mjs";
|
|
3
3
|
import { _ as OxyReach } from "./function-context-D8eyZuw_.mjs";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { ReactNode } from "react";
|
|
@@ -229,10 +229,12 @@ interface ShellContextData {
|
|
|
229
229
|
/** Product-surface navigation targets, host-aware. `settings` opens the
|
|
230
230
|
* Unified Settings Dialog via the SPA's `?settings=<section>` deep link
|
|
231
231
|
* (optional: absent on servers older than the link). */
|
|
232
|
+
/** `login` is the product's login page, for `signOut()`; absent on a server that predates it. */
|
|
232
233
|
links: {
|
|
233
234
|
home: string;
|
|
234
235
|
threads: string;
|
|
235
236
|
settings?: string;
|
|
237
|
+
login?: string;
|
|
236
238
|
};
|
|
237
239
|
/** Viewer display identity; null on unauthenticated/local modes. */
|
|
238
240
|
user: ShellContextUser | null;
|
|
@@ -284,6 +286,27 @@ interface ViewerIdentity {
|
|
|
284
286
|
* edit what it renders, and the function's `ctx.user.reach` is the gate.
|
|
285
287
|
*/
|
|
286
288
|
declare function useIdentity(): ViewerIdentity;
|
|
289
|
+
/**
|
|
290
|
+
* Where a signed-out person lands: the product's login page, with this app
|
|
291
|
+
* as the place to come back to.
|
|
292
|
+
*
|
|
293
|
+
* `loginUrl` is `links.login` from the shell context — the product host's,
|
|
294
|
+
* which a custom-app subdomain cannot derive — and `/login` on the current
|
|
295
|
+
* origin when the context is unavailable or the server predates the field.
|
|
296
|
+
* `returnTo` is the app's own address, which it knows legitimately.
|
|
297
|
+
*/
|
|
298
|
+
declare function signOutUrl(loginUrl: string | null | undefined, returnTo: string): string;
|
|
299
|
+
/**
|
|
300
|
+
* End the platform session, then leave for the login page.
|
|
301
|
+
*
|
|
302
|
+
* `GET /api/logout` clears the session cookie server-side. That is the same
|
|
303
|
+
* cookie a crew member's PIN session rides, so on an enrolled tablet the login
|
|
304
|
+
* page comes back as "Who's on shift?" and returns to the app after the next
|
|
305
|
+
* PIN; elsewhere it is the ordinary sign-in. Throws when the server refused,
|
|
306
|
+
* so a caller can say so rather than navigate away from a session that still
|
|
307
|
+
* exists. Pass the app's `fetcher` from `useOxyApp()` so credentials ride.
|
|
308
|
+
*/
|
|
309
|
+
declare function signOut(fetcher: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>, loginUrl?: string | null, returnTo?: string): Promise<void>;
|
|
287
310
|
//#endregion
|
|
288
311
|
//#region src/shell/Tooltip.d.ts
|
|
289
312
|
/**
|
|
@@ -374,5 +397,5 @@ declare function WorkspaceTile({ name, logoUrl }: {
|
|
|
374
397
|
logoUrl?: string;
|
|
375
398
|
}): import("react").JSX.Element;
|
|
376
399
|
//#endregion
|
|
377
|
-
export { AnswerChart, type AnswerChartProps, AskDock, type AskDockProps, Breadcrumb, type ChartBlock, type ChartBlockConfig, OXY_MARK_PATH, OxyMark, OxyShell, type OxyShellProps, OxygenFactoryMark, type RailItem, ReasoningTrace, type ReasoningTraceProps, type ShellContextApp, type ShellContextData, type ShellContextUser, ShellRail, ShellTooltip, SystemIndicator, type ThreadSummary, type ThreadTranscript, TopBar, type TraceItem, type TraceStep, type TraceStepStatus, type TranscriptTurn, type UseShellContextResult, type UseThreadHistoryResult, type ViewerIdentity, WorkspaceClock, WorkspaceTile, buildTraceSteps, fetchThreadTranscript, useIdentity, useShellContext, useThreadHistory, workspaceLogoUrl };
|
|
400
|
+
export { AnswerChart, type AnswerChartProps, AskDock, type AskDockProps, Breadcrumb, type ChartBlock, type ChartBlockConfig, OXY_MARK_PATH, OxyMark, OxyShell, type OxyShellProps, OxygenFactoryMark, type RailItem, ReasoningTrace, type ReasoningTraceProps, type ShellContextApp, type ShellContextData, type ShellContextUser, ShellRail, ShellTooltip, SystemIndicator, type ThreadSummary, type ThreadTranscript, TopBar, type TraceItem, type TraceStep, type TraceStepStatus, type TranscriptTurn, type UseShellContextResult, type UseThreadHistoryResult, type ViewerIdentity, WorkspaceClock, WorkspaceTile, buildTraceSteps, fetchThreadTranscript, signOut, signOutUrl, useIdentity, useShellContext, useThreadHistory, workspaceLogoUrl };
|
|
378
401
|
//# sourceMappingURL=shell.d.mts.map
|
package/dist/shell.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shell.d.mts","names":[],"sources":["../src/shell/AnswerChart.tsx","../src/shell/AskDock.tsx","../src/shell/logoUrl.ts","../src/shell/marks.tsx","../src/shell/OxyShell.tsx","../src/shell/trace.ts","../src/shell/ReasoningTrace.tsx","../src/shell/ShellRail.tsx","../src/shell/shellContext.ts","../src/shell/Tooltip.tsx","../src/shell/TopBar.tsx","../src/shell/threadHistory.ts","../src/shell/WorkspaceTile.tsx"],"mappings":";;;;;;UAYiB;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;UAGe;EACf,QAAQ;EACR;EACA;;UA8ce;EACf,OAAO;EACP;;;;;iBAMc,cAAc,OAAO,aAAa,mBAAgB,MAAA,IAAA;;;UCzUjD;;EAEf;;EAEA;;EAEA;;EAEA;EACA;EACA;EACA;;;;;;iBAuEc,UACd,SACA,eACA,aACA,aACA,MACA,SACA,aACC,eAAY,MAAA,IAAA;;;;;;;;cC7PF,mBAAgB,oBAAsB,qBAAqB;;;;cCA3D;;;iBAKG,UAAU;EAAe;oBAAoB,IAAA;;;;;;iBAyB7C,oBAAoB;EAAe;oBAAoB,IAAA;;;UC+BtD;EACf,UAAU;;EAEV;;;;;EAKA,aAAa;;;EAGb,cAAc;;;EAGd,aAAa;;EAEb;;;EAGA;;;;;;;;EAQA;EACA;;;;;EAKA;;;;EAIA;;;;;;iBAsDc,WACd,UACA,WACA,YACA,aACA,YACA,YACA,WACA,gBACA,WACA,kBACA,oBACC,gCAAa,IAAA;;;KC9JJ;UAEK;EACf;EACA;EACA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;EACA;EACA;;UAGe;EACf;EACA;EACA;EACA,QAAQ;EACR,OAAO;;;;iBA8IO,gBAAgB,QAAQ,kBAAkB;;;UCvDzC;EACf,OAAO;;EAEP;;EAEA;IAAQ;IAAe;;EACvB;;;;iBAKc,iBAAiB,OAAO,WAAmB,KAAK,aAAa,sCAAmB,IAAA;;;;;;;KCxHpF;EACV;EACA;;;EAGA;EACA;EACA;EACA,OAAO;EACP;EACA;EACA;EACA;;;;;;;iBAuDc,YACd,KACA,QACA,aACA,QACA;EAEA,MAAM;EACN,QAAQ;EACR,cAAc;EACd,SAAS;EACT;oBACD,IAAA;;;UC7EgB;EACf;EACA;EACA;;EAEA;EACA;;;EAGA;;EAEA;;UAGe;EACf;IAAa;IAAY;;EACzB;IAAO;IAAY;IAAc;;;EAEjC;;EAEA,MAAM
|
|
1
|
+
{"version":3,"file":"shell.d.mts","names":[],"sources":["../src/shell/AnswerChart.tsx","../src/shell/AskDock.tsx","../src/shell/logoUrl.ts","../src/shell/marks.tsx","../src/shell/OxyShell.tsx","../src/shell/trace.ts","../src/shell/ReasoningTrace.tsx","../src/shell/ShellRail.tsx","../src/shell/shellContext.ts","../src/shell/Tooltip.tsx","../src/shell/TopBar.tsx","../src/shell/threadHistory.ts","../src/shell/WorkspaceTile.tsx"],"mappings":";;;;;;UAYiB;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;UAGe;EACf,QAAQ;EACR;EACA;;UA8ce;EACf,OAAO;EACP;;;;;iBAMc,cAAc,OAAO,aAAa,mBAAgB,MAAA,IAAA;;;UCzUjD;;EAEf;;EAEA;;EAEA;;EAEA;EACA;EACA;EACA;;;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;;;;;;;;;;iBAuBf,WAAW,qCAAqC;;;;;;;;;;;iBAgB1C,QACpB,UAAU,OAAO,cAAc,KAAK,OAAO,gBAAgB,QAAQ,WACnE,0BACA,oBACC;;;;;;;;iBC7Ka,eACd,SACA,MACA;EAEA,SAAS,MAAM;EACf;EACA,UAAU,MAAM;IACjB,MAAA,IAAA;;;;;iBCNe,SACd,MACA,OACA;EAEA,OAAO;EACP,QAAQ;EACR;oBACD,IAAA;;;;;;iBAqBe,aACd,gBACA,WACA,UACA;EAEA;EACA;EACA;EACA;oBACD,IAAA;;;;;;;iBAmDe,mCAAe,IAAA;;;;;;iBA+Bf,iBAAiB;EAAc;oBAAmB,IAAA;;;UCrHjD;EACf;EACA;EACA;;UAGe;EACf;EACA,QAAQ;;UAGO;EACf;EACA,OAAO;;UAGQ;EACf,SAAS;EACT;EACA,OAAO;;EAEP;;;;;;;iBAQc,oBAAoB;;;;;iBAyCd,sBACpB,SAAS,YACT,mBACA,mBACC,QAAQ;;;;;;iBCnFK,gBAAgB,MAAM;EAAa;EAAc;oBAAkB,IAAA"}
|
package/dist/shell.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @oxy/sdk - TypeScript SDK for Oxy data platform
|
|
2
|
-
import { i as useAgentRun, l as useResolvedManifest, o as useOxyApp, t as OxyAnswer, v as getOxyAppLogger } from "./react-
|
|
2
|
+
import { i as useAgentRun, l as useResolvedManifest, o as useOxyApp, t as OxyAnswer, v as getOxyAppLogger } from "./react-Cq3xULOr.mjs";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { Fragment, useEffect, useMemo, useState } from "react";
|
|
5
5
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1853,6 +1853,38 @@ function useIdentity() {
|
|
|
1853
1853
|
loading
|
|
1854
1854
|
};
|
|
1855
1855
|
}
|
|
1856
|
+
/**
|
|
1857
|
+
* Where a signed-out person lands: the product's login page, with this app
|
|
1858
|
+
* as the place to come back to.
|
|
1859
|
+
*
|
|
1860
|
+
* `loginUrl` is `links.login` from the shell context — the product host's,
|
|
1861
|
+
* which a custom-app subdomain cannot derive — and `/login` on the current
|
|
1862
|
+
* origin when the context is unavailable or the server predates the field.
|
|
1863
|
+
* `returnTo` is the app's own address, which it knows legitimately.
|
|
1864
|
+
*/
|
|
1865
|
+
function signOutUrl(loginUrl, returnTo) {
|
|
1866
|
+
const base = loginUrl?.trim() ? loginUrl.trim() : "/login";
|
|
1867
|
+
return `${base}${base.includes("?") ? "&" : "?"}return_to=${encodeURIComponent(returnTo)}`;
|
|
1868
|
+
}
|
|
1869
|
+
/**
|
|
1870
|
+
* End the platform session, then leave for the login page.
|
|
1871
|
+
*
|
|
1872
|
+
* `GET /api/logout` clears the session cookie server-side. That is the same
|
|
1873
|
+
* cookie a crew member's PIN session rides, so on an enrolled tablet the login
|
|
1874
|
+
* page comes back as "Who's on shift?" and returns to the app after the next
|
|
1875
|
+
* PIN; elsewhere it is the ordinary sign-in. Throws when the server refused,
|
|
1876
|
+
* so a caller can say so rather than navigate away from a session that still
|
|
1877
|
+
* exists. Pass the app's `fetcher` from `useOxyApp()` so credentials ride.
|
|
1878
|
+
*/
|
|
1879
|
+
async function signOut(fetcher, loginUrl, returnTo) {
|
|
1880
|
+
const res = await fetcher("/api/logout", {
|
|
1881
|
+
method: "GET",
|
|
1882
|
+
credentials: "include"
|
|
1883
|
+
});
|
|
1884
|
+
if (!res.ok) throw new Error(`sign-out refused: HTTP ${res.status}`);
|
|
1885
|
+
if (typeof window === "undefined") return;
|
|
1886
|
+
window.location.assign(signOutUrl(loginUrl, returnTo ?? window.location.href));
|
|
1887
|
+
}
|
|
1856
1888
|
|
|
1857
1889
|
//#endregion
|
|
1858
1890
|
//#region src/shell/TopBar.tsx
|
|
@@ -2179,5 +2211,5 @@ function OxyShell({ children, pageLabel, topBarLeft, topBarExtra, railBottom, hi
|
|
|
2179
2211
|
}
|
|
2180
2212
|
|
|
2181
2213
|
//#endregion
|
|
2182
|
-
export { AnswerChart, AskDock, Breadcrumb, OXY_MARK_PATH, OxyMark, OxyShell, OxygenFactoryMark, ReasoningTrace, ShellRail, ShellTooltip, SystemIndicator, TopBar, WorkspaceClock, WorkspaceTile, buildTraceSteps, fetchThreadTranscript, useIdentity, useShellContext, useThreadHistory, workspaceLogoUrl };
|
|
2214
|
+
export { AnswerChart, AskDock, Breadcrumb, OXY_MARK_PATH, OxyMark, OxyShell, OxygenFactoryMark, ReasoningTrace, ShellRail, ShellTooltip, SystemIndicator, TopBar, WorkspaceClock, WorkspaceTile, buildTraceSteps, fetchThreadTranscript, signOut, signOutUrl, useIdentity, useShellContext, useThreadHistory, workspaceLogoUrl };
|
|
2183
2215
|
//# sourceMappingURL=shell.mjs.map
|