You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b425b03
Browse filesBrowse the repository at this point in the historyBrowse files
feat(sdk): start an embedded runtime from the main entry (#3843)
* feat(client): pin a client to one daemon instance
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* feat(host): expose an embedder-owned runtime and packed consumer coverage
Part of #3747. Refs #3757.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* chore(gates): declare the public host process boundary
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* test(host): cover startup rollback and instance replacement races
Use distinct host working directories and exercise disposal through the packed consumer. Keep the subprocess source with its integration test.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* chore(gates): verify host entry process capture is permitted
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* test(host): import the packed consumer plugin as a standalone module
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* test(ios): wait for the automation sheet control before clicking
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* feat(sdk): expose lazy in-process host from main entry
Route pinned clients through attach compatibility before checking their instance pin. Publish the embedded runtime's package code identity rather than the host application's entry identity.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* chore(gates): name main-entry host in process capture policy
Keep src/host.ts as the actual capture boundary behind the SDK's lazy factory.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix(host): preserve refusal and code identity metadata
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
Add `startAgentDevice()` to the main `agent-device` entry to own a daemon inside a Node.js process. Its client configuration pins attaching processes to that runtime, and `close()` returns the shutdown report.
`{ webDriver, dispose? }`. A `{ webDriver }` result stays a data descriptor the host interprets.
10
-
- One registry. Sources compose in the order built-in, store, embedder; the embedder slot arrives with #3757. Built-in providers use the
10
+
- One registry. Composition selects built-in, store, or embedder sources. Built-in providers use the
11
11
same shape as an installed plugin, and one function validates what every factory returns.
12
12
- Plugins import only types from agent-device. The type-only contract is `agent-device/plugins`;
13
13
there is no runtime helper, and the contract does not depend on a plugin's module URL.
@@ -58,10 +58,11 @@ had to fake the store to load a plugin from its own dependencies (#3747).
58
58
59
59
## Daemon ownership
60
60
61
-
The target is that starting or replacing a daemon is an explicit act, not a side effect of a client
62
-
call. Today a client call can still start a daemon; #3754 makes that explicit for the client
63
-
lifecycle, and #3757 adds `agent-device/host`, where an embedder owns its daemon and passes its
64
-
plugins as the third source.
61
+
Clients retain managed and attach lifecycles. Managed clients may start a daemon; attach clients cannot start or replace one. An embedder calls `startAgentDevice({ stateDir, plugins?, host? })` from `agent-device` to own a runtime in its process. The main entry loads the runtime when called. The returned client and serializable `clientConfig` identify that exact instance. Attaching checks normal version and code compatibility before checking the instance pin. `close()` shuts the runtime down. The CLI cannot signal or replace an embedder-owned runtime.
62
+
63
+
The embedder supplies plugin objects directly. They follow the built-ins through the same registry validation; this runtime does not read the plugin store. Plugin failures remain inventory data. Logging adapters, a separate package entry, and disposal protocols are not required to own a daemon: the library exposes the client, its attach configuration, and `close()`.
64
+
65
+
Decision history: the former explicit-start target is dropped; the client lifecycle continues to choose startup behavior. The main-entry API replaces the proposed host subpath and optional host controls, keeping ownership and attachment on the existing runtime and client paths (#3757).
0 commit comments