@athenaintel/react 0.10.41-rc.1 → 0.10.41
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 +96 -37
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +96 -37
- package/dist/index.js.map +1 -1
- package/dist/provider/AthenaContext.d.ts +3 -3
- package/dist/provider/AthenaProvider.d.ts +4 -2
- package/dist/provider/config.d.ts +6 -0
- package/dist/runtime/transport.d.ts +8 -0
- package/package.json +3 -3
|
@@ -5,9 +5,9 @@ export interface AthenaConfig extends Pick<AthenaProviderConfig, 'apiKey' | 'tok
|
|
|
5
5
|
backendUrl: string;
|
|
6
6
|
appUrl: string;
|
|
7
7
|
enabledToolkits: string[];
|
|
8
|
-
/** Effective chat transport
|
|
9
|
-
*
|
|
10
|
-
transport
|
|
8
|
+
/** Effective chat transport; absent means `legacy`. Optional so existing
|
|
9
|
+
* `AthenaConfig` object literals keep compiling. */
|
|
10
|
+
transport?: AthenaTransport;
|
|
11
11
|
linkClicks?: AthenaLinkClickOptions;
|
|
12
12
|
citationLinks?: AthenaCitationLinkOptions;
|
|
13
13
|
}
|
|
@@ -47,9 +47,11 @@ export interface AthenaProviderProps {
|
|
|
47
47
|
* model in this mode. */
|
|
48
48
|
transport?: AthenaTransport;
|
|
49
49
|
/** Resolve the latest auth token immediately before a request (for
|
|
50
|
-
* expiring clients). Takes priority over `token` when it resolves.
|
|
50
|
+
* expiring clients). Takes priority over `token` when it resolves.
|
|
51
|
+
* Only used when `transport` is 'statewire'. Prefer `config.getToken`. */
|
|
51
52
|
getToken?: () => string | null | Promise<string | null>;
|
|
52
|
-
/** Additional fields merged into runConfig.custom
|
|
53
|
+
/** Additional fields merged into runConfig.custom. Only used when
|
|
54
|
+
* `transport` is 'statewire'. Prefer `config.extraRunConfig`. */
|
|
53
55
|
extraRunConfig?: Record<string, unknown>;
|
|
54
56
|
/** Statewire sync base URL override (the `…/v2/threads` mount). Defaults to
|
|
55
57
|
* the effective `apiUrl` host + `/v2/threads`. Only used when `transport`
|
|
@@ -2,6 +2,12 @@ import type { AthenaEnvironment } from '../lib/athena-urls';
|
|
|
2
2
|
import type { AthenaTransport } from '../runtime/transport';
|
|
3
3
|
import type { PostHogConfig } from './PostHogProvider';
|
|
4
4
|
export interface AthenaProviderConfig {
|
|
5
|
+
/** Resolve the latest auth token immediately before a request (for expiring
|
|
6
|
+
* clients). Only used when `transport` is 'statewire'. */
|
|
7
|
+
getToken?: () => string | null | Promise<string | null>;
|
|
8
|
+
/** Additional fields merged into runConfig.custom. Only used when
|
|
9
|
+
* `transport` is 'statewire'. */
|
|
10
|
+
extraRunConfig?: Record<string, unknown>;
|
|
5
11
|
/** API key for standalone authentication when no token is provided. */
|
|
6
12
|
apiKey?: string;
|
|
7
13
|
/** PropelAuth token. Takes priority over apiKey when provided. */
|
|
@@ -24,3 +24,11 @@ export declare function resolveAthenaTransport({ transport, }: {
|
|
|
24
24
|
transport?: AthenaTransport;
|
|
25
25
|
enableThreadList?: boolean;
|
|
26
26
|
}): ResolvedAthenaTransport;
|
|
27
|
+
/**
|
|
28
|
+
* Whether a send may be dispatched while a run is already active.
|
|
29
|
+
*
|
|
30
|
+
* Statewire hosts the queue server-side, so a mid-run send is queued behind
|
|
31
|
+
* the live run. The legacy transport has no queue: a second dispatch would
|
|
32
|
+
* orphan the in-flight run and duplicate its pending placeholder.
|
|
33
|
+
*/
|
|
34
|
+
export declare function allowsMidRunSend(transport: AthenaTransport | undefined): boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@athenaintel/react",
|
|
3
|
-
"version": "0.10.41
|
|
3
|
+
"version": "0.10.41",
|
|
4
4
|
"description": "Athena React SDK — Build AI-powered chat applications with the Athena platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@assistant-ui/core": "0.3.15",
|
|
50
50
|
"@assistant-ui/react": "0.15.16",
|
|
51
51
|
"@assistant-ui/react-langgraph": "0.14.24",
|
|
52
|
-
"@assistant-ui/react-statewire": "^0.
|
|
52
|
+
"@assistant-ui/react-statewire": "^0.18.0",
|
|
53
53
|
"@assistant-ui/tap": "0.9.14",
|
|
54
54
|
"@floating-ui/react": "^0.27.7",
|
|
55
55
|
"@tanstack/react-query": "5.99.2",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"cnfast": "0.0.8",
|
|
71
71
|
"lucide-react": "^0.575.0",
|
|
72
72
|
"radix-ui": "^1.4.3",
|
|
73
|
-
"statewire": "^0.
|
|
73
|
+
"statewire": "^0.10.0",
|
|
74
74
|
"tiptap-markdown": "^0.9.0",
|
|
75
75
|
"zod": "^3.24.0",
|
|
76
76
|
"zustand": "^5.0.11"
|