@percena/weft 0.4.0-next.4 → 0.4.0-next.6
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/chat.cjs +7 -883
- package/dist/chat.d.cts +13 -13
- package/dist/chat.d.ts +13 -13
- package/dist/chat.js +7 -883
- package/dist/index.cjs +96 -103
- package/dist/index.js +96 -103
- package/dist/providers-flitro.cjs +2 -276
- package/dist/providers-flitro.d.cts +2 -1
- package/dist/providers-flitro.d.ts +2 -1
- package/dist/providers-flitro.js +1 -260
- package/dist/styles/fonts/KaTeX_AMS-Regular.ttf +0 -0
- package/dist/styles/fonts/KaTeX_AMS-Regular.woff +0 -0
- package/dist/styles/fonts/KaTeX_AMS-Regular.woff2 +0 -0
- package/dist/styles/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
- package/dist/styles/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
- package/dist/styles/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
- package/dist/styles/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
- package/dist/styles/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
- package/dist/styles/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
- package/dist/styles/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
- package/dist/styles/fonts/KaTeX_Fraktur-Bold.woff +0 -0
- package/dist/styles/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
- package/dist/styles/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
- package/dist/styles/fonts/KaTeX_Fraktur-Regular.woff +0 -0
- package/dist/styles/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
- package/dist/styles/fonts/KaTeX_Main-Bold.ttf +0 -0
- package/dist/styles/fonts/KaTeX_Main-Bold.woff +0 -0
- package/dist/styles/fonts/KaTeX_Main-Bold.woff2 +0 -0
- package/dist/styles/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
- package/dist/styles/fonts/KaTeX_Main-BoldItalic.woff +0 -0
- package/dist/styles/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
- package/dist/styles/fonts/KaTeX_Main-Italic.ttf +0 -0
- package/dist/styles/fonts/KaTeX_Main-Italic.woff +0 -0
- package/dist/styles/fonts/KaTeX_Main-Italic.woff2 +0 -0
- package/dist/styles/fonts/KaTeX_Main-Regular.ttf +0 -0
- package/dist/styles/fonts/KaTeX_Main-Regular.woff +0 -0
- package/dist/styles/fonts/KaTeX_Main-Regular.woff2 +0 -0
- package/dist/styles/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
- package/dist/styles/fonts/KaTeX_Math-BoldItalic.woff +0 -0
- package/dist/styles/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
- package/dist/styles/fonts/KaTeX_Math-Italic.ttf +0 -0
- package/dist/styles/fonts/KaTeX_Math-Italic.woff +0 -0
- package/dist/styles/fonts/KaTeX_Math-Italic.woff2 +0 -0
- package/dist/styles/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
- package/dist/styles/fonts/KaTeX_SansSerif-Bold.woff +0 -0
- package/dist/styles/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
- package/dist/styles/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
- package/dist/styles/fonts/KaTeX_SansSerif-Italic.woff +0 -0
- package/dist/styles/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
- package/dist/styles/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
- package/dist/styles/fonts/KaTeX_SansSerif-Regular.woff +0 -0
- package/dist/styles/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
- package/dist/styles/fonts/KaTeX_Script-Regular.ttf +0 -0
- package/dist/styles/fonts/KaTeX_Script-Regular.woff +0 -0
- package/dist/styles/fonts/KaTeX_Script-Regular.woff2 +0 -0
- package/dist/styles/fonts/KaTeX_Size1-Regular.ttf +0 -0
- package/dist/styles/fonts/KaTeX_Size1-Regular.woff +0 -0
- package/dist/styles/fonts/KaTeX_Size1-Regular.woff2 +0 -0
- package/dist/styles/fonts/KaTeX_Size2-Regular.ttf +0 -0
- package/dist/styles/fonts/KaTeX_Size2-Regular.woff +0 -0
- package/dist/styles/fonts/KaTeX_Size2-Regular.woff2 +0 -0
- package/dist/styles/fonts/KaTeX_Size3-Regular.ttf +0 -0
- package/dist/styles/fonts/KaTeX_Size3-Regular.woff +0 -0
- package/dist/styles/fonts/KaTeX_Size3-Regular.woff2 +0 -0
- package/dist/styles/fonts/KaTeX_Size4-Regular.ttf +0 -0
- package/dist/styles/fonts/KaTeX_Size4-Regular.woff +0 -0
- package/dist/styles/fonts/KaTeX_Size4-Regular.woff2 +0 -0
- package/dist/styles/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
- package/dist/styles/fonts/KaTeX_Typewriter-Regular.woff +0 -0
- package/dist/styles/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
- package/package.json +1 -1
package/dist/chat.d.cts
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
export { EN_FALLBACK };
|
|
2
|
-
import { AgentRuntime } from '@weft/runtime-core';
|
|
2
|
+
import { AgentRuntime, AgentRuntimeKind } from '@weft/runtime-core';
|
|
3
3
|
import '@weft/timeline';
|
|
4
4
|
import '@weft/provider-flitro';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* useAgentSession —
|
|
7
|
+
* useAgentSession — runtime-agnostic hook for managing an agent session.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
9
|
+
* The hook is provider-agnostic: the caller supplies a `createRuntime`
|
|
10
|
+
* factory that returns any `AgentRuntime` implementation (Flitro, Claude
|
|
11
|
+
* Code, Codex, or a custom one). The hook wraps it in a deferred
|
|
12
|
+
* lifecycle suitable for React 19 StrictMode.
|
|
12
13
|
*/
|
|
13
14
|
|
|
14
15
|
interface UseAgentSessionOptions {
|
|
15
|
-
/**
|
|
16
|
-
server: string;
|
|
17
|
-
/** Scoped session token from the embed bootstrap. */
|
|
18
|
-
token: string;
|
|
19
|
-
/** Session bound to the token. */
|
|
16
|
+
/** Stable session identifier — runtime is recreated when this changes. */
|
|
20
17
|
sessionId: string;
|
|
21
|
-
/**
|
|
22
|
-
|
|
18
|
+
/** Factory that produces the `AgentRuntime`. Called lazily on first interaction. */
|
|
19
|
+
createRuntime: () => AgentRuntime;
|
|
20
|
+
/** Provider name surfaced in the returned `AgentSession` (default `"agent"`). */
|
|
21
|
+
provider?: string;
|
|
22
|
+
/** Runtime kind surfaced before the real runtime is created (default `"app-server"`). */
|
|
23
|
+
runtimeKind?: AgentRuntimeKind;
|
|
23
24
|
}
|
|
24
25
|
interface AgentSession {
|
|
25
26
|
runtime: AgentRuntime;
|
|
26
27
|
sessionId: string;
|
|
27
|
-
server: string;
|
|
28
28
|
}
|
|
29
29
|
declare function useAgentSession(options: UseAgentSessionOptions): AgentSession;
|
|
30
30
|
|
package/dist/chat.d.ts
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
export { EN_FALLBACK };
|
|
2
|
-
import { AgentRuntime } from '@weft/runtime-core';
|
|
2
|
+
import { AgentRuntime, AgentRuntimeKind } from '@weft/runtime-core';
|
|
3
3
|
import '@weft/timeline';
|
|
4
4
|
import '@weft/provider-flitro';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* useAgentSession —
|
|
7
|
+
* useAgentSession — runtime-agnostic hook for managing an agent session.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
9
|
+
* The hook is provider-agnostic: the caller supplies a `createRuntime`
|
|
10
|
+
* factory that returns any `AgentRuntime` implementation (Flitro, Claude
|
|
11
|
+
* Code, Codex, or a custom one). The hook wraps it in a deferred
|
|
12
|
+
* lifecycle suitable for React 19 StrictMode.
|
|
12
13
|
*/
|
|
13
14
|
|
|
14
15
|
interface UseAgentSessionOptions {
|
|
15
|
-
/**
|
|
16
|
-
server: string;
|
|
17
|
-
/** Scoped session token from the embed bootstrap. */
|
|
18
|
-
token: string;
|
|
19
|
-
/** Session bound to the token. */
|
|
16
|
+
/** Stable session identifier — runtime is recreated when this changes. */
|
|
20
17
|
sessionId: string;
|
|
21
|
-
/**
|
|
22
|
-
|
|
18
|
+
/** Factory that produces the `AgentRuntime`. Called lazily on first interaction. */
|
|
19
|
+
createRuntime: () => AgentRuntime;
|
|
20
|
+
/** Provider name surfaced in the returned `AgentSession` (default `"agent"`). */
|
|
21
|
+
provider?: string;
|
|
22
|
+
/** Runtime kind surfaced before the real runtime is created (default `"app-server"`). */
|
|
23
|
+
runtimeKind?: AgentRuntimeKind;
|
|
23
24
|
}
|
|
24
25
|
interface AgentSession {
|
|
25
26
|
runtime: AgentRuntime;
|
|
26
27
|
sessionId: string;
|
|
27
|
-
server: string;
|
|
28
28
|
}
|
|
29
29
|
declare function useAgentSession(options: UseAgentSessionOptions): AgentSession;
|
|
30
30
|
|