@huanlin/dsh-plugin-yet-another-subagent 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,67 +1,67 @@
1
- /**
2
- * SettingsPage — the `ya-subagent` settings section: profile list CRUD.
3
- *
4
- * Visual language: matches ModelsSection / GeneralSection — outlined rowCard
5
- * per profile (border-l2, r12, p12/14), filled editor surface
6
- * (bg-module-platform, r12, p14/16), capsule controls (h36 r18 primary,
7
- * h28 r14 secondary), 32px fields with border-l2 / bg-layer-1, 12/18 caption
8
- * labels. Every color resolves through --dsw-alias-* tokens.
9
- *
10
- * Each profile card is collapsible (chevron in the row head); the editor
11
- * surface is hidden when collapsed. Builtin profiles (cordis.yml seed) carry
12
- * a `builtin`/`内置` badge next to the title. The "+ Add subagent" button at
13
- * the bottom reveals an inline draft card with all fields editable (including
14
- * id) and Create / Cancel actions.
15
- *
16
- * The persona field is a radio (inherit deployment persona vs custom text);
17
- * the textarea is shown only when custom. The tool filter is a select
18
- * (none / allow / deny); a multi-select dropdown is shown only when allow or
19
- * deny is picked, populated from `tools.list` (the host's current
20
- * `ctx.tools.schemas()`).
21
- *
22
- * Pulls the profile list once on mount via `connection.rpc.call('/ya-subagent',
23
- * 'profiles.list')`, dispatches add/update/remove through the
24
- * same RPC. The toolview slot is keyed by `subagent` and registered once at
25
- * plugin load, so profile mutations do not need to re-register slots.
26
- *
27
- * @module @huanlin/dsh-plugin-yet-another-subagent/client/SettingsPage
28
- */
29
- import type { PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
30
- import type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';
31
- import type { ClientConnectionRpc } from '@deepseek-ai/dsh-client-connection/client';
32
- import type { SubagentProfile } from '../types.ts';
33
- /** Inject face: RPC handle + locale translate. */
34
- export interface YaSubagentSettingsInjected {
35
- readonly rpc: ClientConnectionRpc;
36
- /** Refetch the profile list from the host. */
37
- readonly fetchProfiles: () => Promise<readonly SubagentProfile[]>;
38
- /** Refetch the routable model catalog (provider groups); undefined on failure. */
39
- readonly fetchModelCatalog: () => Promise<ModelCatalogData | undefined>;
40
- /** Bound locale translator for the ya-subagent namespace. */
41
- readonly t: (key: string) => string;
42
- }
43
- /** Full props: settings.section runtime share + locale seat + inject. */
44
- type SettingsPageProps = PropsRuntime<'settings.section'> & PropsLocale<'ya-subagent'> & YaSubagentSettingsInjected;
45
- /** One model inside a provider group (mirrors `ModelCatalogModel`). */
46
- interface ModelEntry {
47
- readonly id: string;
48
- readonly name: string;
49
- readonly description?: string;
50
- }
51
- /** One provider group (mirrors `ModelProviderGroup`). */
52
- interface ModelGroup {
53
- readonly id: string;
54
- readonly name: string;
55
- readonly models: readonly ModelEntry[];
56
- }
57
- /** Model catalog wire shape (mirror of the host `ModelCatalog` read face). */
58
- interface ModelCatalogData {
59
- readonly groups: readonly ModelGroup[];
60
- }
61
- /**
62
- * Render the subagent profiles settings page.
63
- * @param props - settings.section runtime share + locale + inject.
64
- * @returns the page element.
65
- */
66
- export declare function SettingsPage({ rpc, fetchProfiles, fetchModelCatalog, t }: SettingsPageProps): import("react").JSX.Element;
67
- export {};
1
+ /**
2
+ * SettingsPage — the `ya-subagent` settings section: profile list CRUD.
3
+ *
4
+ * Visual language: matches ModelsSection / GeneralSection — outlined rowCard
5
+ * per profile (border-l2, r12, p12/14), filled editor surface
6
+ * (bg-module-platform, r12, p14/16), capsule controls (h36 r18 primary,
7
+ * h28 r14 secondary), 32px fields with border-l2 / bg-layer-1, 12/18 caption
8
+ * labels. Every color resolves through --dsw-alias-* tokens.
9
+ *
10
+ * Each profile card is collapsible (chevron in the row head); the editor
11
+ * surface is hidden when collapsed. Builtin profiles (cordis.yml seed) carry
12
+ * a `builtin`/`内置` badge next to the title. The "+ Add subagent" button at
13
+ * the bottom reveals an inline draft card with all fields editable (including
14
+ * id) and Create / Cancel actions.
15
+ *
16
+ * The persona field is a radio (inherit deployment persona vs custom text);
17
+ * the textarea is shown only when custom. The tool filter is a select
18
+ * (none / allow / deny); a multi-select dropdown is shown only when allow or
19
+ * deny is picked, populated from `tools.list` (the host's current
20
+ * `ctx.tools.schemas()`).
21
+ *
22
+ * Pulls the profile list once on mount via `connection.rpc.call('/api',
23
+ * 'ya-subagent.profiles.list')`, dispatches add/update/remove through the
24
+ * same RPC. The toolview slot is keyed by `subagent` and registered once at
25
+ * plugin load, so profile mutations do not need to re-register slots.
26
+ *
27
+ * @module @huanlin/dsh-plugin-yet-another-subagent/client/SettingsPage
28
+ */
29
+ import type { PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
30
+ import type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';
31
+ import type { ClientConnectionRpc } from '@deepseek-ai/dsh-client-connection/client';
32
+ import type { SubagentProfile } from '../types.ts';
33
+ /** Inject face: RPC handle + locale translate. */
34
+ export interface YaSubagentSettingsInjected {
35
+ readonly rpc: ClientConnectionRpc;
36
+ /** Refetch the profile list from the host. */
37
+ readonly fetchProfiles: () => Promise<readonly SubagentProfile[]>;
38
+ /** Refetch the routable model catalog (provider groups); undefined on failure. */
39
+ readonly fetchModelCatalog: () => Promise<ModelCatalogData | undefined>;
40
+ /** Bound locale translator for the ya-subagent namespace. */
41
+ readonly t: (key: string) => string;
42
+ }
43
+ /** Full props: settings.section runtime share + locale seat + inject. */
44
+ type SettingsPageProps = PropsRuntime<'settings.section'> & PropsLocale<'ya-subagent'> & YaSubagentSettingsInjected;
45
+ /** One model inside a provider group (mirrors `ModelCatalogModel`). */
46
+ interface ModelEntry {
47
+ readonly id: string;
48
+ readonly name: string;
49
+ readonly description?: string;
50
+ }
51
+ /** One provider group (mirrors `ModelProviderGroup`). */
52
+ interface ModelGroup {
53
+ readonly id: string;
54
+ readonly name: string;
55
+ readonly models: readonly ModelEntry[];
56
+ }
57
+ /** Model catalog wire shape (mirror of the host `ModelCatalog` read face). */
58
+ interface ModelCatalogData {
59
+ readonly groups: readonly ModelGroup[];
60
+ }
61
+ /**
62
+ * Render the subagent profiles settings page.
63
+ * @param props - settings.section runtime share + locale + inject.
64
+ * @returns the page element.
65
+ */
66
+ export declare function SettingsPage({ rpc, fetchProfiles, fetchModelCatalog, t }: SettingsPageProps): import("react").JSX.Element;
67
+ export {};
@@ -1,57 +1,57 @@
1
- /**
2
- * SubagentCard — the model-facing toolcall card for the `subagent` tool.
3
- *
4
- * Three display branches:
5
- * 1. **Running** (block is `RunningToolCall`): the tool call is in flight.
6
- * Show "running" with a spinner dot; no child session to subscribe to.
7
- * 2. **Continuable settled** (result text matches `started <label>
8
- * subagent <id>`): subscribe to the child's `yaSubagentProgress`
9
- * projection for live toolcall/token counts; clickable to open.
10
- * 3. **Foreground settled** (result text is the child's output): the
11
- * one-shot child has completed; show "completed" with an output
12
- * preview. No child session survives.
13
- *
14
- * @module @huanlin/dsh-plugin-yet-another-subagent/client/SubagentCard
15
- */
16
- import type { ToolCallViewProps } from '@deepseek-ai/dsh-client-ui-tool/client';
17
- import type { InjectFace, PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';
18
- /** Sessions service shape consumed by this card (narrow face of ISessions). */
19
- export interface SubagentCardSessions {
20
- binding(id: string): {
21
- session: {
22
- projections: {
23
- /** Absence of a value is an `undefined` snapshot, never a missing face. */
24
- faceOf(key: string): {
25
- getSnapshot(): unknown;
26
- subscribe(fn: () => void): () => void;
27
- };
28
- };
29
- };
30
- } | undefined;
31
- openSubagent(address: {
32
- parentSessionId: string;
33
- childSessionId: string;
34
- mode: 'continuable' | 'one-shot';
35
- }): void;
36
- subagentAddress(id: string): {
37
- parentSessionId: string;
38
- childSessionId: string;
39
- mode: 'continuable' | 'one-shot';
40
- } | undefined;
41
- refreshSubagents(parentSessionId: string): Promise<void>;
42
- }
43
- /** Inject face: the sessions service handle + profile label lookup. */
44
- export type SubagentCardInjected = {
45
- sessions: SubagentCardSessions;
46
- /** Resolve a profile id to its display label; undefined if unknown. */
47
- profileLabelOf: (id: string) => string | undefined;
48
- };
49
- /** Full props: toolview runtime share + this package's locale seat + inject. */
50
- type SubagentCardProps = ToolCallViewProps & PropsLocale<'ya-subagent'> & InjectFace<SubagentCardInjected>;
51
- /**
52
- * Render one `subagent` tool call as a compact live card.
53
- * @param props - keyed toolview payload + locale seat + sessions inject.
54
- * @returns the dedicated subagent card.
55
- */
56
- export declare function SubagentCard({ block, callId, toolName, sessionId, sessions, profileLabelOf, t }: SubagentCardProps): import("react").JSX.Element;
57
- export {};
1
+ /**
2
+ * SubagentCard — the model-facing toolcall card for the `subagent` tool.
3
+ *
4
+ * Three display branches:
5
+ * 1. **Running** (block is `RunningToolCall`): the tool call is in flight.
6
+ * Show "running" with a spinner dot; no child session to subscribe to.
7
+ * 2. **Continuable settled** (result text matches `started <label>
8
+ * subagent <id>`): subscribe to the child's `yaSubagentProgress`
9
+ * projection for live toolcall/token counts; clickable to open.
10
+ * 3. **Foreground settled** (result text is the child's output): the
11
+ * one-shot child has completed; show "completed" with an output
12
+ * preview. No child session survives.
13
+ *
14
+ * @module @huanlin/dsh-plugin-yet-another-subagent/client/SubagentCard
15
+ */
16
+ import type { ToolCallViewProps } from '@deepseek-ai/dsh-client-ui-tool/client';
17
+ import type { InjectFace, PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';
18
+ /** Sessions service shape consumed by this card (narrow face of ISessions). */
19
+ export interface SubagentCardSessions {
20
+ binding(id: string): {
21
+ session: {
22
+ projections: {
23
+ /** Absence of a value is an `undefined` snapshot, never a missing face. */
24
+ faceOf(key: string): {
25
+ getSnapshot(): unknown;
26
+ subscribe(fn: () => void): () => void;
27
+ };
28
+ };
29
+ };
30
+ } | undefined;
31
+ openSubagent(address: {
32
+ parentSessionId: string;
33
+ childSessionId: string;
34
+ mode: 'continuable' | 'one-shot';
35
+ }): void;
36
+ subagentAddress(id: string): {
37
+ parentSessionId: string;
38
+ childSessionId: string;
39
+ mode: 'continuable' | 'one-shot';
40
+ } | undefined;
41
+ refreshSubagents(parentSessionId: string): Promise<void>;
42
+ }
43
+ /** Inject face: the sessions service handle + profile label lookup. */
44
+ export type SubagentCardInjected = {
45
+ sessions: SubagentCardSessions;
46
+ /** Resolve a profile id to its display label; undefined if unknown. */
47
+ profileLabelOf: (id: string) => string | undefined;
48
+ };
49
+ /** Full props: toolview runtime share + this package's locale seat + inject. */
50
+ type SubagentCardProps = ToolCallViewProps & PropsLocale<'ya-subagent'> & InjectFace<SubagentCardInjected>;
51
+ /**
52
+ * Render one `subagent` tool call as a compact live card.
53
+ * @param props - keyed toolview payload + locale seat + sessions inject.
54
+ * @returns the dedicated subagent card.
55
+ */
56
+ export declare function SubagentCard({ block, callId, toolName, sessionId, sessions, profileLabelOf, t }: SubagentCardProps): import("react").JSX.Element;
57
+ export {};
@@ -1,64 +1,64 @@
1
- /**
2
- * SubagentTreeView — a `conversation.view` entry showing the root session's
3
- * full subagent tree (all depths) with live progress.
4
- *
5
- * Uses `sessions.subagentsByParent` (the catalog) as the primary tree
6
- * structure source — this works for ALL depths without needing per-session
7
- * bindings. `setSubagentCatalogOpen` keeps catalogs auto-refreshing.
8
- * Projections (`yaSubagentProgress`) are used additionally when a session
9
- * binding is available (current session + opened children) for richer data.
10
- *
11
- * @module @huanlin/dsh-plugin-yet-another-subagent/client/SubagentTreeView
12
- */
13
- import type { ConvViewProps } from '@deepseek-ai/dsh-client-ui-conversation/client';
14
- import type { InjectFace, PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';
15
- /** Catalog entry shape (narrow face of SubagentListEntry). */
16
- interface CatalogEntry {
17
- readonly kind: string;
18
- readonly id: string;
19
- readonly mode?: string;
20
- readonly activity?: string;
21
- readonly hasChildren?: boolean;
22
- readonly label?: string;
23
- }
24
- /** Sessions service shape consumed by this view. */
25
- interface TreeSessions {
26
- binding(id: string): {
27
- session: {
28
- projections: {
29
- /** Absence of a value is an `undefined` snapshot, never a missing face. */
30
- faceOf(key: string): {
31
- getSnapshot(): unknown;
32
- subscribe(fn: () => void): () => void;
33
- };
34
- };
35
- };
36
- } | undefined;
37
- openSubagent(address: {
38
- parentSessionId: string;
39
- childSessionId: string;
40
- mode: 'continuable' | 'one-shot';
41
- }): void;
42
- subagentAddress(id: string): {
43
- parentSessionId: string;
44
- childSessionId: string;
45
- mode: 'continuable' | 'one-shot';
46
- } | undefined;
47
- refreshSubagents(parentSessionId: string): Promise<void>;
48
- setSubagentCatalogOpen(parentSessionId: string, open: boolean): void;
49
- subagentsByParent: Readonly<Record<string, {
50
- entries: readonly CatalogEntry[];
51
- parentAvailable: boolean;
52
- }>>;
53
- }
54
- export type SubagentTreeViewInjected = {
55
- sessions: TreeSessions;
56
- profileLabelOf: (id: string) => string | undefined;
57
- };
58
- type SubagentTreeViewProps = ConvViewProps & PropsLocale<'ya-subagent'> & InjectFace<SubagentTreeViewInjected>;
59
- /**
60
- * Render the subagent tree view. Always shows the ROOT session's full tree;
61
- * highlights the current session if it is a subagent.
62
- */
63
- export declare function SubagentTreeView({ sessionId, sessions, profileLabelOf, t }: SubagentTreeViewProps): import("react").JSX.Element;
64
- export {};
1
+ /**
2
+ * SubagentTreeView — a `conversation.view` entry showing the root session's
3
+ * full subagent tree (all depths) with live progress.
4
+ *
5
+ * Uses `sessions.subagentsByParent` (the catalog) as the primary tree
6
+ * structure source — this works for ALL depths without needing per-session
7
+ * bindings. `setSubagentCatalogOpen` keeps catalogs auto-refreshing.
8
+ * Projections (`yaSubagentProgress`) are used additionally when a session
9
+ * binding is available (current session + opened children) for richer data.
10
+ *
11
+ * @module @huanlin/dsh-plugin-yet-another-subagent/client/SubagentTreeView
12
+ */
13
+ import type { ConvViewProps } from '@deepseek-ai/dsh-client-ui-conversation/client';
14
+ import type { InjectFace, PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';
15
+ /** Catalog entry shape (narrow face of SubagentListEntry). */
16
+ interface CatalogEntry {
17
+ readonly kind: string;
18
+ readonly id: string;
19
+ readonly mode?: string;
20
+ readonly activity?: string;
21
+ readonly hasChildren?: boolean;
22
+ readonly label?: string;
23
+ }
24
+ /** Sessions service shape consumed by this view. */
25
+ interface TreeSessions {
26
+ binding(id: string): {
27
+ session: {
28
+ projections: {
29
+ /** Absence of a value is an `undefined` snapshot, never a missing face. */
30
+ faceOf(key: string): {
31
+ getSnapshot(): unknown;
32
+ subscribe(fn: () => void): () => void;
33
+ };
34
+ };
35
+ };
36
+ } | undefined;
37
+ openSubagent(address: {
38
+ parentSessionId: string;
39
+ childSessionId: string;
40
+ mode: 'continuable' | 'one-shot';
41
+ }): void;
42
+ subagentAddress(id: string): {
43
+ parentSessionId: string;
44
+ childSessionId: string;
45
+ mode: 'continuable' | 'one-shot';
46
+ } | undefined;
47
+ refreshSubagents(parentSessionId: string): Promise<void>;
48
+ setSubagentCatalogOpen(parentSessionId: string, open: boolean): void;
49
+ subagentsByParent: Readonly<Record<string, {
50
+ entries: readonly CatalogEntry[];
51
+ parentAvailable: boolean;
52
+ }>>;
53
+ }
54
+ export type SubagentTreeViewInjected = {
55
+ sessions: TreeSessions;
56
+ profileLabelOf: (id: string) => string | undefined;
57
+ };
58
+ type SubagentTreeViewProps = ConvViewProps & PropsLocale<'ya-subagent'> & InjectFace<SubagentTreeViewInjected>;
59
+ /**
60
+ * Render the subagent tree view. Always shows the ROOT session's full tree;
61
+ * highlights the current session if it is a subagent.
62
+ */
63
+ export declare function SubagentTreeView({ sessionId, sessions, profileLabelOf, t }: SubagentTreeViewProps): import("react").JSX.Element;
64
+ export {};
@@ -1,29 +1,29 @@
1
- /**
2
- * yet-another-subagent — browser half.
3
- *
4
- * Single bundle, dual entry: this is the client half (exports `./client`).
5
- * Host half ships via `.` (see `src/index.ts`).
6
- *
7
- * Two registrations:
8
- * 1. `settings.section` slot — the profile editor page (SettingsPage).
9
- * 2. `tool.call.toolview` keyed slot, key `subagent` — the live toolcall
10
- * card (SubagentCard). A single key covers all profiles because the
11
- * tool name is always `subagent`; the profile is a call parameter.
12
- *
13
- * @module @huanlin/dsh-plugin-yet-another-subagent/client
14
- */
15
- import type { Context as ClientContext } from '@deepseek-ai/cordis';
16
- import { type YaSubagentKey } from './locales.ts';
17
- declare module '@deepseek-ai/dsh-client-ui-slots' {
18
- interface LocaleNamespaceMap {
19
- /** The subagent settings page + tool card copy. */
20
- 'ya-subagent': YaSubagentKey;
21
- }
22
- }
23
- /** Required services: settings/tool slots, locale, sessions, connection. */
24
- export declare const inject: string[];
25
- /**
26
- * Client plugin body: register settings page + single `subagent` toolview slot.
27
- * @param ctx - client root context.
28
- */
29
- export declare function apply(ctx: ClientContext): void;
1
+ /**
2
+ * yet-another-subagent — browser half.
3
+ *
4
+ * Single bundle, dual entry: this is the client half (exports `./client`).
5
+ * Host half ships via `.` (see `src/index.ts`).
6
+ *
7
+ * Two registrations:
8
+ * 1. `settings.section` slot — the profile editor page (SettingsPage).
9
+ * 2. `tool.call.toolview` keyed slot, key `subagent` — the live toolcall
10
+ * card (SubagentCard). A single key covers all profiles because the
11
+ * tool name is always `subagent`; the profile is a call parameter.
12
+ *
13
+ * @module @huanlin/dsh-plugin-yet-another-subagent/client
14
+ */
15
+ import type { Context as ClientContext } from '@deepseek-ai/cordis';
16
+ import { type YaSubagentKey } from './locales.ts';
17
+ declare module '@deepseek-ai/dsh-client-ui-slots' {
18
+ interface LocaleNamespaceMap {
19
+ /** The subagent settings page + tool card copy. */
20
+ 'ya-subagent': YaSubagentKey;
21
+ }
22
+ }
23
+ /** Required services: settings/tool slots, locale, sessions, connection. */
24
+ export declare const inject: string[];
25
+ /**
26
+ * Client plugin body: register settings page + single `subagent` toolview slot.
27
+ * @param ctx - client root context.
28
+ */
29
+ export declare function apply(ctx: ClientContext): void;
@@ -1,13 +1,13 @@
1
- /**
2
- * Locale dictionaries for yet-another-subagent.
3
- *
4
- * @module @huanlin/dsh-plugin-yet-another-subagent/client/locales
5
- */
6
- /** All copy keys for the ya-subagent namespace. */
7
- export type YaSubagentKey = 'common.close' | 'nav' | 'page.title' | 'page.empty' | 'page.add' | 'page.add.placeholder.id' | 'page.add.placeholder.label' | 'page.add.submit' | 'page.add.error' | 'page.add.cancel' | 'row.label' | 'row.id' | 'row.model.kind.auto' | 'row.model.kind.manual' | 'row.model.provider' | 'row.model.model' | 'row.model.provider.placeholder' | 'row.model.model.placeholder' | 'row.model.noModels' | 'row.persona' | 'row.persona.kind.inherit' | 'row.persona.kind.custom' | 'row.persona.text' | 'row.toolFilter' | 'row.toolFilter.kind.none' | 'row.toolFilter.kind.allow' | 'row.toolFilter.kind.deny' | 'row.toolFilter.tools' | 'row.toolFilter.tools.search' | 'row.toolFilter.tools.empty' | 'row.toolFilter.tools.selected' | 'row.toolFilter.tools.selectAll' | 'row.toolFilter.tools.clear' | 'row.maxDepth' | 'row.delete' | 'row.delete.confirm' | 'row.save' | 'row.saved' | 'row.error' | 'row.expand' | 'row.collapse' | 'badge.builtin' | 'card.starting' | 'card.waiting' | 'card.idle' | 'card.running' | 'card.completed' | 'card.child-running' | 'card.child-idle' | 'card.toolcalls' | 'card.tokens' | 'card.calling' | 'card.open' | 'card.unavailable' | 'tree.tab' | 'tree.empty' | 'tree.rootHint' | 'tree.toolcalls' | 'tree.tokens' | 'tree.calling' | 'tree.state.running' | 'tree.state.idle' | 'tree.state.settled' | 'repair.button' | 'repair.confirm.title' | 'repair.confirm.body' | 'repair.confirm.warning' | 'repair.confirm.cancel' | 'repair.confirm.proceed' | 'repair.running' | 'repair.result.title' | 'repair.result.scanned' | 'repair.result.repaired' | 'repair.result.skipped' | 'repair.result.errors' | 'repair.result.errorEntry' | 'repair.result.close' | 'repair.error';
8
- /** Locale namespace id. */
9
- export declare const NS = "ya-subagent";
10
- /** English dictionary. */
11
- export declare const en: Record<YaSubagentKey, string>;
12
- /** Chinese dictionary. */
13
- export declare const zh: Record<YaSubagentKey, string>;
1
+ /**
2
+ * Locale dictionaries for yet-another-subagent.
3
+ *
4
+ * @module @huanlin/dsh-plugin-yet-another-subagent/client/locales
5
+ */
6
+ /** All copy keys for the ya-subagent namespace. */
7
+ export type YaSubagentKey = 'common.close' | 'nav' | 'page.title' | 'page.empty' | 'page.add' | 'page.add.placeholder.id' | 'page.add.placeholder.label' | 'page.add.submit' | 'page.add.error' | 'page.add.cancel' | 'row.label' | 'row.id' | 'row.model.kind.auto' | 'row.model.kind.manual' | 'row.model.provider' | 'row.model.model' | 'row.model.provider.placeholder' | 'row.model.model.placeholder' | 'row.model.noModels' | 'row.persona' | 'row.persona.kind.inherit' | 'row.persona.kind.custom' | 'row.persona.text' | 'row.toolFilter' | 'row.toolFilter.kind.none' | 'row.toolFilter.kind.allow' | 'row.toolFilter.kind.deny' | 'row.toolFilter.tools' | 'row.toolFilter.tools.search' | 'row.toolFilter.tools.empty' | 'row.toolFilter.tools.selected' | 'row.toolFilter.tools.selectAll' | 'row.toolFilter.tools.clear' | 'row.maxDepth' | 'row.delete' | 'row.delete.confirm' | 'row.save' | 'row.saved' | 'row.error' | 'row.expand' | 'row.collapse' | 'badge.builtin' | 'card.starting' | 'card.waiting' | 'card.idle' | 'card.running' | 'card.completed' | 'card.child-running' | 'card.child-idle' | 'card.toolcalls' | 'card.tokens' | 'card.calling' | 'card.open' | 'card.unavailable' | 'tree.tab' | 'tree.empty' | 'tree.rootHint' | 'tree.toolcalls' | 'tree.tokens' | 'tree.calling' | 'tree.state.running' | 'tree.state.idle' | 'tree.state.settled' | 'repair.button' | 'repair.confirm.title' | 'repair.confirm.body' | 'repair.confirm.warning' | 'repair.confirm.cancel' | 'repair.confirm.proceed' | 'repair.running' | 'repair.result.title' | 'repair.result.scanned' | 'repair.result.repaired' | 'repair.result.skipped' | 'repair.result.errors' | 'repair.result.errorEntry' | 'repair.result.close' | 'repair.error';
8
+ /** Locale namespace id. */
9
+ export declare const NS = "ya-subagent";
10
+ /** English dictionary. */
11
+ export declare const en: Record<YaSubagentKey, string>;
12
+ /** Chinese dictionary. */
13
+ export declare const zh: Record<YaSubagentKey, string>;
@@ -1,42 +1,42 @@
1
- /**
2
- * yet-another-subagent — host plugin entry.
3
- *
4
- * Single bundle, dual entry: this is the host half (exports `.`). The browser
5
- * half ships via `./client` (see `src/client/index.ts`).
6
- *
7
- * Architecture (design doc §1):
8
- * - A single `subagent` tool is exposed to the model. The desired profile
9
- * is selected via the `profile` parameter (enum of profile ids). Profile
10
- * add/remove updates the enum without changing the tool name set.
11
- * - The tool reuses the official `spawn` provider via `ctx.subagents.startContinuable`.
12
- * - Profiles live in an in-memory `ProfileStore` mutated through RPC.
13
- * - Two projections (`subagentProfile` on parent, `yaSubagentProgress` on
14
- * child) bridge the single-stage client runtime so SubagentCard can
15
- * subscribe to live child progress.
16
- *
17
- * @module @huanlin/dsh-plugin-yet-another-subagent
18
- */
19
- import type { Context } from 'cordis';
20
- import z from 'schemastery';
21
- import type { YaSubagentConfig } from './types.ts';
22
- export declare const name = "yet-another-subagent";
23
- export declare const inject: string[];
24
- export type { SubagentProfile, YaSubagentConfig } from './types.ts';
25
- /** Settings namespace under which profile state persists (`$DSH_HOME/settings.yaml`). */
26
- export declare const SETTINGS_NAMESPACE = "ya-subagent";
27
- export interface Config extends YaSubagentConfig {
28
- }
29
- export declare const Config: z<Config>;
30
- /**
31
- * Plugin body: register profile tools, RPC, and projections.
32
- *
33
- * Persistence: when a settings service is mounted, the profile list lives
34
- * under the `ya-subagent` namespace in `$DSH_HOME/settings.yaml`. The
35
- * cordis.yml `profiles` field is the composition `base` (first-boot seed);
36
- * runtime mutations persist through `scope.replace()`. Headless assemblies
37
- * without a settings provider fall back to in-memory state (cordis.yml seed
38
- * only, no persistence).
39
- * @param ctx - host context carrying `tools`, `subagents`, `sessionProjections`.
40
- * @param config - resolved config (seed profiles + generalFixed).
41
- */
42
- export declare function apply(ctx: Context, config: Config): void;
1
+ /**
2
+ * yet-another-subagent — host plugin entry.
3
+ *
4
+ * Single bundle, dual entry: this is the host half (exports `.`). The browser
5
+ * half ships via `./client` (see `src/client/index.ts`).
6
+ *
7
+ * Architecture (design doc §1):
8
+ * - A single `subagent` tool is exposed to the model. The desired profile
9
+ * is selected via the `profile` parameter (enum of profile ids). Profile
10
+ * add/remove updates the enum without changing the tool name set.
11
+ * - The tool reuses the official `spawn` provider via `ctx.subagents.startContinuable`.
12
+ * - Profiles live in an in-memory `ProfileStore` mutated through RPC.
13
+ * - Two projections (`subagentProfile` on parent, `yaSubagentProgress` on
14
+ * child) bridge the single-stage client runtime so SubagentCard can
15
+ * subscribe to live child progress.
16
+ *
17
+ * @module @huanlin/dsh-plugin-yet-another-subagent
18
+ */
19
+ import type { Context } from 'cordis';
20
+ import z from 'schemastery';
21
+ import type { YaSubagentConfig } from './types.ts';
22
+ export declare const name = "yet-another-subagent";
23
+ export declare const inject: string[];
24
+ export type { SubagentProfile, YaSubagentConfig } from './types.ts';
25
+ /** Settings namespace under which profile state persists (`$DSH_HOME/settings.yaml`). */
26
+ export declare const SETTINGS_NAMESPACE = "ya-subagent";
27
+ export interface Config extends YaSubagentConfig {
28
+ }
29
+ export declare const Config: z<Config>;
30
+ /**
31
+ * Plugin body: register profile tools, RPC, and projections.
32
+ *
33
+ * Persistence: when a settings service is mounted, the profile list lives
34
+ * under the `ya-subagent` namespace in `$DSH_HOME/settings.yaml`. The
35
+ * cordis.yml `profiles` field is the composition `base` (first-boot seed);
36
+ * runtime mutations persist through `scope.replace()`. Headless assemblies
37
+ * without a settings provider fall back to in-memory state (cordis.yml seed
38
+ * only, no persistence).
39
+ * @param ctx - host context carrying `tools`, `subagents`, `sessionProjections`.
40
+ * @param config - resolved config (seed profiles + generalFixed).
41
+ */
42
+ export declare function apply(ctx: Context, config: Config): void;