@eum-agent/agent-delegation 0.0.0-stage → 1.0.1

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.
Files changed (4) hide show
  1. package/dist/index.js +1925 -0
  2. package/package.json +50 -3
  3. package/ui/ui.js +516 -0
  4. package/README.md +0 -3
package/package.json CHANGED
@@ -1,6 +1,53 @@
1
1
  {
2
2
  "name": "@eum-agent/agent-delegation",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "displayName": {
4
+ "en-US": "Subagent Delegation",
5
+ "zh-CN": "子智能体协作"
6
+ },
7
+ "version": "1.0.1",
8
+ "type": "module",
9
+ "description": "Delegated agent execution and subagent management",
10
+ "license": "MIT",
11
+ "exports": {
12
+ ".": {
13
+ "default": "./dist/index.js"
14
+ }
15
+ },
16
+ "files": [
17
+ "dist",
18
+ "ui"
19
+ ],
20
+ "dependencies": {
21
+ "zod": "^4.4.3"
22
+ },
23
+ "devDependencies": {
24
+ "@eum-agent/container": "1.0.0",
25
+ "@eum-agent/plugin": "1.0.1",
26
+ "@types/react": "^19.2.18",
27
+ "@types/react-dom": "^19.2.5",
28
+ "vite": "^8.2.2",
29
+ "@eum-agent/protocol": "1.0.0",
30
+ "@eum-agent/kernel": "1.0.0",
31
+ "react": "^19.2.0",
32
+ "zustand": "^5.0.15",
33
+ "lucide-react": "^1.40.0"
34
+ },
35
+ "yaoguang": {
36
+ "description": {
37
+ "en-US": "Delegated agent execution and subagent management",
38
+ "zh-CN": "委派智能体执行任务与子智能体管理"
39
+ },
40
+ "dependencies": {
41
+ "@eum-agent/llm-management": "1.0.1"
42
+ },
43
+ "kind": "extension",
44
+ "foundationDependencies": {
45
+ "@eum-agent/storage-sqlite": "1.0.1"
46
+ }
47
+ },
48
+ "scripts": {
49
+ "build": "tsdown && vite build",
50
+ "test": "vitest run",
51
+ "typecheck": "tsc --noEmit && tsc --noEmit -p tsconfig.ui.json"
52
+ }
6
53
  }
package/ui/ui.js ADDED
@@ -0,0 +1,516 @@
1
+ import { Button, Field, FormFailure, InputNumber, ReadFailure, agentNamed, i18next, localeLeaves, pendingOf, useAgents, useGatewayAction, useInbox, useSessions, useToast, useTranslation } from "@eum-agent/host/framework";
2
+ import React, { useEffect, useRef, useState } from "react";
3
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
+ //#region ui-src/components/settings/subagents.tsx
5
+ /** Delegation limits edited and saved independently inside global running settings. */
6
+ function DelegationSettingsSection({ ctx, registerGuard }) {
7
+ const { t } = useTranslation();
8
+ const toast = useToast();
9
+ const [online, setOnline] = useState(ctx.gateway.connection.status === "online");
10
+ useEffect(() => ctx.gateway.watchConnection((state) => setOnline(state.status === "online")), [ctx]);
11
+ const [data, setData] = useState(null);
12
+ const [error, setError] = useState(null);
13
+ const [pending, setPending] = useState(true);
14
+ const reading = useRef(false);
15
+ const reload = () => {
16
+ if (reading.current) return;
17
+ reading.current = true;
18
+ setPending(true);
19
+ setError(null);
20
+ ctx.invoke("getSettings", {}).then(setData).catch((error) => setError(error instanceof Error ? error.message : String(error))).finally(() => {
21
+ reading.current = false;
22
+ setPending(false);
23
+ });
24
+ };
25
+ useEffect(reload, [ctx]);
26
+ const read = {
27
+ data,
28
+ error,
29
+ reload
30
+ };
31
+ const save = useGatewayAction();
32
+ const [draft, setDraft] = useState(null);
33
+ const settings = draft ?? read.data;
34
+ const guardState = useRef({
35
+ dirty: false,
36
+ pending: false
37
+ });
38
+ guardState.current = {
39
+ dirty: draft !== null && JSON.stringify(draft) !== JSON.stringify(read.data),
40
+ pending: save.pending
41
+ };
42
+ useEffect(() => {
43
+ registerGuard(() => guardState.current);
44
+ return () => registerGuard(null);
45
+ }, [registerGuard]);
46
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(ReadFailure, {
47
+ reason: read.error,
48
+ pending,
49
+ onRetry: read.reload
50
+ }), settings && /* @__PURE__ */ jsxs("form", {
51
+ className: "flex flex-col gap-6",
52
+ onSubmit: (event) => {
53
+ event.preventDefault();
54
+ if (save.pending) return;
55
+ save.run(() => ctx.invoke("setSettings", settings)).then((done) => {
56
+ if (!done.ok) return;
57
+ toast.add({
58
+ tone: "success",
59
+ title: t("delegation.saved")
60
+ });
61
+ setData(settings);
62
+ setDraft(null);
63
+ });
64
+ },
65
+ children: [
66
+ /* @__PURE__ */ jsx("p", {
67
+ className: "text-xs text-muted-foreground",
68
+ children: t("delegation.limitsHelp")
69
+ }),
70
+ ["maxConcurrent", "maxDepth"].map((key) => /* @__PURE__ */ jsx(Field, {
71
+ label: t(key === "maxConcurrent" ? "delegation.concurrency" : "delegation.depth"),
72
+ help: t(key === "maxConcurrent" ? "delegation.concurrencyHelp" : "delegation.depthHelp"),
73
+ required: true,
74
+ inline: true,
75
+ className: "delegation-limit-field",
76
+ children: (binding) => /* @__PURE__ */ jsx(InputNumber, {
77
+ ...binding,
78
+ label: t(key === "maxConcurrent" ? "delegation.concurrency" : "delegation.depth"),
79
+ incrementLabel: t("common.increase"),
80
+ decrementLabel: t("common.decrease"),
81
+ min: 1,
82
+ step: 1,
83
+ required: true,
84
+ disabled: save.pending,
85
+ value: settings[key] || null,
86
+ onValueChange: (value) => setDraft({
87
+ ...settings,
88
+ [key]: value ?? 0
89
+ })
90
+ })
91
+ }, key)),
92
+ /* @__PURE__ */ jsx(FormFailure, { reason: save.error }),
93
+ /* @__PURE__ */ jsx("div", {
94
+ className: "flex justify-end gap-2",
95
+ children: /* @__PURE__ */ jsx(Button, {
96
+ variant: "primary",
97
+ type: "submit",
98
+ loading: save.pending,
99
+ disabled: pending || !Number.isSafeInteger(settings.maxConcurrent) || settings.maxConcurrent < 1 || !Number.isSafeInteger(settings.maxDepth) || settings.maxDepth < 1 || !online,
100
+ children: t("common.save")
101
+ })
102
+ })
103
+ ]
104
+ })] });
105
+ }
106
+ //#endregion
107
+ //#region ui-src/lib/subagents/task.ts
108
+ /** The two tools whose answer is the task they handed a child. */
109
+ var DISPATCHING = /* @__PURE__ */ new Set(["subagent_spawn", "subagent_send"]);
110
+ /** Accepted children started by this call, preserving successful collection order. */
111
+ function dispatchedBy(name, output) {
112
+ if (!DISPATCHING.has(name) || output === void 0) return [];
113
+ try {
114
+ const parsed = JSON.parse(output);
115
+ if (!parsed || typeof parsed !== "object") return [];
116
+ return (name === "subagent_spawn" ? "results" in parsed && Array.isArray(parsed.results) ? parsed.results.flatMap((item) => item && typeof item === "object" && "ok" in item && item.ok === true && "value" in item ? [item.value] : []) : [] : [parsed]).flatMap((value) => value && typeof value === "object" && "taskId" in value && typeof value.taskId === "string" && "childSessionId" in value && typeof value.childSessionId === "string" ? [{
117
+ taskId: value.taskId,
118
+ childSessionId: value.childSessionId
119
+ }] : []);
120
+ } catch {
121
+ return [];
122
+ }
123
+ }
124
+ /** A task's STATE column: at work, waiting for a person, or how it ended. */
125
+ function taskLineState(task) {
126
+ if (task.state === "awaiting-human") return "waiting";
127
+ if (task.state !== "finished") return "running";
128
+ if (task.outcome?.kind === "failed") return "failed";
129
+ return task.outcome?.kind === "interrupted" ? "stopped" : "success";
130
+ }
131
+ /** The catalogue key naming where a task stands. */
132
+ function taskStateKey(task) {
133
+ if (task.state !== "finished") return `delegation.${task.state}`;
134
+ if (task.outcome?.kind === "failed") return "sessionState.failed";
135
+ return task.outcome?.kind === "interrupted" ? "sessionState.halted" : "sessionState.done";
136
+ }
137
+ //#endregion
138
+ //#region ui-src/locales/en-US.ts
139
+ /** Text owned by this browser capability. */
140
+ var catalogue$1 = { delegation: {
141
+ section: "Task delegation",
142
+ limits: "Runtime settings",
143
+ limitsHelp: "Each session a person starts shares these limits with the sessions it delegates to.",
144
+ saved: "Task delegation settings saved",
145
+ emptyHint: "Any agent can take delegated work; manage them in agent settings.",
146
+ description: "Description",
147
+ instructions: "Instructions",
148
+ concurrency: "Concurrent tasks per root session",
149
+ concurrencyHelp: "Counted per root session. Running tasks and tasks waiting for tools, approvals or child tasks occupy slots.",
150
+ depth: "Maximum nesting depth",
151
+ depthHelp: "Limits nested delegation. A task delegated straight from a session a person started is at depth 1.",
152
+ save: "Save",
153
+ parent: "Back to parent session",
154
+ unverified: "Parameter compatibility unverified",
155
+ title: "Subagents",
156
+ queued: "Queued",
157
+ starting: "Starting",
158
+ running: "Running",
159
+ "awaiting-human": "Waiting for approval",
160
+ stopping: "Stopping",
161
+ finished: "Finished",
162
+ stopTask: "Stop task",
163
+ stopTree: "Stop subtree",
164
+ viewSession: "View session",
165
+ main: "Main agent",
166
+ task: "Task",
167
+ back: "Back",
168
+ breadcrumb: "Run process levels",
169
+ followupPlaceholder: "Add a task for it — Enter sends, Shift+Enter starts a new line",
170
+ followup: "Follow-up"
171
+ } };
172
+ //#endregion
173
+ //#region ui-src/locales/zh-CN.ts
174
+ /** Text owned by this browser capability. */
175
+ var catalogue = { delegation: {
176
+ section: "任务委派",
177
+ limits: "运行设置",
178
+ limitsHelp: "每个人发起的会话及其委派出去的子会话,共享以下额度。",
179
+ saved: "任务委派设置已保存",
180
+ emptyHint: "任何智能体都可以接受委派,在智能体设置里管理它们。",
181
+ description: "简介",
182
+ instructions: "指令",
183
+ concurrency: "并发任务上限",
184
+ concurrencyHelp: "按主会话计数;运行中及等待工具、审批或下级任务的子任务均占名额。",
185
+ depth: "最大嵌套深度",
186
+ depthHelp: "限制逐级委派的层数;从人发起的会话直接委派出去的为第 1 层。",
187
+ save: "保存",
188
+ parent: "返回父会话",
189
+ unverified: "参数兼容性未验证",
190
+ title: "子代理",
191
+ queued: "排队中",
192
+ starting: "启动中",
193
+ running: "执行中",
194
+ "awaiting-human": "等待答复",
195
+ stopping: "停止中",
196
+ finished: "已结束",
197
+ stopTask: "停止当前任务",
198
+ stopTree: "停止整棵子树",
199
+ viewSession: "查看子会话",
200
+ main: "主智能体",
201
+ task: "任务",
202
+ back: "返回上一层",
203
+ breadcrumb: "运行过程层级",
204
+ followupPlaceholder: "给它追加任务,Enter 发送,Shift+Enter 换行",
205
+ followup: "追加任务"
206
+ } };
207
+ //#endregion
208
+ //#region src/tool-names.ts
209
+ /** Canonical names shared by tool registration and browser presentation. */
210
+ var TOOL_NAMES = [
211
+ "subagent_spawn",
212
+ "subagent_send",
213
+ "subagent_get",
214
+ "subagent_list",
215
+ "subagent_stop"
216
+ ];
217
+ //#endregion
218
+ //#region ui-src/metadata.ts
219
+ var CATALOGUES = {
220
+ "en-US": {
221
+ section: "Built-in plugins",
222
+ group: "Subagents",
223
+ parent: "Delegating agent",
224
+ subagent_spawn: "Create subagent",
225
+ subagent_send: "Send task",
226
+ subagent_get: "Inspect task",
227
+ subagent_list: "List subagents",
228
+ subagent_stop: "Stop task"
229
+ },
230
+ "zh-CN": {
231
+ section: "内置插件",
232
+ group: "子智能体",
233
+ parent: "上级智能体",
234
+ subagent_spawn: "创建子智能体",
235
+ subagent_send: "发送子任务",
236
+ subagent_get: "查看子任务",
237
+ subagent_list: "查看子智能体",
238
+ subagent_stop: "停止子任务"
239
+ }
240
+ };
241
+ var names = new Set(TOOL_NAMES);
242
+ /** Registers presentation facets with the same activation lifetime as the tools. */
243
+ function registerMetadata(ctx) {
244
+ ctx.i18n.register(CATALOGUES, "en-US");
245
+ ctx.i18n.contribute(Object.fromEntries(Object.entries(CATALOGUES).map(([language, catalogue]) => [language, Object.fromEntries([...names].map((tool) => [`transcript.actions.${tool}`, catalogue[tool] ?? tool]))])), "en-US");
246
+ ctx.slots.register("chat.tool.presentation", {
247
+ id: "tool-metadata",
248
+ describe: ({ call }) => {
249
+ if (!names.has(call.name)) return void 0;
250
+ const input = call.input !== null && typeof call.input === "object" ? call.input : {};
251
+ const summary = [
252
+ "path",
253
+ "url",
254
+ "query",
255
+ "command",
256
+ "skill",
257
+ "id",
258
+ "name",
259
+ "task",
260
+ "prompt"
261
+ ].flatMap((key) => typeof input[key] === "string" ? [input[key]] : []).slice(0, 2).join(" · ").replace(/\s+/g, " ").slice(0, 240);
262
+ return {
263
+ label: names.has(call.name) ? ctx.i18n.t(call.name) : call.name,
264
+ icon: "hammer",
265
+ summary
266
+ };
267
+ }
268
+ });
269
+ ctx.slots.register("shell.tools.group", {
270
+ id: "tool-groups",
271
+ sourceLabel: ({ kind }) => kind === "delegation-task" ? ctx.i18n.t("parent") : kind === "delegation-result" ? ctx.i18n.t("group") : void 0,
272
+ describe: (tool) => {
273
+ if (tool.plugin !== ctx.plugin) return void 0;
274
+ return {
275
+ key: `plugin:${ctx.plugin}`,
276
+ label: ctx.i18n.t("group"),
277
+ source: ctx.plugin,
278
+ sectionLabel: ctx.i18n.t("section"),
279
+ sectionOrder: 1,
280
+ order: 7
281
+ };
282
+ }
283
+ });
284
+ }
285
+ //#endregion
286
+ //#region ../../../node_modules/.pnpm/zustand@5.0.15_@types+react@19.2.18_react@19.2.8_use-sync-external-store@1.7.0_react@19.2.8_/node_modules/zustand/esm/vanilla.mjs
287
+ var createStoreImpl = (createState) => {
288
+ let state;
289
+ const listeners = /* @__PURE__ */ new Set();
290
+ const setState = (partial, replace) => {
291
+ const nextState = typeof partial === "function" ? partial(state) : partial;
292
+ if (!Object.is(nextState, state)) {
293
+ const previousState = state;
294
+ state = (replace != null ? replace : typeof nextState !== "object" || nextState === null) ? nextState : Object.assign({}, state, nextState);
295
+ listeners.forEach((listener) => listener(state, previousState));
296
+ }
297
+ };
298
+ const getState = () => state;
299
+ const getInitialState = () => initialState;
300
+ const subscribe = (listener) => {
301
+ listeners.add(listener);
302
+ return () => listeners.delete(listener);
303
+ };
304
+ const api = {
305
+ setState,
306
+ getState,
307
+ getInitialState,
308
+ subscribe
309
+ };
310
+ const initialState = state = createState(setState, getState, api);
311
+ return api;
312
+ };
313
+ var createStore = ((createState) => createState ? createStoreImpl(createState) : createStoreImpl);
314
+ //#endregion
315
+ //#region ../../../node_modules/.pnpm/zustand@5.0.15_@types+react@19.2.18_react@19.2.8_use-sync-external-store@1.7.0_react@19.2.8_/node_modules/zustand/esm/react.mjs
316
+ var identity = (arg) => arg;
317
+ function useStore(api, selector = identity) {
318
+ const slice = React.useSyncExternalStore(api.subscribe, React.useCallback(() => selector(api.getState()), [api, selector]), React.useCallback(() => selector(api.getInitialState()), [api, selector]));
319
+ React.useDebugValue(slice);
320
+ return slice;
321
+ }
322
+ var createImpl = (createState) => {
323
+ const api = createStore(createState);
324
+ const useBoundStore = (selector) => useStore(api, selector);
325
+ Object.assign(useBoundStore, api);
326
+ return useBoundStore;
327
+ };
328
+ var create = ((createState) => createState ? createImpl(createState) : createImpl);
329
+ //#endregion
330
+ //#region ui-src/store/subagents.ts
331
+ var useSubagents = create()((set) => ({
332
+ bySession: {},
333
+ loaded: {},
334
+ clear: () => set({
335
+ bySession: {},
336
+ loaded: {}
337
+ }),
338
+ merge: (sessionId, rows) => set((state) => {
339
+ const tasks = { ...state.bySession[sessionId] };
340
+ for (const row of rows) if ((tasks[row.taskId]?.revision ?? -1) < row.revision) tasks[row.taskId] = row;
341
+ return {
342
+ bySession: {
343
+ ...state.bySession,
344
+ [sessionId]: tasks
345
+ },
346
+ loaded: {
347
+ ...state.loaded,
348
+ [sessionId]: true
349
+ }
350
+ };
351
+ })
352
+ }));
353
+ /** Reads each observed parent once and refreshes its retained view after reconnect. */
354
+ function nativeTaskReader(ctx) {
355
+ const observed = /* @__PURE__ */ new Set();
356
+ const pending = /* @__PURE__ */ new Set();
357
+ const reading = /* @__PURE__ */ new Map();
358
+ let generation = 0;
359
+ let scheduled = false;
360
+ let online = ctx.host.get().connection === "online";
361
+ const flush = () => {
362
+ scheduled = false;
363
+ if (ctx.signal.aborted || !online) return;
364
+ const available = [...pending].filter((id) => !reading.has(id));
365
+ for (let offset = 0; offset < available.length; offset += 31) {
366
+ const parentSessionIds = available.slice(offset, offset + 31);
367
+ const token = Symbol();
368
+ const at = generation;
369
+ for (const id of parentSessionIds) {
370
+ pending.delete(id);
371
+ reading.set(id, token);
372
+ }
373
+ ctx.invoke("listByParents", { parentSessionIds }).then(({ results }) => {
374
+ if (ctx.signal.aborted || generation !== at || results.length !== parentSessionIds.length) return;
375
+ for (const [index, item] of results.entries()) if (item.index !== index || item.target !== parentSessionIds[index]) return;
376
+ for (const item of results) if (item.ok) useSubagents.getState().merge(item.target, item.value);
377
+ }).catch(() => {}).finally(() => {
378
+ for (const id of parentSessionIds) if (reading.get(id) === token) reading.delete(id);
379
+ if (pending.size) schedule();
380
+ });
381
+ }
382
+ };
383
+ const schedule = () => {
384
+ if (scheduled || ctx.signal.aborted) return;
385
+ scheduled = true;
386
+ queueMicrotask(flush);
387
+ };
388
+ const refresh = () => {
389
+ for (const id of observed) pending.add(id);
390
+ schedule();
391
+ };
392
+ ctx.on("changed", ({ sessionId, payload }) => {
393
+ if (ctx.signal.aborted || sessionId === void 0 || !observed.has(sessionId)) return;
394
+ const changed = payload;
395
+ if (changed.invalidated) refresh();
396
+ else useSubagents.getState().merge(sessionId, changed.entries.map((entry) => entry.task));
397
+ });
398
+ const off = ctx.host.subscribe(() => {
399
+ const next = ctx.host.get().connection === "online";
400
+ if (next !== online) {
401
+ generation++;
402
+ reading.clear();
403
+ }
404
+ if (next && !online) refresh();
405
+ online = next;
406
+ });
407
+ ctx.signal.addEventListener("abort", () => {
408
+ off();
409
+ generation++;
410
+ useSubagents.getState().clear();
411
+ }, { once: true });
412
+ return (sessionId) => {
413
+ if (observed.has(sessionId)) return;
414
+ observed.add(sessionId);
415
+ pending.add(sessionId);
416
+ schedule();
417
+ };
418
+ }
419
+ //#endregion
420
+ //#region ui-src/index.tsx
421
+ var runtimeVersion = 5;
422
+ var provides = ["related-session:actions"];
423
+ var register = (ctx) => {
424
+ ctx.i18n.contribute({
425
+ "en-US": localeLeaves(catalogue$1),
426
+ "zh-CN": localeLeaves(catalogue)
427
+ }, "en-US");
428
+ registerMetadata(ctx);
429
+ const observe = nativeTaskReader(ctx);
430
+ ctx.services.provide("related-session:actions", { send: (input) => ctx.invoke("send", input) });
431
+ ctx.slots.register("shell.agentRunSettings.section", {
432
+ id: "delegation",
433
+ label: () => i18next.t("delegation.section"),
434
+ order: 10,
435
+ component: (props) => /* @__PURE__ */ jsx(DelegationSettingsSection, {
436
+ ctx,
437
+ ...props
438
+ })
439
+ });
440
+ const subscribe = (listener) => {
441
+ const off = [
442
+ useSubagents.subscribe(listener),
443
+ useAgents.subscribe(listener),
444
+ useInbox.subscribe(listener),
445
+ useSessions.subscribe(listener),
446
+ ctx.host.subscribe(listener)
447
+ ];
448
+ return () => {
449
+ for (const dispose of off) dispose();
450
+ };
451
+ };
452
+ ctx.slots.register("chat.tool.presentation", {
453
+ id: "tasks",
454
+ subscribe,
455
+ describe: ({ call, result, sessionId, openRelated }) => {
456
+ if (sessionId === void 0 || openRelated === void 0) return void 0;
457
+ const refs = dispatchedBy(call.name, result?.content);
458
+ if (refs.length === 0) return void 0;
459
+ observe(sessionId);
460
+ return { relatedSessions: refs.flatMap((ref) => {
461
+ const task = useSubagents.getState().bySession[sessionId]?.[ref.taskId];
462
+ if (!task) return [];
463
+ const agent = agentNamed(useAgents.getState(), task.agent) ?? task.agent;
464
+ const child = {
465
+ childSessionId: task.childSessionId,
466
+ parentSessionId: sessionId,
467
+ agent,
468
+ task: task.input
469
+ };
470
+ const sessions = useSessions.getState().sessions;
471
+ const under = (id) => {
472
+ const seen = /* @__PURE__ */ new Set();
473
+ let at = id;
474
+ while (at !== void 0 && !seen.has(at)) {
475
+ if (at === task.childSessionId) return true;
476
+ seen.add(at);
477
+ at = sessions.find((one) => one.sessionId === at)?.parentSessionId;
478
+ }
479
+ return false;
480
+ };
481
+ const pending = pendingOf(useInbox.getState().items).filter((one) => under(one.sessionId));
482
+ const request = ctx.services.get("chat:pending-request");
483
+ const state = taskLineState(task);
484
+ return [{
485
+ taskId: task.taskId,
486
+ agent,
487
+ title: task.input.replace(/\s+/g, " ").slice(0, 80),
488
+ groupLabel: i18next.t("transcript.run.subagents"),
489
+ state,
490
+ stateLabel: i18next.t(taskStateKey(task)),
491
+ onOpen: () => openRelated(child),
492
+ ops: [...task.state === "finished" ? [] : [{
493
+ icon: "stop",
494
+ label: i18next.t("delegation.stopTask"),
495
+ disabled: task.state === "stopping" || ctx.host.get().connection !== "online",
496
+ onClick: async () => {
497
+ await ctx.invoke("stop", {
498
+ parentSessionId: sessionId,
499
+ childSessionId: task.childSessionId,
500
+ scope: "task",
501
+ taskId: task.taskId
502
+ });
503
+ }
504
+ }], {
505
+ icon: "open",
506
+ label: i18next.t("delegation.viewSession"),
507
+ onClick: () => openRelated(child)
508
+ }],
509
+ ...request === void 0 || pending.length === 0 ? {} : { requests: pending.map((one) => /* @__PURE__ */ jsx(request.component, { pending: one }, one.request.requestId)) }
510
+ }];
511
+ }) };
512
+ }
513
+ });
514
+ };
515
+ //#endregion
516
+ export { provides, register, runtimeVersion };
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.