Dudu-0223
853f4d5cfb
refactor(subagent): drop host-user authority and split lifecycle publication
...
Remove the host-user continuation capability and the public residency query,
then separate the seam's public event payloads from its internal lifecycle
control interfaces.
`followup()` now takes the exact live direct parent `Agent` instead of a
`SubagentAuthority` union. No production adapter ever supplied user authority,
so the `UserAuthorityGrant` brand token existed only to stop a forged
discriminant from bypassing the direct-parent check — deleting the branch
retires the token, its mint method, and that attack surface together.
Narrowing `parent` from `Agent | undefined` to `Agent` removes three special
cases, including the path where a parentless epoch dispatched its lifecycle
events unscoped. Scoped-versus-global dispatch is now decided by the event, not
by whether a caller happened to have a parent.
`activationState()` had no caller; `ActivationState`, `ActivationObserver`, and
`ContinuationHost` are package-private.
New `src/lifecycle.ts` owns the contained emitter, the one-shot run observer,
and the Activation observer, while `SubagentRunInfo`/`SubagentRunEndInfo` move
to `src/types.ts` beside the other consumer-facing contracts. Those payloads are
public API — dsh-jsonrpc, hooks-claude, and the package invariant all consume
them — whereas the observer is a contract between two in-package collaborators,
so they no longer share a home merely for both being lifecycle-shaped. The
service keeps ownership of the scope carrier: `scopeTarget()` composes the
service's own context filter, so a narrowed stand-in would silently change
scope filtering.
Also drops now-unused dsh-tasks-local and dsh-tool-tasks dev dependencies, and
corrects the README claim that a pre-residency failure emits a terminal edge —
that path only ever rethrew.
2026-08-02 12:51:08 +08:00
..
2026-07-25 01:58:42 +08:00
2026-07-24 23:43:10 +08:00
2026-07-25 01:58:42 +08:00
2026-07-27 14:01:15 +08:00
2026-07-27 14:01:15 +08:00
2026-07-27 14:01:15 +08:00
2026-07-23 19:48:00 +08:00
2026-07-23 19:33:30 +08:00
2026-07-23 19:48:00 +08:00
2026-07-30 17:40:25 +08:00
2026-07-30 17:40:25 +08:00
2026-07-30 17:40:25 +08:00
2026-08-02 04:34:17 +08:00
2026-08-02 04:34:17 +08:00
2026-08-02 04:34:17 +08:00
2026-07-28 10:26:15 -07:00
2026-07-28 10:26:15 -07:00
2026-07-28 10:26:15 -07:00
2026-07-28 05:22:47 -07:00
2026-07-28 05:22:47 -07:00
2026-07-28 05:22:47 -07:00
2026-07-28 17:58:09 +08:00
2026-07-28 17:58:09 +08:00
2026-07-28 17:58:09 +08:00
2026-07-29 23:15:15 +08:00
2026-07-29 23:15:15 +08:00
2026-07-29 23:15:15 +08:00
2026-07-29 23:15:15 +08:00
2026-07-29 23:15:15 +08:00
2026-07-29 23:15:15 +08:00
2026-07-27 17:38:42 +08:00
2026-07-27 17:38:42 +08:00
2026-07-27 17:38:42 +08:00
2026-07-30 21:28:13 +08:00
2026-07-30 21:28:13 +08:00
2026-07-30 21:28:13 +08:00
2026-07-25 01:58:42 +08:00
2026-07-24 23:43:10 +08:00
2026-07-25 01:58:42 +08:00
2026-07-29 21:51:01 +08:00
2026-07-29 21:51:01 +08:00
2026-07-29 21:51:01 +08:00
2026-07-31 13:49:41 +08:00
2026-07-31 13:49:41 +08:00
2026-07-31 13:49:41 +08:00
2026-07-24 13:57:16 +08:00
2026-07-22 23:07:14 +08:00
2026-07-24 13:57:16 +08:00
2026-07-31 15:19:59 +08:00
2026-07-31 15:19:59 +08:00
2026-07-31 15:19:59 +08:00
2026-07-28 10:26:15 -07:00
2026-07-28 10:26:15 -07:00
2026-07-28 10:26:15 -07:00
2026-07-26 02:33:29 +08:00
2026-07-26 02:33:29 +08:00
2026-07-26 02:33:29 +08:00
2026-07-29 21:15:42 +08:00
2026-07-29 21:15:42 +08:00
2026-07-29 21:15:42 +08:00
2026-07-27 04:14:51 +08:00
2026-07-27 04:14:51 +08:00
2026-07-27 04:14:51 +08:00
2026-07-29 22:10:26 +08:00
2026-07-29 22:10:26 +08:00
2026-07-29 22:10:26 +08:00
2026-07-26 23:06:00 +08:00
2026-07-26 23:06:00 +08:00
2026-07-26 23:06:00 +08:00
2026-07-24 17:39:22 +08:00
2026-07-22 23:07:14 +08:00
2026-07-24 17:39:22 +08:00
2026-07-26 02:33:29 +08:00
2026-07-26 02:33:29 +08:00
2026-07-26 02:33:29 +08:00
2026-07-22 21:37:30 +08:00
2026-07-22 21:37:30 +08:00
2026-07-22 21:37:30 +08:00
2026-07-25 16:43:07 +08:00
2026-07-25 16:43:07 +08:00
2026-07-25 16:43:07 +08:00
2026-07-24 01:40:25 +08:00
2026-07-24 01:40:25 +08:00
2026-07-24 01:40:25 +08:00
2026-07-28 10:26:15 -07:00
2026-07-28 10:26:15 -07:00
2026-07-28 10:26:15 -07:00
2026-07-30 19:57:49 +08:00
2026-07-30 19:57:49 +08:00
2026-07-30 19:57:49 +08:00
2026-07-24 01:40:25 +08:00
2026-07-24 01:40:25 +08:00
2026-07-24 01:40:25 +08:00
2026-07-24 01:40:25 +08:00
2026-07-24 01:40:25 +08:00
2026-07-24 01:40:25 +08:00
2026-07-26 14:29:30 +08:00
2026-07-26 14:05:33 +08:00
2026-07-26 14:05:33 +08:00
2026-07-20 20:35:15 +08:00
2026-07-20 20:35:15 +08:00
2026-07-20 20:35:15 +08:00
2026-07-24 22:12:23 +08:00
2026-07-24 22:12:23 +08:00
2026-07-24 22:12:23 +08:00
2026-07-26 14:29:30 +08:00
2026-07-26 14:05:33 +08:00
2026-07-26 14:05:33 +08:00
2026-07-27 21:20:06 +08:00
2026-07-27 21:20:06 +08:00
2026-07-27 21:20:06 +08:00
2026-08-02 01:29:04 +08:00
2026-08-02 01:29:04 +08:00
2026-08-02 01:29:04 +08:00
2026-07-20 21:16:40 +08:00
2026-07-20 21:16:40 +08:00
2026-07-20 21:16:40 +08:00
2026-08-02 12:51:08 +08:00
2026-08-02 12:51:08 +08:00
2026-08-02 12:51:08 +08:00
2026-07-28 13:58:06 +08:00
2026-07-28 13:58:06 +08:00
2026-07-28 13:58:06 +08:00
2026-07-22 14:29:52 +08:00
2026-07-22 14:29:52 +08:00
2026-07-22 14:29:52 +08:00
2026-07-22 14:29:52 +08:00
2026-07-22 14:29:52 +08:00
2026-07-22 14:29:52 +08:00
2026-07-22 14:29:52 +08:00
2026-07-22 14:29:52 +08:00
2026-07-22 14:29:52 +08:00
2026-07-29 20:10:42 +08:00
2026-07-29 20:10:42 +08:00
2026-07-29 20:10:42 +08:00
2026-07-29 21:15:34 +08:00
2026-07-29 21:15:34 +08:00
2026-07-29 21:15:34 +08:00
2026-07-28 17:22:41 +08:00
2026-07-28 17:22:41 +08:00
2026-07-28 17:22:41 +08:00
2026-07-31 20:54:23 +08:00
2026-07-31 20:54:23 +08:00
2026-07-31 20:54:23 +08:00
2026-07-22 20:35:38 +08:00
2026-07-22 20:35:38 +08:00
2026-07-22 20:35:38 +08:00
2026-07-27 21:30:28 +08:00
2026-07-27 21:30:28 +08:00
2026-07-27 21:30:28 +08:00
2026-07-23 17:39:30 +08:00
2026-07-23 17:39:30 +08:00
2026-07-23 17:39:30 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 12:04:12 +08:00
2026-07-27 12:04:12 +08:00
2026-07-27 12:04:12 +08:00
2026-07-24 19:15:04 +08:00
2026-07-24 19:15:04 +08:00
2026-07-24 19:15:04 +08:00
2026-07-28 17:58:09 +08:00
2026-07-28 17:58:09 +08:00
2026-07-28 17:58:09 +08:00
2026-07-29 21:15:34 +08:00
2026-07-29 21:15:34 +08:00
2026-07-29 21:15:34 +08:00
2026-08-02 03:56:25 +08:00
2026-08-02 03:56:25 +08:00
2026-08-02 03:56:25 +08:00
2026-07-26 01:16:41 +08:00
2026-07-26 01:16:41 +08:00
2026-07-26 01:16:41 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-30 10:34:21 +08:00
2026-07-30 10:11:38 +08:00
2026-07-30 10:11:38 +08:00
2026-07-31 18:37:34 +08:00
2026-07-31 18:37:34 +08:00
2026-07-31 18:37:34 +08:00
2026-07-29 00:39:56 +08:00
2026-07-29 00:39:56 +08:00
2026-07-29 00:39:56 +08:00
2026-07-31 18:37:34 +08:00
2026-07-31 18:37:34 +08:00
2026-07-31 18:37:34 +08:00
2026-07-26 22:53:47 +08:00
2026-07-26 22:53:47 +08:00
2026-07-26 22:53:47 +08:00
2026-07-26 03:29:22 +08:00
2026-07-26 02:43:34 +08:00
2026-07-26 03:29:22 +08:00
2026-07-26 04:24:13 +08:00
2026-07-26 04:02:38 +08:00
2026-07-26 04:24:13 +08:00
2026-07-26 15:26:52 +08:00
2026-07-26 15:26:52 +08:00
2026-07-26 15:26:52 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-31 18:37:34 +08:00
2026-07-31 18:37:34 +08:00
2026-07-31 18:37:34 +08:00
2026-07-29 22:27:49 +08:00
2026-07-29 22:27:49 +08:00
2026-07-29 22:27:49 +08:00
2026-07-31 18:25:03 +08:00
2026-07-31 18:25:03 +08:00
2026-07-31 18:25:03 +08:00
2026-07-29 20:16:13 +08:00
2026-07-29 20:16:13 +08:00
2026-07-29 20:16:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-27 18:55:13 +08:00
2026-07-29 21:15:34 +08:00
2026-07-29 21:15:34 +08:00
2026-07-29 21:15:34 +08:00
2026-07-28 01:41:32 +08:00
2026-07-28 01:41:32 +08:00
2026-07-28 01:41:32 +08:00
2026-07-31 20:48:22 +08:00
2026-07-31 20:47:55 +08:00
2026-07-31 20:47:55 +08:00
2026-07-30 09:40:38 +08:00
2026-07-30 09:40:38 +08:00
2026-07-30 09:40:38 +08:00
2026-07-31 18:37:34 +08:00
2026-07-31 18:37:34 +08:00
2026-07-31 18:37:34 +08:00
2026-08-02 12:51:08 +08:00
2026-08-02 12:51:08 +08:00
2026-08-02 12:51:08 +08:00
2026-07-31 16:49:55 +08:00
2026-07-31 16:49:55 +08:00
2026-07-31 16:49:55 +08:00
2026-07-31 23:37:53 +08:00
2026-07-31 23:37:53 +08:00
2026-07-31 23:37:53 +08:00
2026-07-31 23:37:53 +08:00
2026-07-31 23:37:53 +08:00
2026-07-31 23:37:53 +08:00
2026-07-30 21:04:00 +08:00
2026-07-30 21:04:00 +08:00
2026-07-30 21:04:00 +08:00
2026-07-31 23:37:53 +08:00
2026-07-31 23:37:53 +08:00
2026-07-31 23:37:53 +08:00
2026-07-28 19:43:56 +08:00
2026-07-28 19:43:56 +08:00
2026-07-28 19:43:56 +08:00
2026-07-28 14:24:41 +08:00
2026-07-28 14:24:41 +08:00
2026-07-28 14:24:41 +08:00
2026-07-29 16:42:10 +08:00
2026-07-29 16:42:10 +08:00
2026-07-29 16:42:10 +08:00
2026-07-31 20:51:05 +08:00
2026-07-31 20:51:05 +08:00
2026-07-31 20:51:05 +08:00
2026-07-29 14:12:01 +08:00
2026-07-29 14:12:01 +08:00
2026-07-29 14:12:01 +08:00
2026-07-29 21:09:02 +08:00
2026-07-29 21:09:02 +08:00
2026-07-29 21:09:02 +08:00
2026-07-31 14:28:52 +08:00
2026-07-31 14:28:52 +08:00
2026-07-31 14:28:52 +08:00
2026-07-31 01:27:56 +08:00
2026-07-31 01:27:56 +08:00
2026-07-31 01:27:56 +08:00
2026-07-31 15:27:10 +08:00
2026-07-31 15:27:10 +08:00
2026-07-31 15:27:10 +08:00
2026-08-02 01:29:04 +08:00
2026-08-02 01:29:04 +08:00
2026-08-02 01:29:04 +08:00
2026-07-31 13:49:41 +08:00
2026-07-31 13:49:41 +08:00
2026-07-31 13:49:41 +08:00
2026-07-31 10:29:20 +08:00
2026-07-31 10:29:20 +08:00
2026-07-31 10:29:20 +08:00
2026-07-31 16:20:54 +08:00
2026-07-31 16:20:54 +08:00
2026-07-31 16:20:54 +08:00
2026-07-30 19:38:18 +08:00
2026-07-30 19:38:18 +08:00
2026-07-30 19:38:18 +08:00
2026-07-30 22:00:34 +08:00
2026-07-30 22:00:34 +08:00
2026-07-30 22:00:34 +08:00
2026-07-31 16:34:06 +08:00
2026-07-31 16:34:06 +08:00
2026-07-31 16:34:06 +08:00
2026-07-31 17:05:30 +08:00
2026-07-31 17:05:30 +08:00
2026-07-31 17:05:30 +08:00
2026-07-31 17:47:07 +08:00
2026-07-31 17:47:07 +08:00
2026-07-31 17:47:07 +08:00
2026-07-30 17:26:44 +08:00
2026-07-30 17:26:44 +08:00
2026-07-30 17:26:44 +08:00
2026-07-30 16:20:34 +08:00
2026-07-30 16:20:34 +08:00
2026-07-30 16:20:34 +08:00
2026-07-30 21:36:42 +08:00
2026-07-30 21:36:42 +08:00
2026-07-30 21:36:42 +08:00
2026-07-30 21:28:38 +08:00
2026-07-30 21:28:38 +08:00
2026-07-30 21:28:38 +08:00
2026-07-30 22:26:31 +08:00
2026-07-30 22:26:14 +08:00
2026-07-30 22:26:14 +08:00
2026-07-30 22:24:57 +08:00
2026-07-30 22:24:57 +08:00
2026-07-30 22:24:57 +08:00
2026-07-30 21:13:09 +08:00
2026-07-30 21:13:09 +08:00
2026-07-30 21:13:09 +08:00
2026-07-30 22:49:41 +08:00
2026-07-30 22:49:41 +08:00
2026-07-30 22:49:41 +08:00
2026-07-30 21:21:29 +08:00
2026-07-30 21:21:29 +08:00
2026-07-30 21:21:29 +08:00
2026-07-31 15:49:59 +08:00
2026-07-31 15:49:59 +08:00
2026-07-31 15:49:59 +08:00
2026-08-02 03:56:25 +08:00
2026-08-02 03:56:25 +08:00
2026-08-02 03:56:25 +08:00
2026-07-31 23:37:53 +08:00
2026-07-31 23:37:53 +08:00
2026-07-31 23:37:53 +08:00
2026-07-31 13:24:30 +08:00
2026-07-31 13:24:30 +08:00
2026-07-31 13:24:30 +08:00
2026-07-31 16:13:12 +08:00
2026-07-31 16:13:12 +08:00
2026-07-31 16:13:12 +08:00
2026-07-31 20:39:53 +08:00
2026-07-31 20:39:53 +08:00
2026-07-31 20:39:53 +08:00
2026-07-31 14:08:13 +08:00
2026-07-31 14:08:13 +08:00
2026-07-31 14:08:13 +08:00
2026-07-31 14:28:03 +08:00
2026-07-31 14:28:03 +08:00
2026-07-31 14:28:03 +08:00
2026-07-31 02:34:52 -07:00
2026-07-31 02:34:52 -07:00
2026-07-31 02:34:52 -07:00
2026-07-31 16:34:16 +08:00
2026-07-31 16:34:16 +08:00
2026-07-31 16:34:16 +08:00
2026-07-31 20:39:53 +08:00
2026-07-31 20:39:53 +08:00
2026-07-31 20:39:53 +08:00
2026-07-31 14:28:03 +08:00
2026-07-31 14:28:03 +08:00
2026-07-31 14:28:03 +08:00
2026-07-31 20:39:53 +08:00
2026-07-31 20:39:53 +08:00
2026-07-31 20:39:53 +08:00
2026-08-02 03:56:25 +08:00
2026-08-02 03:56:25 +08:00
2026-08-02 03:56:25 +08:00