@everfur/sdk 0.1.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/CHANGELOG.md +74 -0
- package/LICENSE +21 -0
- package/README.md +161 -0
- package/animations/package.json +8 -0
- package/chat/package.json +8 -0
- package/client/package.json +8 -0
- package/core/package.json +8 -0
- package/dist/CameraPort-Cv31Pz7g.d.cts +29 -0
- package/dist/CameraPort-Cv31Pz7g.d.ts +29 -0
- package/dist/ChatController-CKdBvPj2.d.ts +146 -0
- package/dist/ChatController-CpUMvvZf.d.cts +146 -0
- package/dist/EverfurResult-D92-uL82.d.cts +240 -0
- package/dist/EverfurResult-D92-uL82.d.ts +240 -0
- package/dist/FilePort-BabWrv7I.d.cts +22 -0
- package/dist/FilePort-BabWrv7I.d.ts +22 -0
- package/dist/PhotoController-BItt5M7u.d.cts +43 -0
- package/dist/PhotoController-D8zMTdcW.d.ts +43 -0
- package/dist/TelemetryPort-BDNr00hu.d.cts +12 -0
- package/dist/TelemetryPort-BDNr00hu.d.ts +12 -0
- package/dist/animations/index.cjs +1997 -0
- package/dist/animations/index.d.cts +517 -0
- package/dist/animations/index.d.ts +517 -0
- package/dist/animations/index.js +1972 -0
- package/dist/cacheEpoch-DknKn3S0.d.cts +36 -0
- package/dist/cacheEpoch-DknKn3S0.d.ts +36 -0
- package/dist/chat/index.cjs +1170 -0
- package/dist/chat/index.d.cts +59 -0
- package/dist/chat/index.d.ts +59 -0
- package/dist/chat/index.js +1167 -0
- package/dist/client/index.cjs +2317 -0
- package/dist/client/index.d.cts +65 -0
- package/dist/client/index.d.ts +65 -0
- package/dist/client/index.js +2217 -0
- package/dist/config-BSjBdxrZ.d.cts +501 -0
- package/dist/config-CiJ0PVBB.d.ts +501 -0
- package/dist/core/index.cjs +3175 -0
- package/dist/core/index.d.cts +70 -0
- package/dist/core/index.d.ts +70 -0
- package/dist/core/index.js +3163 -0
- package/dist/identity-Brl-lDd6.d.cts +91 -0
- package/dist/identity-DK9zORrG.d.ts +91 -0
- package/dist/ids-CJ1S6adf.d.cts +46 -0
- package/dist/ids-CJ1S6adf.d.ts +46 -0
- package/dist/index.cjs +4488 -0
- package/dist/index.d.cts +156 -0
- package/dist/index.d.ts +156 -0
- package/dist/index.js +4464 -0
- package/dist/petsRepository-BEGb97M9.d.cts +326 -0
- package/dist/petsRepository-Bu18r2kK.d.ts +326 -0
- package/dist/photo/index.cjs +2189 -0
- package/dist/photo/index.d.cts +43 -0
- package/dist/photo/index.d.ts +43 -0
- package/dist/photo/index.js +2186 -0
- package/dist/projection-CeIUsbSk.d.cts +8 -0
- package/dist/projection-CeIUsbSk.d.ts +8 -0
- package/dist/records/index.cjs +2840 -0
- package/dist/records/index.d.cts +224 -0
- package/dist/records/index.d.ts +224 -0
- package/dist/records/index.js +2834 -0
- package/dist/requestFunnel-DuUH-kAe.d.cts +28 -0
- package/dist/requestFunnel-dio5OmR9.d.ts +28 -0
- package/dist/resolve-Dq_4_agU.d.cts +86 -0
- package/dist/resolve-Dq_4_agU.d.ts +86 -0
- package/dist/runtime-BgQnA594.d.cts +349 -0
- package/dist/runtime-CBA-LvdM.d.ts +349 -0
- package/dist/server/index.cjs +533 -0
- package/dist/server/index.d.cts +48 -0
- package/dist/server/index.d.ts +48 -0
- package/dist/server/index.js +530 -0
- package/dist/testing/index.cjs +825 -0
- package/dist/testing/index.d.cts +113 -0
- package/dist/testing/index.d.ts +113 -0
- package/dist/testing/index.js +822 -0
- package/dist/testing/rn/index.cjs +449 -0
- package/dist/testing/rn/index.d.cts +49 -0
- package/dist/testing/rn/index.d.ts +49 -0
- package/dist/testing/rn/index.js +444 -0
- package/dist/video/index.cjs +1941 -0
- package/dist/video/index.d.cts +66 -0
- package/dist/video/index.d.ts +66 -0
- package/dist/video/index.js +1938 -0
- package/package.json +311 -0
- package/photo/package.json +8 -0
- package/records/package.json +8 -0
- package/server/device-blocked.cjs +15 -0
- package/server/package.json +9 -0
- package/testing/package.json +8 -0
- package/testing/rn/package.json +8 -0
- package/video/package.json +8 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { f as EverfurError, E as EverfurResult } from '../EverfurResult-D92-uL82.cjs';
|
|
2
|
+
import { a as ConversationId, b as ResponseId, P as PetRef } from '../ids-CJ1S6adf.cjs';
|
|
3
|
+
import { e as ChatStatus, c as ChatMessage } from '../ChatController-CpUMvvZf.cjs';
|
|
4
|
+
import { ReactNode } from 'react';
|
|
5
|
+
import { StyleProp, ViewStyle } from 'react-native';
|
|
6
|
+
import '../requestFunnel-DuUH-kAe.cjs';
|
|
7
|
+
import '../config-BSjBdxrZ.cjs';
|
|
8
|
+
import '../identity-Brl-lDd6.cjs';
|
|
9
|
+
import '../TelemetryPort-BDNr00hu.cjs';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Headless chat state. `isBootstrapping` is a deliberate superset of the SPEC-10 §7.4 minimum: the
|
|
13
|
+
* controller snapshot carries it (§7.1) and the prebuilt component maps it to the Loading state.
|
|
14
|
+
*/
|
|
15
|
+
interface UseEverfurChatState {
|
|
16
|
+
readonly status: ChatStatus;
|
|
17
|
+
readonly messages: ReadonlyArray<ChatMessage>;
|
|
18
|
+
readonly conversationId: ConversationId | null;
|
|
19
|
+
readonly error: EverfurError | null;
|
|
20
|
+
readonly isStreaming: boolean;
|
|
21
|
+
readonly isBootstrapping: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Backend-owned suggested-prompt strings (flattened + de-duplicated) from the chat bootstrap. Empty until the
|
|
24
|
+
* bootstrap resolves and empty when the backend returns none; the prebuilt component renders them as the
|
|
25
|
+
* tappable "Follow up questions" list, each string a ready-to-send message.
|
|
26
|
+
*/
|
|
27
|
+
readonly suggestedPrompts: ReadonlyArray<string>;
|
|
28
|
+
/**
|
|
29
|
+
* Optimistic; the blank user bubble is removed on a pre-first-delta failure (controller-owned). Drives the
|
|
30
|
+
* controller stream to completion and settles: `ok(responseId)` on a completed turn (the id is null when
|
|
31
|
+
* the terminal `done` frame carried no message id), or `err` with the terminal EverfurError.
|
|
32
|
+
*/
|
|
33
|
+
send(text: string): Promise<EverfurResult<ResponseId | null>>;
|
|
34
|
+
/** Re-sends the last turn with the SAME idempotency key; no duplicate user bubble (§7.4). */
|
|
35
|
+
retryLast(): Promise<EverfurResult<ResponseId | null>>;
|
|
36
|
+
/** Aborts the in-flight stream; not an error. */
|
|
37
|
+
stop(): void;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* @throws {EverfurConfigError} kind 'not-initialized' if called outside an EverfurProvider.
|
|
41
|
+
* Auto-disposes its controller reference on unmount.
|
|
42
|
+
*/
|
|
43
|
+
declare function useEverfurChat(opts?: {
|
|
44
|
+
readonly petRef?: PetRef;
|
|
45
|
+
readonly conversationId?: ConversationId;
|
|
46
|
+
}): UseEverfurChatState;
|
|
47
|
+
|
|
48
|
+
interface EverfurChatProps {
|
|
49
|
+
readonly petRef?: PetRef;
|
|
50
|
+
readonly conversationId?: ConversationId;
|
|
51
|
+
readonly style?: StyleProp<ViewStyle>;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Entitlement-gated, four-state chat surface. Entitlement-OFF renders the CapabilityGate OffState;
|
|
55
|
+
* otherwise the body maps the controller snapshot to exactly one deliberate state.
|
|
56
|
+
*/
|
|
57
|
+
declare function EverfurChat(props: EverfurChatProps): ReactNode;
|
|
58
|
+
|
|
59
|
+
export { EverfurChat, type EverfurChatProps, type UseEverfurChatState, useEverfurChat };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { f as EverfurError, E as EverfurResult } from '../EverfurResult-D92-uL82.js';
|
|
2
|
+
import { a as ConversationId, b as ResponseId, P as PetRef } from '../ids-CJ1S6adf.js';
|
|
3
|
+
import { e as ChatStatus, c as ChatMessage } from '../ChatController-CKdBvPj2.js';
|
|
4
|
+
import { ReactNode } from 'react';
|
|
5
|
+
import { StyleProp, ViewStyle } from 'react-native';
|
|
6
|
+
import '../requestFunnel-dio5OmR9.js';
|
|
7
|
+
import '../config-CiJ0PVBB.js';
|
|
8
|
+
import '../identity-DK9zORrG.js';
|
|
9
|
+
import '../TelemetryPort-BDNr00hu.js';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Headless chat state. `isBootstrapping` is a deliberate superset of the SPEC-10 §7.4 minimum: the
|
|
13
|
+
* controller snapshot carries it (§7.1) and the prebuilt component maps it to the Loading state.
|
|
14
|
+
*/
|
|
15
|
+
interface UseEverfurChatState {
|
|
16
|
+
readonly status: ChatStatus;
|
|
17
|
+
readonly messages: ReadonlyArray<ChatMessage>;
|
|
18
|
+
readonly conversationId: ConversationId | null;
|
|
19
|
+
readonly error: EverfurError | null;
|
|
20
|
+
readonly isStreaming: boolean;
|
|
21
|
+
readonly isBootstrapping: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Backend-owned suggested-prompt strings (flattened + de-duplicated) from the chat bootstrap. Empty until the
|
|
24
|
+
* bootstrap resolves and empty when the backend returns none; the prebuilt component renders them as the
|
|
25
|
+
* tappable "Follow up questions" list, each string a ready-to-send message.
|
|
26
|
+
*/
|
|
27
|
+
readonly suggestedPrompts: ReadonlyArray<string>;
|
|
28
|
+
/**
|
|
29
|
+
* Optimistic; the blank user bubble is removed on a pre-first-delta failure (controller-owned). Drives the
|
|
30
|
+
* controller stream to completion and settles: `ok(responseId)` on a completed turn (the id is null when
|
|
31
|
+
* the terminal `done` frame carried no message id), or `err` with the terminal EverfurError.
|
|
32
|
+
*/
|
|
33
|
+
send(text: string): Promise<EverfurResult<ResponseId | null>>;
|
|
34
|
+
/** Re-sends the last turn with the SAME idempotency key; no duplicate user bubble (§7.4). */
|
|
35
|
+
retryLast(): Promise<EverfurResult<ResponseId | null>>;
|
|
36
|
+
/** Aborts the in-flight stream; not an error. */
|
|
37
|
+
stop(): void;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* @throws {EverfurConfigError} kind 'not-initialized' if called outside an EverfurProvider.
|
|
41
|
+
* Auto-disposes its controller reference on unmount.
|
|
42
|
+
*/
|
|
43
|
+
declare function useEverfurChat(opts?: {
|
|
44
|
+
readonly petRef?: PetRef;
|
|
45
|
+
readonly conversationId?: ConversationId;
|
|
46
|
+
}): UseEverfurChatState;
|
|
47
|
+
|
|
48
|
+
interface EverfurChatProps {
|
|
49
|
+
readonly petRef?: PetRef;
|
|
50
|
+
readonly conversationId?: ConversationId;
|
|
51
|
+
readonly style?: StyleProp<ViewStyle>;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Entitlement-gated, four-state chat surface. Entitlement-OFF renders the CapabilityGate OffState;
|
|
55
|
+
* otherwise the body maps the controller snapshot to exactly one deliberate state.
|
|
56
|
+
*/
|
|
57
|
+
declare function EverfurChat(props: EverfurChatProps): ReactNode;
|
|
58
|
+
|
|
59
|
+
export { EverfurChat, type EverfurChatProps, type UseEverfurChatState, useEverfurChat };
|