Repository navigation
Expand file tree
/
Copy pathhost-types.ts
More file actions
28 lines (26 loc) · 1.46 KB
/
Copy pathhost-types.ts
File metadata and controls
28 lines (26 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import type { HostEnvironment } from '@agent-device/kernel/source-value';
import type { AgentDeviceClientConfig } from '@agent-device/contracts/client';
import type { AgentDeviceClient } from '@agent-device/command-surface';
import type { AgentDevicePlugin } from '@agent-device/plugins/contract';
import type { ReplayEnginePlugin } from '@agent-device/plugins/replay-backend';
import type { ShutdownReport } from '@agent-device/daemon';
export type StartAgentDeviceOptions = Readonly<{
/** Required state directory to own, resolved against the host working directory. */
stateDir: string;
/** The environment and working directory to run with. Defaults to one captured copy of this process's. */
host?: HostEnvironment;
/** Imported plugins to register after the built-ins. The plugin store is not read. */
plugins?: readonly (AgentDevicePlugin | ReplayEnginePlugin)[];
}>;
export type AgentDeviceHost = Readonly<{
/** A client pinned to this instance. */
client: AgentDeviceClient;
/** Serializable attach config containing this instance's bearer token. Keep it inside the host. */
clientConfig: AgentDeviceClientConfig;
/**
* Reports teardown outcomes. `platformOwners` is `closed`, `pending` when the shutdown budget
* expires, or `failed` when an owner rejects. Pending or failed owners retain the daemon
* registration until this process exits. Repeated calls share one close; never exits the process.
*/
close: () => Promise<ShutdownReport>;
}>;