@fenixforce/edition-mobile 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.
Files changed (41) hide show
  1. package/dist/index.js +230 -0
  2. package/dist/lib/agent.d.ts +44 -0
  3. package/dist/lib/app-context.d.ts +31 -0
  4. package/dist/lib/boot.d.ts +22 -0
  5. package/dist/lib/entry.d.ts +48 -0
  6. package/dist/lib/providers/hybrid-router.d.ts +60 -0
  7. package/dist/lib/providers/local-inference.d.ts +31 -0
  8. package/dist/lib/storage/identity-store.d.ts +13 -0
  9. package/dist/lib/storage/memory-search.d.ts +30 -0
  10. package/dist/lib/storage/sqlite-adapter.d.ts +22 -0
  11. package/dist/lib/sync/client.d.ts +81 -0
  12. package/dist/lib/sync/triggers.d.ts +59 -0
  13. package/dist/lib/tools/calendar.d.ts +76 -0
  14. package/dist/lib/tools/camera.d.ts +40 -0
  15. package/dist/lib/tools/contacts.d.ts +59 -0
  16. package/dist/lib/tools/location.d.ts +58 -0
  17. package/dist/lib/tools/notifications.d.ts +79 -0
  18. package/dist/lib/tools/registry.d.ts +26 -0
  19. package/dist/lib/tools/reminders.d.ts +65 -0
  20. package/dist/platforms/android-xr/XRAgentService.d.ts +27 -0
  21. package/dist/platforms/android-xr/XRContextCapture.d.ts +47 -0
  22. package/dist/platforms/android-xr/XRGestureHandler.d.ts +41 -0
  23. package/dist/platforms/android-xr/XRNotificationBridge.d.ts +35 -0
  24. package/dist/platforms/android-xr/XRVoiceInterface.d.ts +72 -0
  25. package/dist/platforms/android-xr/display/ConversationOverlay.d.ts +20 -0
  26. package/dist/platforms/android-xr/display/DisplayManager.d.ts +44 -0
  27. package/dist/platforms/android-xr/display/GlanceCard.d.ts +21 -0
  28. package/dist/platforms/android-xr/display/MemoryHUD.d.ts +22 -0
  29. package/dist/platforms/android-xr/display/NotificationPill.d.ts +13 -0
  30. package/dist/platforms/android-xr/xr-entry.d.ts +23 -0
  31. package/dist/platforms/quest/QuestAdapter.d.ts +66 -0
  32. package/dist/platforms/quest/QuestPanelConfig.d.ts +45 -0
  33. package/dist/platforms/quest/quest-entry.d.ts +29 -0
  34. package/dist/platforms/visionos/AgentBridge.d.ts +39 -0
  35. package/dist/platforms/visionos/VisionToolAdapters.d.ts +53 -0
  36. package/dist/platforms/visionos/VisionVoiceInterface.d.ts +32 -0
  37. package/dist/platforms/visionos/visionos-entry.d.ts +24 -0
  38. package/dist/src/hil/push-notifier.d.ts +25 -0
  39. package/dist/src/index.d.ts +72 -0
  40. package/dist/watch/WatchBridge.d.ts +63 -0
  41. package/package.json +51 -0
@@ -0,0 +1,63 @@
1
+ /**
2
+ * WatchConnectivity bridge — TypeScript side that communicates with
3
+ * the native Swift WatchOS companion app. Runs on the iPhone.
4
+ *
5
+ * Protocol:
6
+ * Watch → Phone: { type: "voice_input" | "text_input" | "quick_reply", payload: string }
7
+ * Phone → Watch: { type: "response" | "status" | "suggestions", payload: ... }
8
+ *
9
+ * The Watch never runs the agent. All processing happens on the phone.
10
+ */
11
+ export type WatchMessageType = "voice_input" | "text_input" | "quick_reply";
12
+ export type PhoneMessageType = "response" | "status" | "suggestions" | "error";
13
+ export type AgentStatus = "idle" | "thinking" | "has_notification";
14
+ export interface WatchMessage {
15
+ type: WatchMessageType;
16
+ payload: string;
17
+ timestamp: string;
18
+ }
19
+ export interface PhoneResponse {
20
+ type: PhoneMessageType;
21
+ payload: string;
22
+ suggestions?: string[];
23
+ status?: AgentStatus;
24
+ }
25
+ export interface WatchBridgeConfig {
26
+ /** Process a user message through the agent and return a response. */
27
+ onMessage: (text: string) => Promise<{
28
+ response: string;
29
+ suggestions: string[];
30
+ }>;
31
+ /** Native WatchConnectivity module (injected from RN bridge). */
32
+ connectivity: WatchConnectivity;
33
+ }
34
+ export interface WatchConnectivity {
35
+ /** Send a message to the Watch. */
36
+ sendMessage(message: Record<string, unknown>): Promise<void>;
37
+ /** Transfer user info (queued, delivered when Watch is reachable). */
38
+ transferUserInfo(info: Record<string, unknown>): void;
39
+ /** Register handler for incoming messages from Watch. */
40
+ onMessage(handler: (message: Record<string, unknown>) => void): () => void;
41
+ /** Check if Watch is reachable. */
42
+ isReachable(): boolean;
43
+ }
44
+ interface QueuedMessage {
45
+ text: string;
46
+ timestamp: string;
47
+ }
48
+ export interface WatchBridge {
49
+ /** Start listening for Watch messages. Returns cleanup function. */
50
+ start(): () => void;
51
+ /** Send current agent status to Watch. */
52
+ sendStatus(status: AgentStatus): Promise<void>;
53
+ /** Send a text response to Watch with optional suggestions. */
54
+ sendResponse(text: string, suggestions?: string[]): Promise<void>;
55
+ /** Check if the Watch is currently reachable. */
56
+ isWatchReachable(): boolean;
57
+ /** Get queued messages (sent while phone was unreachable). */
58
+ getPendingQueue(): QueuedMessage[];
59
+ }
60
+ export declare function createWatchBridge(config: WatchBridgeConfig): WatchBridge;
61
+ /** Generate quick reply suggestions based on the response. */
62
+ export declare function generateSuggestions(response: string): string[];
63
+ export {};
package/package.json ADDED
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "@fenixforce/edition-mobile",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "publishConfig": {
8
+ "registry": "https://registry.npmjs.org",
9
+ "access": "restricted"
10
+ },
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "https://github.com/ejiogbevoices/projectfenix.git",
14
+ "directory": "packages/edition-mobile"
15
+ },
16
+ "exports": {
17
+ ".": {
18
+ "import": "./dist/index.js",
19
+ "types": "./dist/index.d.ts"
20
+ }
21
+ },
22
+ "files": [
23
+ "dist"
24
+ ],
25
+ "scripts": {
26
+ "build": "esbuild src/index.ts --bundle --format=esm --platform=node --target=es2022 --minify --outfile=dist/index.js --external:@fenixforce/kernel --external:expo-sqlite --external:expo-secure-store --external:react --external:react-native && tsc --emitDeclarationOnly --project tsconfig.build.json",
27
+ "start": "npx expo start",
28
+ "test": "bun test",
29
+ "typecheck": "tsc --noEmit"
30
+ },
31
+ "dependencies": {
32
+ "@fenixforce/kernel": "workspace:*",
33
+ "expo": "~52.0.0",
34
+ "expo-router": "~4.0.0",
35
+ "expo-sqlite": "~15.0.0",
36
+ "expo-secure-store": "~14.0.0",
37
+ "expo-camera": "~16.0.0",
38
+ "expo-contacts": "~14.0.0",
39
+ "expo-calendar": "~14.0.0",
40
+ "expo-location": "~18.0.0",
41
+ "expo-notifications": "~0.30.0",
42
+ "expo-status-bar": "~2.0.0",
43
+ "react": "^18.3.0",
44
+ "react-native": "~0.76.0",
45
+ "react-native-safe-area-context": "~4.12.0",
46
+ "react-native-screens": "~4.4.0"
47
+ },
48
+ "devDependencies": {
49
+ "@types/react": "^19.2.14"
50
+ }
51
+ }