@quantiya/codevibe-core 2.0.88 → 2.0.90

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.
@@ -0,0 +1,43 @@
1
+ /** Owns ignored SDK callback promises and the write-before-wire boundary.
2
+ * Native protocol mapping stays in the plugin;durable authority stays here.
3
+ * This class never reads terminal text,owns a native process,or retries input. */
4
+ import type { Event } from '../types/events';
5
+ import type { MobileInputStatusUpdater } from '../appsync/sync-input-delivery';
6
+ import { CodexNativeStateStore } from './codex-native-state';
7
+ import type { CodexNativeIntent, CodexNativeOwner } from './codex-native-state';
8
+ export interface CodexNativeDispatcherOptions {
9
+ store: CodexNativeStateStore;
10
+ owner: CodexNativeOwner;
11
+ updateStatus: MobileInputStatusUpdater;
12
+ /** Recheck the current independently-owned native instance immediately
13
+ * before the one send. This may only reject,never retarget an intent. */
14
+ assertNativeTarget(intent: CodexNativeIntent): void;
15
+ /** Current native request state,not a heuristic over retained records.
16
+ * Identity validation above remains mandatory even when work is held. */
17
+ isNativeBlocked(intent: CodexNativeIntent): boolean;
18
+ send(intent: CodexNativeIntent): Promise<void>;
19
+ onFailure(code: string): void | Promise<void>;
20
+ }
21
+ export type CodexNativeDispatchResult = 'ATTEMPTED' | 'RETAINED' | 'ALREADY_EXECUTED';
22
+ export declare class CodexNativeDispatcher {
23
+ private readonly options;
24
+ private accepting;
25
+ private readonly pending;
26
+ private readonly owner;
27
+ constructor(options: CodexNativeDispatcherOptions);
28
+ private report;
29
+ private register;
30
+ /** Safe for both the ordinary SDK callback (which ignores its promise) and
31
+ * the compatibility inbox (which awaits it). Identity is copied before any
32
+ * await. No native effect or DELIVERED claim precedes the atomic prepare. */
33
+ admit(value: Event, intentValue: CodexNativeIntent, controlKey?: string | null): Promise<CodexNativeDispatchResult>;
34
+ private entry;
35
+ private acknowledgeExecution;
36
+ reconcile(eventId: string, receipt: Parameters<CodexNativeStateStore['reconcile']>[2]): Promise<void>;
37
+ reconcileApproval(eventId: string, receipt: Parameters<CodexNativeStateStore['reconcileApproval']>[2]): Promise<void>;
38
+ acknowledgeExisting(eventId: string): Promise<void>;
39
+ stopAdmission(): void;
40
+ join(): Promise<void>;
41
+ close(reason?: 'TERMINAL' | 'BACKEND_REPLACED'): Promise<void>;
42
+ handoff(nextToken: string): Promise<void>;
43
+ }