@qilin-agent/client-ui-subagent 0.0.0-stage → 3.1.3

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.
package/lib/index.js ADDED
@@ -0,0 +1,11 @@
1
+ //#region lib/types/index.js
2
+ /**
3
+ * Subagent reference plugin, node half. Pure UI plugin: the empty apply
4
+ * exists so the plugin appears in the host cordis.yml / Loader; the browser
5
+ * half ships via exports["./client"], discovered through the package.json
6
+ * qilin.client declaration.
7
+ */
8
+ /** Host plugin body — no host-side behavior for this source plugin. */
9
+ function apply() {}
10
+ //#endregion
11
+ export { apply };
@@ -0,0 +1,30 @@
1
+ import type { SubagentAddress } from '@qilin-agent/subagent/client';
2
+ import type { SessionId } from '@qilin-agent/session/types';
3
+ import type { PropsLocale, PropsRuntime } from '@qilin-agent/client-ui-slots';
4
+ import { NS } from './locales.ts';
5
+ /** Business actions supplied by the slot registration. */
6
+ export interface SubagentCatalogInjected {
7
+ openChild: (address: SubagentAddress) => void;
8
+ openChildAside: (address: SubagentAddress) => void;
9
+ refreshProjection: (parentSessionId: SessionId) => void;
10
+ }
11
+ /** Full props for the session-header lineage renderer. */
12
+ export type SubagentHeaderLineageProps = PropsRuntime<'conversation.session.header.lineage'> & SubagentCatalogInjected & PropsLocale<typeof NS>;
13
+ /** Full props for the root-session catalog entry in the header actions band. */
14
+ export type SubagentCatalogActionProps = PropsRuntime<'conversation.session.header.actions'> & SubagentCatalogInjected & PropsLocale<typeof NS>;
15
+ /**
16
+ * Session-header catalog action for root sessions: the descendant count and
17
+ * its dropdown, ordered after the task list. Child sessions render nothing
18
+ * here — their breadcrumb switcher in the lineage slot owns the same
19
+ * navigation.
20
+ * @param props - Session standard props plus the catalog actions and translator.
21
+ * @returns The count dropdown, or null on a child session.
22
+ */
23
+ export declare function SubagentCatalogAction({ sessionId, useSessions, useSessionStatus, openChild, openChildAside, refreshProjection, t, }: SubagentCatalogActionProps): import("react").JSX.Element | null;
24
+ /**
25
+ * Render one breadcrumb title together with its subagent navigation.
26
+ * @param props - Breadcrumb title, session standard props, and catalog actions.
27
+ * @returns A title-and-chevron sibling switcher, or nothing on a root session.
28
+ */
29
+ export declare function SubagentHeaderLineage({ lineageSessionId, displayTitle, openTitle, useSessions, useSession, useSessionStatus, openChild, openChildAside, refreshProjection, t, }: SubagentHeaderLineageProps): import("react").JSX.Element | null;
30
+ //# sourceMappingURL=SubagentHeaderLineage.d.ts.map
@@ -0,0 +1,17 @@
1
+ import type { PropsLocale, PropsRuntime } from '@qilin-agent/client-ui-slots';
2
+ import { NS } from './locales.ts';
3
+ /** Why a catalog-addressed conversation cannot accept human input. */
4
+ export interface SubagentReadOnlyMatch {
5
+ reason: 'one-shot' | 'parent-unavailable' | 'unknown';
6
+ }
7
+ /** Full chain props after the read-only subagent selector accepts the owner currency. */
8
+ export type SubagentReadOnlyComposerProps = PropsRuntime<'conversation.composer'> & {
9
+ matched: SubagentReadOnlyMatch;
10
+ } & PropsLocale<typeof NS>;
11
+ /**
12
+ * Explain why the normal composer is unavailable for an addressed child.
13
+ * @param props - selector-owned read-only reason plus standard slot props.
14
+ * @returns A read-only composer replacement.
15
+ */
16
+ export declare function SubagentReadOnlyComposer({ matched, t, }: Pick<SubagentReadOnlyComposerProps, 'matched' | 't'>): import("react").JSX.Element;
17
+ //# sourceMappingURL=SubagentReadOnlyComposer.d.ts.map
@@ -0,0 +1,19 @@
1
+ /** Web subagent catalog, navigation, and addressed-session composer owner. */
2
+ import type { Context as ClientContext } from '@qilin-agent/kylin';
3
+ import { type SubagentKey } from './locales.ts';
4
+ declare module '@qilin-agent/client-ui-slots' {
5
+ interface LocaleNamespaceMap {
6
+ /** Subagent catalog and read-only composer copy. */
7
+ 'subagent': SubagentKey;
8
+ }
9
+ }
10
+ export type { SubagentCatalogActionProps, SubagentCatalogInjected, SubagentHeaderLineageProps, } from './SubagentHeaderLineage.tsx';
11
+ export type { SubagentReadOnlyComposerProps, SubagentReadOnlyMatch, } from './SubagentReadOnlyComposer.tsx';
12
+ /** Required services for subagent presentation and navigation. */
13
+ export declare const inject: string[];
14
+ /**
15
+ * Client plugin body: register the subagent catalog and read-only composer seats.
16
+ * @param ctx - client root context.
17
+ */
18
+ export declare function apply(ctx: ClientContext): void;
19
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,49 @@
1
+ /** `subagent` namespace dictionaries. */
2
+ /** Dictionary namespace owned by this plugin. */
3
+ export declare const NS = "subagent";
4
+ /** Simplified Chinese dictionary (the key-set source of truth). */
5
+ export declare const zh: {
6
+ readonly 'duration.seconds': "{seconds}秒";
7
+ readonly 'duration.minutes': "{minutes}分{seconds}秒";
8
+ readonly 'duration.hours': "{hours}小时{minutes}分{seconds}秒";
9
+ readonly 'duration.days': "{days}天";
10
+ readonly 'duration.daysHours': "{days}天{hours}小时";
11
+ readonly 'duration.months': "约{months}个月";
12
+ readonly 'duration.monthsDays': "约{months}个月{days}天";
13
+ readonly 'duration.years': "约{years}年";
14
+ readonly 'duration.yearsMonths': "约{years}年{months}个月";
15
+ readonly 'duration.exactDays': "{days}天{hours}小时{minutes}分{seconds}秒";
16
+ readonly 'duration.exactTitle': "总活跃耗时:{duration}";
17
+ readonly 'tokens.thousand': "{value}K";
18
+ readonly 'tokens.million': "{value}M";
19
+ readonly 'tokens.total': "{value} tok";
20
+ readonly 'loading.label': "正在加载子代理…";
21
+ readonly 'load.error': "无法加载子代理";
22
+ readonly retry: "重试";
23
+ readonly 'mode.oneShot': "一次性";
24
+ readonly 'mode.continuable': "可继续";
25
+ readonly 'mode.unknown': "模式未知";
26
+ readonly 'readonly.unknown.body': "读取子会话后才能确定是否可继续。";
27
+ readonly 'activity.running': "正在运行";
28
+ readonly 'activity.completed': "已完成";
29
+ readonly 'activity.inactive': "当前未运行";
30
+ readonly 'branch.collapse': "收起 {label} 的下级子代理";
31
+ readonly 'branch.expand': "展开 {label} 的下级子代理";
32
+ readonly 'count.total.one': "{count} 个子代理";
33
+ readonly 'count.total.other': "{count} 个子代理";
34
+ readonly 'count.running.one': "{count} 个子代理,正在运行";
35
+ readonly 'count.running.other': "{count} 个子代理,正在运行";
36
+ readonly 'switcher.aria': "切换子代理:{title}";
37
+ readonly 'tree.aria': "子代理会话";
38
+ readonly 'open.sidebar': "在侧边栏打开 {label}";
39
+ readonly 'sidebar.chat': "聊天";
40
+ readonly 'readonly.oneShot.title': "一次性子代理记录";
41
+ readonly 'readonly.title': "此子代理暂时只读";
42
+ readonly 'readonly.oneShot.body': "一次性任务不支持后续消息,可在这里查看完整执行记录。";
43
+ readonly 'readonly.body': "父会话当前不在线,重新打开父会话后即可继续发送消息。";
44
+ };
45
+ /** English dictionary, key-identical to the Chinese source of truth. */
46
+ export declare const en: Record<SubagentKey, string>;
47
+ /** Key domain of the `subagent` namespace (zh is the source of truth). */
48
+ export type SubagentKey = keyof typeof zh;
49
+ //# sourceMappingURL=locales.d.ts.map
@@ -0,0 +1,62 @@
1
+ /** Right-Sidebar presentation of an existing subagent Conversation. */
2
+ import type { Context } from '@qilin-agent/kylin';
3
+ import type { SessionReference } from '@qilin-agent/api-session-controller/client';
4
+ import type { ConversationViewsProps } from '@qilin-agent/client-ui-conversation/client';
5
+ import type { PropsRenderFactories, PropsRenderSlots, PropsRuntime, TranslateNS } from '@qilin-agent/client-ui-slots';
6
+ import type { SubagentAddress } from '@qilin-agent/subagent/client';
7
+ import type { NS } from '../locales.ts';
8
+ /** Stable implementation identity for the Sidebar tab body. */
9
+ export declare const SUBAGENT_CHAT_ID = "@qilin-agent/client-ui-subagent";
10
+ /** Resource-address prefix for an embedded Session chat. */
11
+ export declare const SUBAGENT_CHAT_ADDRESS = "qilin-resource://subagentchat/session/";
12
+ /** Value retained by one live chat resource occurrence. */
13
+ export interface SubagentChatResource {
14
+ readonly address: SubagentAddress;
15
+ readonly reference: SessionReference;
16
+ }
17
+ declare module '@qilin-agent/api-session-controller/client' {
18
+ interface SessionReferenceSourceMap {
19
+ sidebarChat: unknown;
20
+ }
21
+ }
22
+ declare module '@qilin-agent/client-ui-slots' {
23
+ interface ResourceProtocolMap {
24
+ subagentchat: SubagentChatResource;
25
+ }
26
+ interface SlotMap {
27
+ /** Session-scoped Conversation occurrence hosted by one Sidebar chat tab. */
28
+ 'sidebar.chat.conversation': {
29
+ kind: 'single';
30
+ scope: 'session';
31
+ };
32
+ }
33
+ }
34
+ /**
35
+ * Address one subagent Session together with the routing facts needed to restore it.
36
+ * @param address - durable direct-parent subagent address.
37
+ * @returns canonical Sidebar resource address.
38
+ */
39
+ export declare function subagentChatAddress(address: SubagentAddress): string;
40
+ /**
41
+ * Parse one canonical Sidebar chat resource address.
42
+ * @param value - possible chat resource address.
43
+ * @returns the encoded direct-parent address, or undefined for another or malformed resource.
44
+ */
45
+ export declare function parseSubagentChatAddress(value: string): SubagentAddress | undefined;
46
+ /** Fixed Chat selection used by an embedded Conversation occurrence. */
47
+ export declare function FixedChatConversationView(props: ConversationViewsProps): import("react").JSX.Element;
48
+ /** Props supplied to the child-Session Conversation host. */
49
+ export type ConversationSlotPanelProps = PropsRuntime<'sidebar.chat.conversation'> & PropsRenderFactories;
50
+ /** Render the shared Conversation content for one explicitly provided child Session. */
51
+ export declare function ConversationSlotPanel({ sessionId, useSession, useConversation, useSessions, renderFactorySlot, }: ConversationSlotPanelProps): import("react").ReactNode;
52
+ /** Props supplied to the parent-Session Sidebar tab body. */
53
+ export type SidebarChatTabProps = PropsRuntime<'sidebar.right.pane.tab'> & PropsRenderSlots<'sidebar.chat.conversation'>;
54
+ /** Bind a chat resource's child reference around its Conversation slot. */
55
+ export declare function SidebarChatTab({ useResource, useTabInfo, SessionProvider, renderSlot }: SidebarChatTabProps): import("react").JSX.Element;
56
+ /**
57
+ * Register the chat resource owner and its right-Sidebar presentation.
58
+ * @param ctx - Client root carrying Sessions, resources, Slots, and Sidebar registries.
59
+ * @param t - Chat namespace translator used for fallback tab titles.
60
+ */
61
+ export declare function registerSidebarChat(ctx: Context, t: TranslateNS<typeof NS>): void;
62
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Subagent reference plugin, node half. Pure UI plugin: the empty apply
3
+ * exists so the plugin appears in the host cordis.yml / Loader; the browser
4
+ * half ships via exports["./client"], discovered through the package.json
5
+ * qilin.client declaration.
6
+ */
7
+ /** Host plugin body — no host-side behavior for this source plugin. */
8
+ export declare function apply(): void;
9
+ //# sourceMappingURL=index.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,84 @@
1
1
  {
2
2
  "name": "@qilin-agent/client-ui-subagent",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "description": "Subagent conversation catalog, continuation routing UI, and '@' reference source",
4
+ "version": "3.1.3",
5
+ "publishConfig": {
6
+ "access": "public"
7
+ },
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/kkutysllb/QiLin.git",
11
+ "directory": "packages/client/ui-subagent"
12
+ },
13
+ "engines": {
14
+ "node": "^22.19.0 || >=24.0.0"
15
+ },
16
+ "type": "module",
17
+ "main": "lib/index.js",
18
+ "types": "lib/types/index.d.ts",
19
+ "exports": {
20
+ ".": {
21
+ "types": "./lib/types/index.d.ts",
22
+ "default": "./lib/index.js"
23
+ },
24
+ "./client": {
25
+ "types": "./lib/types/client/index.d.ts",
26
+ "default": "./lib/client.js"
27
+ },
28
+ "./src/*": "./src/*",
29
+ "./package.json": "./package.json"
30
+ },
31
+ "qilin": {
32
+ "client": {
33
+ "inject": [
34
+ "@qilin-agent/api-session-controller",
35
+ "@qilin-agent/client-locale",
36
+ "@qilin-agent/client-resources",
37
+ "@qilin-agent/client-ui-chat",
38
+ "@qilin-agent/client-ui-conversation",
39
+ "@qilin-agent/client-ui-primitives",
40
+ "@qilin-agent/client-ui-sidebar-right",
41
+ "@qilin-agent/client-ui-input-trigger",
42
+ "@qilin-agent/client-ui-workspace"
43
+ ],
44
+ "platform": "web"
45
+ }
46
+ },
47
+ "license": "MIT",
48
+ "peerDependencies": {
49
+ "@qilin-agent/kylin": "~4.0.3"
50
+ },
51
+ "devDependencies": {
52
+ "@types/react": "~18.3.1",
53
+ "@types/react-dom": "~18.3.0",
54
+ "react": "^18.2.0",
55
+ "react-dom": "^18.2.0",
56
+ "@qilin-agent/client-locale": "3.1.3",
57
+ "@qilin-agent/client-resources": "3.1.3",
58
+ "@qilin-agent/client-test-runtime": "3.1.3",
59
+ "@qilin-agent/client-ui-chat": "3.1.3",
60
+ "@qilin-agent/client-ui-conversation": "3.1.3",
61
+ "@qilin-agent/client-ui-input-trigger": "3.1.3",
62
+ "@qilin-agent/client-ui-primitives": "3.1.3",
63
+ "@qilin-agent/client-ui-slots": "3.1.3",
64
+ "@qilin-agent/subagent": "3.1.3",
65
+ "@qilin-agent/token-meter": "3.1.3",
66
+ "@qilin-agent/kylin": "~4.0.3",
67
+ "@qilin-agent/api-session-controller": "3.1.3",
68
+ "@qilin-agent/client-connection": "3.1.3",
69
+ "@qilin-agent/client-ui-renderer": "3.1.3",
70
+ "@qilin-agent/session": "3.1.3",
71
+ "@qilin-agent/client-ui-sidebar-right": "3.1.3",
72
+ "@qilin-agent/client-ui-session": "3.1.3",
73
+ "@qilin-agent/client-ui-workspace": "3.1.3"
74
+ },
75
+ "files": [
76
+ "lib/index.js",
77
+ "lib/client.js",
78
+ "lib/types/**/*.d.ts"
79
+ ],
80
+ "scripts": {
81
+ "bundle": "tsdown",
82
+ "watch": "tsdown --watch"
83
+ }
6
84
  }