action_event_helpers.ts

Declarations
#

25 declarations

view source

create_initial_data
#

action_event_helpers.ts view source

(kind: "request_response" | "remote_notification" | "local_call", phase: "send_request" | "execute" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive", method: "ping" | ... 23 more ... | "terminal_close", executor: "frontend" | "backend", input: unknown): { ...; }

kind

type "request_response" | "remote_notification" | "local_call"

phase

type "send_request" | "execute" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive"

method

type "ping" | "session_load" | "filer_change" | "diskfile_update" | "diskfile_delete" | "directory_create" | "completion_create" | "completion_progress" | "ollama_progress" | ... 15 more ... | "terminal_close"

executor

type "frontend" | "backend"

input

type unknown

returns

{ kind: "request_response" | "remote_notification" | "local_call"; phase: "send_request" | "execute" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive"; ... 9 more ...; notification: { ...; } | null; }

extract_action_result
#

action_event_helpers.ts view source

(event: ActionEvent<"ping" | "session_load" | "filer_change" | "diskfile_update" | "diskfile_delete" | "directory_create" | "completion_create" | "completion_progress" | "ollama_progress" | ... 15 more ... | "terminal_close", ActionEventEnvironment, "send_request" | ... 7 more ... | "receive", "initial" | ... 3 more ... | "failed">): Result<...>

event

type ActionEvent<"ping" | "session_load" | "filer_change" | "diskfile_update" | "diskfile_delete" | "directory_create" | "completion_create" | "completion_progress" | "ollama_progress" | ... 15 more ... | "terminal_close", ActionEventEnvironment, "send_request" | ... 7 more ... | "receive", "initial" | ... 3 more ... | "...

returns

Result<{ value: unknown; }, { error: { [x: string]: unknown; code: -32700 | -32600 | -32601 | -32602 | -32603 | (number & $brand<"JsonrpcServerErrorCode">); message: string; data?: unknown; }; }>

get_initial_phase
#

action_event_helpers.ts view source

(kind: "request_response" | "remote_notification" | "local_call", initiator: "both" | "frontend" | "backend", executor: "frontend" | "backend"): "send_request" | "execute" | ... 7 more ... | null

kind

type "request_response" | "remote_notification" | "local_call"

initiator

type "both" | "frontend" | "backend"

executor

type "frontend" | "backend"

returns

"send_request" | "execute" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive" | null

is_action_complete
#

action_event_helpers.ts view source

(data: { kind: "request_response" | "remote_notification" | "local_call"; phase: "send_request" | "execute" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive"; ... 9 more ...; notification: { ...; } | null; }): boolean

data

type { kind: "request_response" | "remote_notification" | "local_call"; phase: "send_request" | "execute" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive"; ... 9 more ...; notification: { ...; } | null; }

returns

boolean

is_execute
#

action_event_helpers.ts view source

(data: { kind: "request_response" | "remote_notification" | "local_call"; phase: "send_request" | "execute" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive"; ... 9 more ...; notification: { ...; } | null; }): data is ActionEventLocalCallData & { ...; }

data

type { kind: "request_response" | "remote_notification" | "local_call"; phase: "send_request" | "execute" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive"; ... 9 more ...; notification: { ...; } | null; }

returns

boolean

is_failed
#

action_event_helpers.ts view source

(data: { kind: "request_response" | "remote_notification" | "local_call"; phase: "send_request" | "execute" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive"; ... 9 more ...; notification: { ...; } | null; }): data is { ...; } & { ...; }

data

type { kind: "request_response" | "remote_notification" | "local_call"; phase: "send_request" | "execute" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive"; ... 9 more ...; notification: { ...; } | null; }

returns

boolean

is_handled
#

action_event_helpers.ts view source

(data: { kind: "request_response" | "remote_notification" | "local_call"; phase: "send_request" | "execute" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive"; ... 9 more ...; notification: { ...; } | null; }): data is { ...; } & { ...; }

data

type { kind: "request_response" | "remote_notification" | "local_call"; phase: "send_request" | "execute" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive"; ... 9 more ...; notification: { ...; } | null; }

returns

boolean

is_handling
#

action_event_helpers.ts view source

(data: { kind: "request_response" | "remote_notification" | "local_call"; phase: "send_request" | "execute" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive"; ... 9 more ...; notification: { ...; } | null; }): data is { ...; } & { ...; }

data

type { kind: "request_response" | "remote_notification" | "local_call"; phase: "send_request" | "execute" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive"; ... 9 more ...; notification: { ...; } | null; }

returns

boolean

is_initial
#

action_event_helpers.ts view source

(data: { kind: "request_response" | "remote_notification" | "local_call"; phase: "send_request" | "execute" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive"; ... 9 more ...; notification: { ...; } | null; }): data is { ...; } & { ...; }

data

type { kind: "request_response" | "remote_notification" | "local_call"; phase: "send_request" | "execute" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive"; ... 9 more ...; notification: { ...; } | null; }

returns

boolean

is_local_call
#

action_event_helpers.ts view source

(data: { kind: "request_response" | "remote_notification" | "local_call"; phase: "send_request" | "execute" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive"; ... 9 more ...; notification: { ...; } | null; }): data is ActionEventLocalCallData

data

type { kind: "request_response" | "remote_notification" | "local_call"; phase: "send_request" | "execute" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive"; ... 9 more ...; notification: { ...; } | null; }

returns

boolean

is_notification_receive
#

action_event_helpers.ts view source

(data: { kind: "request_response" | "remote_notification" | "local_call"; phase: "send_request" | "execute" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive"; ... 9 more ...; notification: { ...; } | null; }): data is ({ ...; } & { ...; }) | ... 3 more ... | ({ ...; } & { ...; })

data

type { kind: "request_response" | "remote_notification" | "local_call"; phase: "send_request" | "execute" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive"; ... 9 more ...; notification: { ...; } | null; }

returns

boolean

is_notification_send
#

action_event_helpers.ts view source

(data: { kind: "request_response" | "remote_notification" | "local_call"; phase: "send_request" | "execute" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive"; ... 9 more ...; notification: { ...; } | null; }): data is ({ ...; } & { ...; }) | ... 3 more ... | ({ ...; } & { ...; })

data

type { kind: "request_response" | "remote_notification" | "local_call"; phase: "send_request" | "execute" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive"; ... 9 more ...; notification: { ...; } | null; }

returns

boolean

is_notification_send_with_parsed_input
#

action_event_helpers.ts view source

<TMethod extends ActionMethod = "ping" | "session_load" | "filer_change" | "diskfile_update" | "diskfile_delete" | "directory_create" | "completion_create" | "completion_progress" | "ollama_progress" | ... 15 more ... | "terminal_close">(data: { ...; }): data is ({ ...; } & { ...; }) | ({ ...; } & { ...; })

data

type { kind: "request_response" | "remote_notification" | "local_call"; phase: "send_request" | "execute" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive"; ... 9 more ...; notification: { ...; } | null; }

returns

boolean

is_parsed
#

action_event_helpers.ts view source

(data: { kind: "request_response" | "remote_notification" | "local_call"; phase: "send_request" | "execute" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive"; ... 9 more ...; notification: { ...; } | null; }): data is { ...; } & { ...; }

data

type { kind: "request_response" | "remote_notification" | "local_call"; phase: "send_request" | "execute" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive"; ... 9 more ...; notification: { ...; } | null; }

returns

boolean

is_receive_request
#

action_event_helpers.ts view source

(data: { kind: "request_response" | "remote_notification" | "local_call"; phase: "send_request" | "execute" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive"; ... 9 more ...; notification: { ...; } | null; }): data is ({ ...; } & { ...; }) | ... 3 more ... | ({ ...; } & { ...; })

data

type { kind: "request_response" | "remote_notification" | "local_call"; phase: "send_request" | "execute" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive"; ... 9 more ...; notification: { ...; } | null; }

returns

boolean

is_receive_response
#

action_event_helpers.ts view source

(data: { kind: "request_response" | "remote_notification" | "local_call"; phase: "send_request" | "execute" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive"; ... 9 more ...; notification: { ...; } | null; }): data is ({ ...; } & { ...; }) | ... 3 more ... | ({ ...; } & { ...; })

data

type { kind: "request_response" | "remote_notification" | "local_call"; phase: "send_request" | "execute" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive"; ... 9 more ...; notification: { ...; } | null; }

returns

boolean

is_remote_notification
#

action_event_helpers.ts view source

(data: { kind: "request_response" | "remote_notification" | "local_call"; phase: "send_request" | "execute" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive"; ... 9 more ...; notification: { ...; } | null; }): data is ActionEventRemoteNotificationData

data

type { kind: "request_response" | "remote_notification" | "local_call"; phase: "send_request" | "execute" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive"; ... 9 more ...; notification: { ...; } | null; }

returns

boolean

is_request_response
#

action_event_helpers.ts view source

(data: { kind: "request_response" | "remote_notification" | "local_call"; phase: "send_request" | "execute" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive"; ... 9 more ...; notification: { ...; } | null; }): data is ActionEventRequestResponseData

data

type { kind: "request_response" | "remote_notification" | "local_call"; phase: "send_request" | "execute" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive"; ... 9 more ...; notification: { ...; } | null; }

returns

boolean

is_send_request
#

action_event_helpers.ts view source

(data: { kind: "request_response" | "remote_notification" | "local_call"; phase: "send_request" | "execute" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive"; ... 9 more ...; notification: { ...; } | null; }): data is ({ ...; } & { ...; }) | ... 3 more ... | ({ ...; } & { ...; })

data

type { kind: "request_response" | "remote_notification" | "local_call"; phase: "send_request" | "execute" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive"; ... 9 more ...; notification: { ...; } | null; }

returns

boolean

is_send_request_with_parsed_input
#

action_event_helpers.ts view source

<TMethod extends ActionMethod = "ping" | "session_load" | "filer_change" | "diskfile_update" | "diskfile_delete" | "directory_create" | "completion_create" | "completion_progress" | "ollama_progress" | ... 15 more ... | "terminal_close">(data: { ...; }): data is ({ ...; } & { ...; }) | ({ ...; } & { ...; })

data

type { kind: "request_response" | "remote_notification" | "local_call"; phase: "send_request" | "execute" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive"; ... 9 more ...; notification: { ...; } | null; }

returns

boolean

is_send_response
#

action_event_helpers.ts view source

(data: { kind: "request_response" | "remote_notification" | "local_call"; phase: "send_request" | "execute" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive"; ... 9 more ...; notification: { ...; } | null; }): data is ({ ...; } & { ...; }) | ... 3 more ... | ({ ...; } & { ...; })

data

type { kind: "request_response" | "remote_notification" | "local_call"; phase: "send_request" | "execute" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive"; ... 9 more ...; notification: { ...; } | null; }

returns

boolean

should_validate_output
#

action_event_helpers.ts view source

(kind: "request_response" | "remote_notification" | "local_call", phase: "send_request" | "execute" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive"): boolean

kind

type "request_response" | "remote_notification" | "local_call"

phase

type "send_request" | "execute" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive"

returns

boolean

validate_phase_for_kind
#

action_event_helpers.ts view source

(kind: "request_response" | "remote_notification" | "local_call", phase: "send_request" | "execute" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive"): void

kind

type "request_response" | "remote_notification" | "local_call"

phase

type "send_request" | "execute" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive"

returns

void

validate_phase_transition
#

action_event_helpers.ts view source

(from: "send_request" | "execute" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive", to: "send_request" | "execute" | ... 6 more ... | "receive"): void

from

type "send_request" | "execute" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive"

to

type "send_request" | "execute" | "receive_request" | "send_response" | "receive_response" | "send_error" | "receive_error" | "send" | "receive"

returns

void

validate_step_transition
#

action_event_helpers.ts view source

(from: "initial" | "parsed" | "handling" | "handled" | "failed", to: "initial" | "parsed" | "handling" | "handled" | "failed"): void

from

type "initial" | "parsed" | "handling" | "handled" | "failed"

to

type "initial" | "parsed" | "handling" | "handled" | "failed"

returns

void

Depends on
#

Imported by
#