opencode-subagent-magazine 1.7.0 → 1.7.2
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/dist/_version.d.ts +1 -1
- package/dist/core/kv.d.ts +1 -0
- package/dist/core/types.d.ts +8 -0
- package/dist/i18n.d.ts +5 -0
- package/dist/panel/SubAgentPanel.d.ts +1 -0
- package/dist/panel/entry-map.d.ts +1 -0
- package/dist/panel/panel-api.d.ts +16 -0
- package/dist/tui.js +385 -218
- package/dist/v2/db.d.ts +14 -1
- package/dist/v2.js +473 -223
- package/package.json +17 -4
- package/dist/_version.js +0 -2
- package/dist/clipboard.js +0 -85
- package/dist/core/color.js +0 -68
- package/dist/core/format.js +0 -113
- package/dist/core/index.js +0 -6
- package/dist/core/kv.js +0 -63
- package/dist/core/state-machine.js +0 -27
- package/dist/core/types.js +0 -2
- package/dist/core/usage.js +0 -1
- package/dist/i18n.js +0 -333
- package/dist/index.js +0 -511
- package/dist/panel/SubAgentPanel.js +0 -1572
- package/dist/panel/entry-map.js +0 -99
- package/dist/panel/panel-api.js +0 -1
- package/dist/panel/session-routing.js +0 -4
- package/dist/panel/store.js +0 -5
- package/dist/server.js +0 -14
- package/dist/v2/commands.js +0 -420
- package/dist/v2/db.js +0 -267
- package/dist/v2/index.js +0 -83
- package/dist/v2/settings-menu.js +0 -225
- package/dist/v2/theme.js +0 -12
- package/dist/v2/types.js +0 -6
- package/dist/v2/v2-panel-api.js +0 -612
- package/src/_version.ts +0 -2
- package/src/clipboard.ts +0 -134
- package/src/core/color.ts +0 -70
- package/src/core/format.ts +0 -105
- package/src/core/index.ts +0 -6
- package/src/core/kv.ts +0 -77
- package/src/core/state-machine.ts +0 -46
- package/src/core/types.ts +0 -72
- package/src/core/usage.ts +0 -16
- package/src/i18n.ts +0 -345
- package/src/index.tsx +0 -564
- package/src/panel/SubAgentPanel.tsx +0 -1802
- package/src/panel/entry-map.ts +0 -115
- package/src/panel/panel-api.ts +0 -83
- package/src/panel/session-routing.ts +0 -10
- package/src/panel/store.ts +0 -8
- package/src/server.ts +0 -19
- package/src/v2/commands.ts +0 -408
- package/src/v2/db.ts +0 -274
- package/src/v2/index.tsx +0 -144
- package/src/v2/settings-menu.ts +0 -241
- package/src/v2/theme.ts +0 -14
- package/src/v2/types.ts +0 -167
- package/src/v2/v2-panel-api.ts +0 -515
package/dist/_version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const PLUGIN_VERSION = "1.7.
|
|
1
|
+
export declare const PLUGIN_VERSION = "1.7.2";
|
package/dist/core/kv.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ export declare const SETTING_KEYS: {
|
|
|
26
26
|
readonly showEntryTime: "subagent_magazine.show_entry_time";
|
|
27
27
|
readonly showEntryTokens: "subagent_magazine.show_entry_tokens";
|
|
28
28
|
readonly timeFormat: "subagent_magazine.time_format";
|
|
29
|
+
readonly showOrigin: "subagent_magazine.show_origin";
|
|
29
30
|
readonly dbSync: "subagent_magazine.db_sync";
|
|
30
31
|
};
|
|
31
32
|
export declare function loadSessionData(kv: KVApi): Record<string, SessionRecord>;
|
package/dist/core/types.d.ts
CHANGED
|
@@ -18,6 +18,10 @@ export interface SubEntry {
|
|
|
18
18
|
cancelRequestedAt?: number;
|
|
19
19
|
abortAccepted?: boolean;
|
|
20
20
|
cancelReason?: "manual";
|
|
21
|
+
/** 来源:工具调用条目 / 衍生会话条目(spawn)。 */
|
|
22
|
+
origin?: "tool" | "sub";
|
|
23
|
+
/** 工具输入带 background/run_in_background(后台衍生会话)。 */
|
|
24
|
+
background?: boolean;
|
|
21
25
|
}
|
|
22
26
|
export type Lang = LangCode;
|
|
23
27
|
export type SortOrder = "desc" | "asc";
|
|
@@ -26,6 +30,8 @@ export type ScrollMode = "wheel" | "click";
|
|
|
26
30
|
export type TimeFormat = "decimal" | "short" | "clock" | "compact" | "seconds";
|
|
27
31
|
/** OpenCode built-in tool names that spawn sub-agents or delegate tasks. */
|
|
28
32
|
export declare const SUBAGENT_TOOLS: Set<string>;
|
|
33
|
+
/** 工具输入是否声明后台执行(V1/V2 两种字段名)。 */
|
|
34
|
+
export declare function isBackgroundInput(input: unknown): boolean;
|
|
29
35
|
export interface ChildRecord {
|
|
30
36
|
scroll: number;
|
|
31
37
|
expanded: string;
|
|
@@ -59,6 +65,8 @@ export interface SharedSignals {
|
|
|
59
65
|
setShowEntryTokens: (v: boolean) => void;
|
|
60
66
|
timeFormat: () => TimeFormat;
|
|
61
67
|
setTimeFormat: (f: TimeFormat) => void;
|
|
68
|
+
showOrigin: () => boolean;
|
|
69
|
+
setShowOrigin: (v: boolean) => void;
|
|
62
70
|
dbSync: () => boolean;
|
|
63
71
|
setDbSync: (v: boolean) => void;
|
|
64
72
|
sessionId: string;
|
package/dist/i18n.d.ts
CHANGED
|
@@ -3,6 +3,10 @@ declare const ZH_T: {
|
|
|
3
3
|
readonly "panel.title": "子代理";
|
|
4
4
|
readonly "status.none": "暂无子代理";
|
|
5
5
|
readonly "agent.label": "代理";
|
|
6
|
+
readonly "origin.label": "来源";
|
|
7
|
+
readonly "origin.tool": "子代理调用";
|
|
8
|
+
readonly "origin.sub": "衍生会话";
|
|
9
|
+
readonly "origin.background": "后台";
|
|
6
10
|
readonly "status.label": "状态";
|
|
7
11
|
readonly "time.label": "耗时";
|
|
8
12
|
readonly "tokens.label": "上下文";
|
|
@@ -64,6 +68,7 @@ declare const ZH_T: {
|
|
|
64
68
|
readonly "settings.showEntryTime": "列表中显示耗时";
|
|
65
69
|
readonly "settings.showEntryTokens": "列表中显示 Token 数";
|
|
66
70
|
readonly "settings.timeFormat": "时间格式";
|
|
71
|
+
readonly "settings.showOrigin": "列表显示来源标记";
|
|
67
72
|
readonly "settings.dbSync": "本地数据库补全";
|
|
68
73
|
readonly "settings.on": "开";
|
|
69
74
|
readonly "settings.off": "关";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { SubEntry } from "../core/types";
|
|
2
2
|
export type SubEntryPatch = Omit<SubEntry, "startedAt" | "endedAt"> & {
|
|
3
3
|
startedAt?: number;
|
|
4
|
+
endedAt?: number;
|
|
4
5
|
};
|
|
5
6
|
export declare function findSubEntryKey(entries: ReadonlyMap<string, SubEntry>, id: string, sessionId?: string): string | undefined;
|
|
6
7
|
export declare function upsertSubEntry(entries: ReadonlyMap<string, SubEntry>, partial: SubEntryPatch, now?: number): Map<string, SubEntry>;
|
|
@@ -8,6 +8,20 @@ export interface SessionLike {
|
|
|
8
8
|
agent?: string;
|
|
9
9
|
cost?: number;
|
|
10
10
|
}
|
|
11
|
+
/** Spawned child session summary (V2 reads it from the local database). */
|
|
12
|
+
export interface ChildSessionLike {
|
|
13
|
+
id: string;
|
|
14
|
+
agent?: string;
|
|
15
|
+
title?: string;
|
|
16
|
+
model?: string;
|
|
17
|
+
cost?: number;
|
|
18
|
+
tokens?: number;
|
|
19
|
+
timeCreated?: number;
|
|
20
|
+
timeIdle?: number;
|
|
21
|
+
idleOutcome?: string;
|
|
22
|
+
/** Still running: last message is newer than time_idle (resume keeps the old value). */
|
|
23
|
+
active?: boolean;
|
|
24
|
+
}
|
|
11
25
|
export interface SessionStatusLike {
|
|
12
26
|
type: string;
|
|
13
27
|
}
|
|
@@ -53,6 +67,8 @@ export interface PanelApi {
|
|
|
53
67
|
agent?: string;
|
|
54
68
|
startedAt?: number;
|
|
55
69
|
}): string | undefined;
|
|
70
|
+
/** Optional host-side listing of spawned child sessions. */
|
|
71
|
+
listChildren?(parentId: string): ChildSessionLike[] | undefined;
|
|
56
72
|
};
|
|
57
73
|
event: {
|
|
58
74
|
on(type: PanelEventType, cb: (e: PanelEvent) => void): () => void;
|