adk_runtime_service_bundle (erlang_adk v0.10.0)

View Source

Bundle of the built-in session, artifact, and memory services selected by an adk_runtime_service_profile. start_link/2 is the supervised OTP entry point; start/2 is available for explicitly managed local use.

Owned service routers are one atomic generation. If either router exits, this process exits abnormally instead of replacing a child behind service references already held by a Runner. Place the bundle under an OTP supervisor (or use child_spec/1); an abnormal bundle restart then creates a fresh, internally consistent generation.

Summary

Functions

Build a strict child specification. A named, application-managed bundle is permanent so a normal stop also replaces every downstream consumer under a rest_for_one supervisor. An anonymous explicitly-managed bundle remains transient.

Resolve the application-managed runtime profile, with the released in-memory session service as the explicit disabled-profile fallback.

Return the exact split consumed by adk_runner:new/4.

Return validated references in their native service shapes.

Functions

child_spec(Options)

-spec child_spec(map()) -> supervisor:child_spec().

Build a strict child specification. A named, application-managed bundle is permanent so a normal stop also replaces every downstream consumer under a rest_for_one supervisor. An anonymous explicitly-managed bundle remains transient.

code_change(OldVersion, State, Extra)

configured_runner_spec()

-spec configured_runner_spec() -> {ok, map()} | {error, term()}.

Resolve the application-managed runtime profile, with the released in-memory session service as the explicit disabled-profile fallback.

handle_call(Request, From, State)

handle_cast(Request, State)

handle_info(Message, State)

init(Plan)

profiles()

-spec profiles() -> [adk_runtime_service_profile:profile()].

runner_spec(Bundle)

-spec runner_spec(pid() | atom()) -> {ok, map()} | {error, term()}.

Return the exact split consumed by adk_runner:new/4.

services(Bundle)

-spec services(pid() | atom()) -> {ok, map()} | {error, term()}.

Return validated references in their native service shapes.

start(Profile, Config)

-spec start(adk_runtime_service_profile:profile(), map()) -> {ok, pid()} | {error, term()}.

start(Name, Profile, Config)

-spec start(atom() | undefined, adk_runtime_service_profile:profile(), map()) ->
               {ok, pid()} | {error, term()}.

start_link(Profile, Config)

-spec start_link(adk_runtime_service_profile:profile(), map()) -> {ok, pid()} | {error, term()}.

start_link(Name, Profile, Config)

-spec start_link(atom() | undefined, adk_runtime_service_profile:profile(), map()) ->
                    {ok, pid()} | {error, term()}.

status(Bundle)

-spec status(pid() | atom()) -> {ok, map()} | {error, term()}.

stop(Bundle)

-spec stop(pid() | atom()) -> ok | {error, term()}.

terminate(Reason, State)