@aparte/plugin-subagents 1.6.0 → 1.8.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.
- package/dist/aparte-subagent-view.d.ts +21 -0
- package/dist/aparte-subagent-view.d.ts.map +1 -1
- package/dist/{setup-CaTzFtu8.js → connect-BF7Y9tBE.js} +376 -71
- package/dist/connect-BF7Y9tBE.js.map +1 -0
- package/dist/connect.d.ts +44 -0
- package/dist/connect.d.ts.map +1 -0
- package/dist/custom-elements.json +620 -1
- package/dist/drawing.d.ts +9 -1
- package/dist/drawing.d.ts.map +1 -1
- package/dist/index.d.ts +5 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.node.d.ts +3 -1
- package/dist/index.node.d.ts.map +1 -1
- package/dist/index.node.js +3 -2
- package/dist/lanes.d.ts +2 -0
- package/dist/lanes.d.ts.map +1 -1
- package/dist/line.d.ts +2 -1
- package/dist/line.d.ts.map +1 -1
- package/dist/open.d.ts +34 -0
- package/dist/open.d.ts.map +1 -0
- package/dist/steps.d.ts +22 -0
- package/dist/steps.d.ts.map +1 -0
- package/dist/types.d.ts +28 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/words.d.ts +26 -0
- package/dist/words.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/setup-CaTzFtu8.js.map +0 -1
package/dist/drawing.d.ts
CHANGED
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
*
|
|
16
16
|
* A row is found by its segment's id and patched when its segment is a new object (a
|
|
17
17
|
* segment list replaces the object it changes, and only that one), so a token costs the
|
|
18
|
-
* one row it lands in. A row whose renderer is no longer the one in effect is drawn again
|
|
18
|
+
* one row it lands in. A row whose renderer is no longer the one in effect is drawn again —
|
|
19
|
+
* for a tool call or an activity, the tool or activity renderer too, as the bubble does.
|
|
19
20
|
*/
|
|
20
21
|
import { type AparteConfig, type AparteSegment } from '@aparte/core';
|
|
21
22
|
/** The rows of one conversation, inside `container`. */
|
|
@@ -38,6 +39,13 @@ export declare class LaneDrawing {
|
|
|
38
39
|
private patch;
|
|
39
40
|
/** The row for `id` among the container's own children — never a decoy in a row's prose. */
|
|
40
41
|
private childOf;
|
|
42
|
+
/**
|
|
43
|
+
* The element standing where a row stood (before `next`) when it is no row's: what a
|
|
44
|
+
* renderer put in place of its own without the id (`outerHTML`, `replaceWith`), stamped so
|
|
45
|
+
* the loop finds it. A renderer that took its element away left another row there, or
|
|
46
|
+
* nothing: the row keeps its element, and the loop puts it back.
|
|
47
|
+
*/
|
|
48
|
+
private inPlaceOf;
|
|
41
49
|
private release;
|
|
42
50
|
private cleanup;
|
|
43
51
|
}
|
package/dist/drawing.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawing.d.ts","sourceRoot":"","sources":["../src/drawing.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"drawing.d.ts","sourceRoot":"","sources":["../src/drawing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAKH,KAAK,YAAY,EACjB,KAAK,aAAa,EAGrB,MAAM,cAAc,CAAC;AAiEtB,wDAAwD;AACxD,qBAAa,WAAW;IAGR,QAAQ,CAAC,SAAS,EAAE,WAAW;IAF3C,OAAO,CAAC,QAAQ,CAAC,IAAI,CAA0B;gBAE1B,SAAS,EAAE,WAAW;IAE3C,+BAA+B;IAC/B,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED;;;OAGG;IACH,IAAI,CAAC,QAAQ,EAAE,SAAS,aAAa,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI;IA2BnF,4EAA4E;IAC5E,OAAO,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI;IAQnC,4DAA4D;IAC5D,KAAK,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI;IAOjC,OAAO,CAAC,IAAI;IAeZ,OAAO,CAAC,KAAK;IA+Bb,4FAA4F;IAC5F,OAAO,CAAC,OAAO;IAOf;;;;;OAKG;IACH,OAAO,CAAC,SAAS;IAOjB,OAAO,CAAC,OAAO;IAOf,OAAO,CAAC,OAAO;CASlB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -8,13 +8,16 @@
|
|
|
8
8
|
* the conversation and never sent to the model. A sub-agent no call opened gets the same
|
|
9
9
|
* line, from a segment of the plugin's own. Its conversation can be shown under the line
|
|
10
10
|
* (`subagentTranscript`, `details: 'transcript'`) or anywhere else
|
|
11
|
-
* (`<aparte-subagent-view>`)
|
|
11
|
+
* (`<aparte-subagent-view>`), opened from the line's own button with `open: 'event'` and
|
|
12
|
+
* `connectSubagentView`.
|
|
12
13
|
*/
|
|
13
14
|
export { setupSubagents } from './setup.js';
|
|
14
15
|
export { subagentOf, subagentStatus } from './status.js';
|
|
15
16
|
export { subagentTranscript } from './transcript.js';
|
|
17
|
+
export { connectSubagentView } from './connect.js';
|
|
18
|
+
export type { ConnectSubagentViewOptions, SubagentViewSplit } from './connect.js';
|
|
16
19
|
export { AparteSubagentView } from './aparte-subagent-view.js';
|
|
17
20
|
export type { SubagentViewSource } from './aparte-subagent-view.js';
|
|
18
21
|
export { SUBAGENT_SEGMENT_TYPE } from './types.js';
|
|
19
|
-
export type { AparteSubagent, AparteSubagentStatus, AparteSubagentSegment, SubagentsOptions, AparteSubagentStartEventDetail, AparteSubagentEndEventDetail, } from './types.js';
|
|
22
|
+
export type { AparteSubagent, AparteSubagentStatus, AparteSubagentSegment, SubagentsOptions, AparteSubagentStartEventDetail, AparteSubagentEndEventDetail, AparteSubagentOpenEventDetail, } from './types.js';
|
|
20
23
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,YAAY,EAAE,0BAA0B,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAClF,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,YAAY,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AACnD,YAAY,EACR,cAAc,EACd,oBAAoB,EACpB,qBAAqB,EACrB,gBAAgB,EAChB,8BAA8B,EAC9B,4BAA4B,EAC5B,6BAA6B,GAChC,MAAM,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { A, S, s, a, b,
|
|
1
|
+
import { A, S, c, s, a, b, d } from "./connect-BF7Y9tBE.js";
|
|
2
2
|
export {
|
|
3
3
|
A as AparteSubagentView,
|
|
4
4
|
S as SUBAGENT_SEGMENT_TYPE,
|
|
5
|
+
c as connectSubagentView,
|
|
5
6
|
s as setupSubagents,
|
|
6
7
|
a as subagentOf,
|
|
7
8
|
b as subagentStatus,
|
|
8
|
-
|
|
9
|
+
d as subagentTranscript
|
|
9
10
|
};
|
|
10
11
|
//# sourceMappingURL=index.js.map
|
package/dist/index.node.d.ts
CHANGED
|
@@ -10,7 +10,9 @@
|
|
|
10
10
|
export { setupSubagents } from './setup.js';
|
|
11
11
|
export { subagentOf, subagentStatus } from './status.js';
|
|
12
12
|
export { subagentTranscript } from './transcript.js';
|
|
13
|
+
export { connectSubagentView } from './connect.js';
|
|
14
|
+
export type { ConnectSubagentViewOptions, SubagentViewSplit } from './connect.js';
|
|
13
15
|
export type { AparteSubagentView, SubagentViewSource } from './aparte-subagent-view.js';
|
|
14
16
|
export { SUBAGENT_SEGMENT_TYPE } from './types.js';
|
|
15
|
-
export type { AparteSubagent, AparteSubagentStatus, AparteSubagentSegment, SubagentsOptions, AparteSubagentStartEventDetail, AparteSubagentEndEventDetail, } from './types.js';
|
|
17
|
+
export type { AparteSubagent, AparteSubagentStatus, AparteSubagentSegment, SubagentsOptions, AparteSubagentStartEventDetail, AparteSubagentEndEventDetail, AparteSubagentOpenEventDetail, } from './types.js';
|
|
16
18
|
//# sourceMappingURL=index.node.d.ts.map
|
package/dist/index.node.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.node.d.ts","sourceRoot":"","sources":["../src/index.node.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.node.d.ts","sourceRoot":"","sources":["../src/index.node.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,YAAY,EAAE,0BAA0B,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAGlF,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACxF,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AACnD,YAAY,EACR,cAAc,EACd,oBAAoB,EACpB,qBAAqB,EACrB,gBAAgB,EAChB,8BAA8B,EAC9B,4BAA4B,EAC5B,6BAA6B,GAChC,MAAM,YAAY,CAAC"}
|
package/dist/index.node.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { S, s, a, b,
|
|
1
|
+
import { S, c, s, a, b, d } from "./connect-BF7Y9tBE.js";
|
|
2
2
|
export {
|
|
3
3
|
S as SUBAGENT_SEGMENT_TYPE,
|
|
4
|
+
c as connectSubagentView,
|
|
4
5
|
s as setupSubagents,
|
|
5
6
|
a as subagentOf,
|
|
6
7
|
b as subagentStatus,
|
|
7
|
-
|
|
8
|
+
d as subagentTranscript
|
|
8
9
|
};
|
|
9
10
|
//# sourceMappingURL=index.node.js.map
|
package/dist/lanes.d.ts
CHANGED
|
@@ -29,6 +29,8 @@ export interface LaneWrite {
|
|
|
29
29
|
readonly agentId: string;
|
|
30
30
|
readonly anchor: AparteSegment;
|
|
31
31
|
}
|
|
32
|
+
/** The last anchor written for this sub-agent while its run goes on, if any. */
|
|
33
|
+
export declare function lastLaneWrite(messageId: string, agentId: string): LaneWrite | undefined;
|
|
32
34
|
/**
|
|
33
35
|
* Hear every sub-agent's anchor as it is written — once a frame while it streams, at once
|
|
34
36
|
* for everything else. What `<aparte-subagent-view>` follows a live sub-agent with.
|
package/dist/lanes.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lanes.d.ts","sourceRoot":"","sources":["../src/lanes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAIH,KAAK,qBAAqB,EAC1B,KAAK,aAAa,EAGlB,KAAK,oBAAoB,EAG5B,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"lanes.d.ts","sourceRoot":"","sources":["../src/lanes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAIH,KAAK,qBAAqB,EAC1B,KAAK,aAAa,EAGlB,KAAK,oBAAoB,EAG5B,MAAM,cAAc,CAAC;AAwBtB,8GAA8G;AAC9G,MAAM,WAAW,SAAS;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;CAClC;AAWD,gFAAgF;AAChF,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAEvF;AAKD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,EAAE,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,GAAG,MAAM,IAAI,CAG1E;AAqGD,yEAAyE;AACzE,wBAAgB,WAAW,IAAI;IAAE,OAAO,EAAE,CAAC,KAAK,EAAE,oBAAoB,EAAE,GAAG,EAAE,qBAAqB,KAAK,IAAI,CAAC;IAAC,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,CA4djI"}
|
package/dist/line.d.ts
CHANGED
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
* The plugin gives core a tool-line provider (`setToolLineProvider`): for a call that carries
|
|
5
5
|
* a sub-agent — the call that opened it, or the call the plugin's own segment stands in for —
|
|
6
6
|
* it says the sub-agent's name and its task, and on a second line, from the sub-agent's start to
|
|
7
|
-
* its end, what it is on ("Starting…", then its
|
|
7
|
+
* its end, what it is on ("Starting…", then its running call, else the step it announced, else
|
|
8
|
+
* its latest call) and once it is over what it did
|
|
8
9
|
* ("3 tools · 12s"). The second line is there the whole time, so the row keeps its height: one
|
|
9
10
|
* that grew a line when the sub-agent began acting and lost it at its end moved every row under
|
|
10
11
|
* it twice, and a count that grew beside the task moved the task. Core reads it AFTER the app's
|
package/dist/line.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"line.d.ts","sourceRoot":"","sources":["../src/line.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"line.d.ts","sourceRoot":"","sources":["../src/line.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAMH,KAAK,qBAAqB,EAC1B,KAAK,cAAc,EACtB,MAAM,cAAc,CAAC;AAMtB,OAAO,KAAK,EAAwC,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAKzF,sEAAsE;AACtE,wBAAgB,WAAW,CAAC,OAAO,EAAE,qBAAqB,GAAG,qBAAqB,CAGjF;AAsFD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,GAAE,gBAAqB,GAAG,CAAC,OAAO,EAAE,qBAAqB,KAAK,cAAc,GAAG,SAAS,CAkEjI"}
|
package/dist/open.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A sub-agent's line opens its conversation elsewhere: what the line says (the Open button,
|
|
3
|
+
* which one is shown now) and what pressing it dispatches.
|
|
4
|
+
*
|
|
5
|
+
* The line provider gives core an `open` for every sub-agent's line when the setup asks for
|
|
6
|
+
* it; core draws the button and calls back with the row. The plugin then dispatches
|
|
7
|
+
* `aparte-subagent-open` from the row, and the app (or `connectSubagentView`) decides where the
|
|
8
|
+
* conversation goes. Which sub-agent is shown is kept here, by whoever shows it, so a line
|
|
9
|
+
* drawn again — a reload, a row rebuilt — still says it is the one open.
|
|
10
|
+
*/
|
|
11
|
+
import type { AparteToolCallSegment } from '@aparte/core';
|
|
12
|
+
import type { AparteSubagent } from './types.js';
|
|
13
|
+
/** Whether some view shows this sub-agent now. */
|
|
14
|
+
export declare function isShown(messageId: string | undefined, agentId: string): boolean;
|
|
15
|
+
/** `owner` shows this sub-agent now, or nothing (`null`). */
|
|
16
|
+
export declare function setShown(owner: object, at: {
|
|
17
|
+
messageId: string;
|
|
18
|
+
agentId: string;
|
|
19
|
+
} | null): void;
|
|
20
|
+
/**
|
|
21
|
+
* The row's Open button: core's, in its own line, or — a row with a detail — in the slot
|
|
22
|
+
* beside its disclosure (never in a summary, never a nested row's).
|
|
23
|
+
*/
|
|
24
|
+
export declare const openButtonOf: (row: Element) => HTMLElement | null;
|
|
25
|
+
/**
|
|
26
|
+
* Mark a row as the one shown, or not: the two marks core writes from `open.current` when it
|
|
27
|
+
* draws the row, written here on a row already drawn so it does not wait for its next draw.
|
|
28
|
+
*/
|
|
29
|
+
export declare function markRow(row: Element, on: boolean): void;
|
|
30
|
+
/** Every row marked as shown under `root`, unmarked. */
|
|
31
|
+
export declare function unmarkAll(root: ParentNode): void;
|
|
32
|
+
/** Dispatch `aparte-subagent-open` from the row of `sub`, drawn for `segment`. */
|
|
33
|
+
export declare function dispatchOpen(row: HTMLElement, segment: AparteToolCallSegment, sub: AparteSubagent, standIn: boolean): void;
|
|
34
|
+
//# sourceMappingURL=open.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"open.d.ts","sourceRoot":"","sources":["../src/open.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAiC,MAAM,YAAY,CAAC;AAOhF,kDAAkD;AAClD,wBAAgB,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAK/E;AAED,6DAA6D;AAC7D,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,GAAG,IAAI,CAG/F;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,QAAS,OAAO,KAAG,WAAW,GAAG,IACuD,CAAC;AAElH;;;GAGG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,GAAG,IAAI,CAMvD;AAED,wDAAwD;AACxD,wBAAgB,SAAS,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAEhD;AAeD,kFAAkF;AAClF,wBAAgB,YAAY,CAAC,GAAG,EAAE,WAAW,EAAE,OAAO,EAAE,qBAAqB,EAAE,GAAG,EAAE,cAAc,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAc1H"}
|
package/dist/steps.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The steps a sub-agent has open ("Reading the parser"), live: what its line says while none
|
|
3
|
+
* of its calls runs.
|
|
4
|
+
*
|
|
5
|
+
* Kept here, by reply and by agent, and never on a segment: a step lasts only as long as it is
|
|
6
|
+
* open, and the conversation a page saves must not keep one. The lanes write it as the
|
|
7
|
+
* sub-agent's `step-start` / `step-end` arrive and forget it with the sub-agent's end; the line
|
|
8
|
+
* reads it at each draw. Steps nest and overlap: the latest one open is the one said, and when
|
|
9
|
+
* it ends the one before it is said again.
|
|
10
|
+
*/
|
|
11
|
+
/** A step of the sub-agent `agentId` of the reply `messageId` begins. */
|
|
12
|
+
export declare function stepStarted(messageId: string, agentId: string, name: string): void;
|
|
13
|
+
/** The latest open step of that name ends. */
|
|
14
|
+
export declare function stepEnded(messageId: string, agentId: string, name: string): void;
|
|
15
|
+
/** Every step of the sub-agent ends: it ended, or its reply did. */
|
|
16
|
+
export declare function stepsEnded(messageId: string, agentId: string): void;
|
|
17
|
+
/**
|
|
18
|
+
* The step the sub-agent is on, if any. Without the reply's id (a segment that does not carry
|
|
19
|
+
* one), the first sub-agent of that id with a step open.
|
|
20
|
+
*/
|
|
21
|
+
export declare function currentStep(messageId: string | undefined, agentId: string): string | undefined;
|
|
22
|
+
//# sourceMappingURL=steps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"steps.d.ts","sourceRoot":"","sources":["../src/steps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,yEAAyE;AACzE,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAGlF;AAED,8CAA8C;AAC9C,wBAAgB,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAShF;AAED,oEAAoE;AACpE,wBAAgB,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAEnE;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAK9F"}
|
package/dist/types.d.ts
CHANGED
|
@@ -60,6 +60,15 @@ export interface SubagentsOptions {
|
|
|
60
60
|
* closed until the reader opens it — or open, with the tool display's `open: true`.
|
|
61
61
|
*/
|
|
62
62
|
details?: false | 'transcript' | AparteToolDetails;
|
|
63
|
+
/**
|
|
64
|
+
* What the line can open elsewhere. `'event'`: an Open button at the end of the line
|
|
65
|
+
* dispatches `aparte-subagent-open`, for the app to show the sub-agent's conversation
|
|
66
|
+
* somewhere else (`connectSubagentView` shows it in an `<aparte-subagent-view>` beside the
|
|
67
|
+
* chat). A line with nothing behind it opens on a click anywhere on it too; with `details`,
|
|
68
|
+
* the line keeps opening its detail and only the button opens elsewhere. Left out (the
|
|
69
|
+
* default), the line opens nothing: no button, no pointer.
|
|
70
|
+
*/
|
|
71
|
+
open?: false | 'event';
|
|
63
72
|
}
|
|
64
73
|
/**
|
|
65
74
|
* A sub-agent started working for a reply, or started again after a pause. Bubbles out of
|
|
@@ -94,10 +103,29 @@ export interface AparteSubagentEndEventDetail {
|
|
|
94
103
|
agentId: string;
|
|
95
104
|
status: AparteSubagentStatus;
|
|
96
105
|
}
|
|
106
|
+
/**
|
|
107
|
+
* A reader pressed a sub-agent's Open button (`setupSubagents({ open: 'event' })`): show its
|
|
108
|
+
* conversation elsewhere — an `<aparte-subagent-view>` with this `messageId` and `agentId`.
|
|
109
|
+
* Dispatched from the line, bubbles and is composed.
|
|
110
|
+
*
|
|
111
|
+
* @event aparte-subagent-open
|
|
112
|
+
*/
|
|
113
|
+
export interface AparteSubagentOpenEventDetail {
|
|
114
|
+
/** The chat the reply is in, when the line knows it. */
|
|
115
|
+
targetId?: string;
|
|
116
|
+
/** The reply the sub-agent works for: a view's `message-id`. */
|
|
117
|
+
messageId: string;
|
|
118
|
+
/** Which sub-agent: a view's `agent-id`. */
|
|
119
|
+
agentId: string;
|
|
120
|
+
name?: string;
|
|
121
|
+
/** The call that opened it, when its line is that call's row. */
|
|
122
|
+
toolCallId?: string;
|
|
123
|
+
}
|
|
97
124
|
declare global {
|
|
98
125
|
interface HTMLElementEventMap {
|
|
99
126
|
'aparte-subagent-start': CustomEvent<AparteSubagentStartEventDetail>;
|
|
100
127
|
'aparte-subagent-end': CustomEvent<AparteSubagentEndEventDetail>;
|
|
128
|
+
'aparte-subagent-open': CustomEvent<AparteSubagentOpenEventDetail>;
|
|
101
129
|
}
|
|
102
130
|
}
|
|
103
131
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAExF,8EAA8E;AAC9E,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEzF;;;;;;GAMG;AACH,MAAM,WAAW,cAAc;IAC3B,iEAAiE;IACjE,EAAE,EAAE,MAAM,CAAC;IAC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C;IACpB,kDAAkD;IAClD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;GAKG;AACH,MAAM,WAAW,4BAA4B;IACzC,gCAAgC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,oBAAoB,CAAC;CAChC;AAED;;;;;;GAMG;AACH,MAAM,WAAW,6BAA6B;IAC1C,wDAAwD;IACxD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gEAAgE;IAChE,SAAS,EAAE,MAAM,CAAC;IAClB,4CAA4C;IAC5C,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iEAAiE;IACjE,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,mBAAmB;QACzB,uBAAuB,EAAE,WAAW,CAAC,8BAA8B,CAAC,CAAC;QACrE,qBAAqB,EAAE,WAAW,CAAC,4BAA4B,CAAC,CAAC;QACjE,sBAAsB,EAAE,WAAW,CAAC,6BAA6B,CAAC,CAAC;KACtE;CACJ"}
|
package/dist/words.d.ts
CHANGED
|
@@ -53,6 +53,32 @@ export declare const WORDS: {
|
|
|
53
53
|
ru: string;
|
|
54
54
|
zh: string;
|
|
55
55
|
};
|
|
56
|
+
/** The Open button on a sub-agent's line (`setupSubagents({ open: 'event' })`): its name and tooltip. */
|
|
57
|
+
subagentsOpen: {
|
|
58
|
+
en: string;
|
|
59
|
+
fr: string;
|
|
60
|
+
de: string;
|
|
61
|
+
es: string;
|
|
62
|
+
it: string;
|
|
63
|
+
ja: string;
|
|
64
|
+
ko: string;
|
|
65
|
+
pt: string;
|
|
66
|
+
ru: string;
|
|
67
|
+
zh: string;
|
|
68
|
+
};
|
|
69
|
+
/** The Close button of a `<aparte-subagent-view closable>`. */
|
|
70
|
+
subagentsClose: {
|
|
71
|
+
en: string;
|
|
72
|
+
fr: string;
|
|
73
|
+
de: string;
|
|
74
|
+
es: string;
|
|
75
|
+
it: string;
|
|
76
|
+
ja: string;
|
|
77
|
+
ko: string;
|
|
78
|
+
pt: string;
|
|
79
|
+
ru: string;
|
|
80
|
+
zh: string;
|
|
81
|
+
};
|
|
56
82
|
};
|
|
57
83
|
export type WordKey = keyof typeof WORDS;
|
|
58
84
|
/** The word for `key`: the app's locale, else this table in the chat's language, else English. */
|
package/dist/words.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"words.d.ts","sourceRoot":"","sources":["../src/words.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAa,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAK5D,eAAO,MAAM,KAAK;IACd,oEAAoE;;;;;;;;;;;;;IAapE,iEAAiE;;;;;;;;;;;;;IAKjE,uFAAuF;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"words.d.ts","sourceRoot":"","sources":["../src/words.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAa,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAK5D,eAAO,MAAM,KAAK;IACd,oEAAoE;;;;;;;;;;;;;IAapE,iEAAiE;;;;;;;;;;;;;IAKjE,uFAAuF;;;;;;;;;;;;;IAKvF,yGAAyG;;;;;;;;;;;;;IAKzG,+DAA+D;;;;;;;;;;;;;CAKnC,CAAC;AAEjC,MAAM,MAAM,OAAO,GAAG,MAAM,OAAO,KAAK,CAAC;AAQzC,kGAAkG;AAClG,wBAAgB,IAAI,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,EAAE,OAAO,GAAG,MAAM,CAI/D;AAED,8DAA8D;AAC9D,wBAAgB,SAAS,CAAC,MAAM,EAAE,YAAY,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAGjE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aparte/plugin-subagents",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"homepage": "https://apartejs.dev/guides/sub-agents/",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -57,13 +57,13 @@
|
|
|
57
57
|
"node": ">=18"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
|
-
"@aparte/core": ">=1.
|
|
60
|
+
"@aparte/core": ">=1.8.0 <2.0.0"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@custom-elements-manifest/analyzer": "^0.11.0",
|
|
64
64
|
"typescript": "^5.4.0",
|
|
65
65
|
"vite": "^6.0.0",
|
|
66
|
-
"@aparte/core": "1.
|
|
66
|
+
"@aparte/core": "1.8.0"
|
|
67
67
|
},
|
|
68
68
|
"keywords": [
|
|
69
69
|
"aparte",
|