@agent-spaces/server 0.3.61 → 0.3.62
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/adapters/claude-code-runtime/index.js +19 -0
- package/dist/adapters/claude-code-runtime/sdk-config.js +34 -10
- package/dist/adapters/git.js +29 -13
- package/dist/agents/agent-message-parts.js +27 -3
- package/dist/package.json +1 -1
- package/dist/routes/channel.js +21 -4
- package/dist/routes/file.js +87 -1
- package/dist/routes/skill.js +26 -3
- package/dist/services/agent.js +45 -16
- package/dist/services/persistent-agent-context.js +37 -4
- package/dist/services/skill.js +163 -41
- package/dist/web/404.html +1 -1
- package/dist/web/__next.__PAGE__.txt +4 -4
- package/dist/web/__next._full.txt +23 -22
- package/dist/web/__next._head.txt +4 -4
- package/dist/web/__next._index.txt +13 -13
- package/dist/web/__next._tree.txt +2 -2
- package/dist/web/_next/static/chunks/{0_-c.y2qq4ax4.js → 0-81wi7xr2nd-.js} +56 -56
- package/dist/web/_next/static/chunks/00lca9lsasdm7.js +1 -0
- package/dist/web/_next/static/chunks/{0sz8_nijfiz0p.js → 02shswpmybici.js} +1 -1
- package/dist/web/_next/static/chunks/05f8cnmzqd5wb.js +1 -0
- package/dist/web/_next/static/chunks/05tx6hzdtkgi9.js +2 -0
- package/dist/web/_next/static/chunks/{0w1iudd1d46sw.js → 07a0rktf_nr5h.js} +1 -1
- package/dist/web/_next/static/chunks/{0_g3irbniww6d.js → 07nbyndvzftr1.js} +1 -1
- package/dist/web/_next/static/chunks/08kfx8on9oty~.js +1 -0
- package/dist/web/_next/static/chunks/{13ess~4pdmxma.js → 0bn~onkv~9xza.js} +1 -1
- package/dist/web/_next/static/chunks/0i51q.5s_-.vh.css +1 -0
- package/dist/web/_next/static/chunks/0k.8qdk7oi_os.js +1 -0
- package/dist/web/_next/static/chunks/0qf163pbrwy4z.js +1 -0
- package/dist/web/_next/static/chunks/{05iy4.c-1cfhd.js → 0rke_patcovgr.js} +1 -1
- package/dist/web/_next/static/chunks/0rnt-f3pjxb-d.js +5 -0
- package/dist/web/_next/static/chunks/0tgbcgsca9mrg.js +1 -0
- package/dist/web/_next/static/chunks/0tyhv6.y7~yxd.js +1 -0
- package/dist/web/_next/static/chunks/0vuvql8rloda5.js +1 -0
- package/dist/web/_next/static/chunks/0xmmk3vebw8xs.js +1 -0
- package/dist/web/_next/static/chunks/0yo22_w53mo~5.js +1 -0
- package/dist/web/_next/static/chunks/12c0jp0qvlr1t.js +1 -0
- package/dist/web/_next/static/chunks/12pg1nn3v~~5k.js +1 -0
- package/dist/web/_next/static/chunks/16cyr8ilpx1nn.js +1 -0
- package/dist/web/_not-found/__next._full.txt +19 -19
- package/dist/web/_not-found/__next._head.txt +4 -4
- package/dist/web/_not-found/__next._index.txt +13 -13
- package/dist/web/_not-found/__next._not-found.__PAGE__.txt +2 -2
- package/dist/web/_not-found/__next._not-found.txt +3 -3
- package/dist/web/_not-found/__next._tree.txt +2 -2
- package/dist/web/_not-found.html +1 -1
- package/dist/web/_not-found.txt +19 -19
- package/dist/web/icons/file_type_audio.svg +3 -1
- package/dist/web/icons/file_type_video.svg +10 -1
- package/dist/web/index.html +1 -1
- package/dist/web/index.txt +23 -22
- package/dist/web/login/__next._full.txt +24 -22
- package/dist/web/login/__next._head.txt +4 -4
- package/dist/web/login/__next._index.txt +13 -13
- package/dist/web/login/__next._tree.txt +2 -2
- package/dist/web/login/__next.login.__PAGE__.txt +4 -4
- package/dist/web/login/__next.login.txt +3 -3
- package/dist/web/login.html +1 -1
- package/dist/web/login.txt +24 -22
- package/dist/web/settings/__next._full.txt +30 -29
- package/dist/web/settings/__next._head.txt +4 -4
- package/dist/web/settings/__next._index.txt +13 -13
- package/dist/web/settings/__next._tree.txt +2 -2
- package/dist/web/settings/__next.settings.__PAGE__.txt +4 -4
- package/dist/web/settings/__next.settings.txt +5 -5
- package/dist/web/settings/agents/__next._full.txt +35 -34
- package/dist/web/settings/agents/__next._head.txt +4 -4
- package/dist/web/settings/agents/__next._index.txt +13 -13
- package/dist/web/settings/agents/__next._tree.txt +2 -2
- package/dist/web/settings/agents/__next.settings.agents.__PAGE__.txt +4 -4
- package/dist/web/settings/agents/__next.settings.agents.txt +3 -3
- package/dist/web/settings/agents/__next.settings.txt +5 -5
- package/dist/web/settings/agents.html +1 -1
- package/dist/web/settings/agents.txt +35 -34
- package/dist/web/settings/mcps/__next._full.txt +35 -34
- package/dist/web/settings/mcps/__next._head.txt +4 -4
- package/dist/web/settings/mcps/__next._index.txt +13 -13
- package/dist/web/settings/mcps/__next._tree.txt +2 -2
- package/dist/web/settings/mcps/__next.settings.mcps.__PAGE__.txt +4 -4
- package/dist/web/settings/mcps/__next.settings.mcps.txt +3 -3
- package/dist/web/settings/mcps/__next.settings.txt +5 -5
- package/dist/web/settings/mcps.html +1 -1
- package/dist/web/settings/mcps.txt +35 -34
- package/dist/web/settings/models/__next._full.txt +35 -34
- package/dist/web/settings/models/__next._head.txt +4 -4
- package/dist/web/settings/models/__next._index.txt +13 -13
- package/dist/web/settings/models/__next._tree.txt +2 -2
- package/dist/web/settings/models/__next.settings.models.__PAGE__.txt +4 -4
- package/dist/web/settings/models/__next.settings.models.txt +3 -3
- package/dist/web/settings/models/__next.settings.txt +5 -5
- package/dist/web/settings/models.html +1 -1
- package/dist/web/settings/models.txt +35 -34
- package/dist/web/settings/prompts/__next._full.txt +35 -34
- package/dist/web/settings/prompts/__next._head.txt +4 -4
- package/dist/web/settings/prompts/__next._index.txt +13 -13
- package/dist/web/settings/prompts/__next._tree.txt +2 -2
- package/dist/web/settings/prompts/__next.settings.prompts.__PAGE__.txt +4 -4
- package/dist/web/settings/prompts/__next.settings.prompts.txt +3 -3
- package/dist/web/settings/prompts/__next.settings.txt +5 -5
- package/dist/web/settings/prompts.html +1 -1
- package/dist/web/settings/prompts.txt +35 -34
- package/dist/web/settings/providers/__next._full.txt +35 -34
- package/dist/web/settings/providers/__next._head.txt +4 -4
- package/dist/web/settings/providers/__next._index.txt +13 -13
- package/dist/web/settings/providers/__next._tree.txt +2 -2
- package/dist/web/settings/providers/__next.settings.providers.__PAGE__.txt +4 -4
- package/dist/web/settings/providers/__next.settings.providers.txt +3 -3
- package/dist/web/settings/providers/__next.settings.txt +5 -5
- package/dist/web/settings/providers.html +1 -1
- package/dist/web/settings/providers.txt +35 -34
- package/dist/web/settings/skills/__next._full.txt +35 -34
- package/dist/web/settings/skills/__next._head.txt +4 -4
- package/dist/web/settings/skills/__next._index.txt +13 -13
- package/dist/web/settings/skills/__next._tree.txt +2 -2
- package/dist/web/settings/skills/__next.settings.skills.__PAGE__.txt +4 -4
- package/dist/web/settings/skills/__next.settings.skills.txt +3 -3
- package/dist/web/settings/skills/__next.settings.txt +5 -5
- package/dist/web/settings/skills.html +1 -1
- package/dist/web/settings/skills.txt +35 -34
- package/dist/web/settings.html +1 -1
- package/dist/web/settings.txt +30 -29
- package/dist/web/workflows/__next._full.txt +31 -30
- package/dist/web/workflows/__next._head.txt +4 -4
- package/dist/web/workflows/__next._index.txt +13 -13
- package/dist/web/workflows/__next._tree.txt +2 -2
- package/dist/web/workflows/__next.workflows.__PAGE__.txt +4 -4
- package/dist/web/workflows/__next.workflows.txt +3 -3
- package/dist/web/workflows.html +1 -1
- package/dist/web/workflows.txt +31 -30
- package/dist/web/workspace/_/__next._full.txt +56 -55
- package/dist/web/workspace/_/__next._head.txt +4 -4
- package/dist/web/workspace/_/__next._index.txt +13 -13
- package/dist/web/workspace/_/__next._tree.txt +2 -2
- package/dist/web/workspace/_/__next.workspace.$d$id.__PAGE__.txt +3 -3
- package/dist/web/workspace/_/__next.workspace.$d$id.txt +3 -3
- package/dist/web/workspace/_/__next.workspace.txt +3 -3
- package/dist/web/workspace/_.html +1 -1
- package/dist/web/workspace/_.txt +56 -55
- package/dist/web/workspaces/__next._full.txt +30 -27
- package/dist/web/workspaces/__next._head.txt +4 -4
- package/dist/web/workspaces/__next._index.txt +13 -13
- package/dist/web/workspaces/__next._tree.txt +2 -2
- package/dist/web/workspaces/__next.workspaces.__PAGE__.txt +4 -4
- package/dist/web/workspaces/__next.workspaces.txt +3 -3
- package/dist/web/workspaces.html +1 -1
- package/dist/web/workspaces.txt +30 -27
- package/dist/ws/agent-runner.js +51 -31
- package/dist/ws/message-parts.js +61 -2
- package/package.json +1 -1
- package/dist/web/_next/static/chunks/0-1pn22sg~67u.js +0 -2
- package/dist/web/_next/static/chunks/03me5_ir..2ix.js +0 -1
- package/dist/web/_next/static/chunks/05eu2fdixf7c9.js +0 -1
- package/dist/web/_next/static/chunks/0cs830n97dgjy.js +0 -1
- package/dist/web/_next/static/chunks/0ju52ko_nh7gi.js +0 -1
- package/dist/web/_next/static/chunks/0mny8i81aenx3.js +0 -1
- package/dist/web/_next/static/chunks/0nsu~f3voe~0i.js +0 -5
- package/dist/web/_next/static/chunks/0w3o.7vi.dlm6.js +0 -1
- package/dist/web/_next/static/chunks/0x4b-a2ixww6m.js +0 -1
- package/dist/web/_next/static/chunks/0~w6ugk9s5p-h.css +0 -1
- package/dist/web/_next/static/chunks/125nunjfj2fj0.js +0 -1
- package/dist/web/_next/static/chunks/1285yqy_oirb-.js +0 -1
- package/dist/web/_next/static/chunks/14n8i2xz4_y-e.js +0 -1
- /package/dist/web/_next/static/{HUlYEknPhyW7dRmJ5mFdG → GS3b40oeaeLxm7i9-ibaj}/_buildManifest.js +0 -0
- /package/dist/web/_next/static/{HUlYEknPhyW7dRmJ5mFdG → GS3b40oeaeLxm7i9-ibaj}/_clientMiddlewareManifest.js +0 -0
- /package/dist/web/_next/static/{HUlYEknPhyW7dRmJ5mFdG → GS3b40oeaeLxm7i9-ibaj}/_ssgManifest.js +0 -0
package/dist/web/workspaces.txt
CHANGED
|
@@ -1,38 +1,41 @@
|
|
|
1
1
|
1:"$Sreact.fragment"
|
|
2
|
-
2:I[701341,["/_next/static/chunks/
|
|
3
|
-
3:I[950396,["/_next/static/chunks/
|
|
4
|
-
4:I[556106,["/_next/static/chunks/
|
|
5
|
-
5:I[694819,["/_next/static/chunks/
|
|
6
|
-
6:I[177053,["/_next/static/chunks/
|
|
7
|
-
7:I[994876,["/_next/static/chunks/
|
|
8
|
-
8:I[242864,["/_next/static/chunks/
|
|
9
|
-
9:I[46907,["/_next/static/chunks/
|
|
10
|
-
a:I[698679,["/_next/static/chunks/
|
|
11
|
-
b:I[360112,["/_next/static/chunks/
|
|
12
|
-
c:I[984642,["/_next/static/chunks/
|
|
13
|
-
d:I[487786,["/_next/static/chunks/
|
|
14
|
-
e:I[259295,["/_next/static/chunks/
|
|
15
|
-
11:I[990774,["/_next/static/chunks/
|
|
2
|
+
2:I[701341,["/_next/static/chunks/00lca9lsasdm7.js","/_next/static/chunks/05tx6hzdtkgi9.js","/_next/static/chunks/0gig.k.rq8d0x.js","/_next/static/chunks/12c0jp0qvlr1t.js","/_next/static/chunks/16cyr8ilpx1nn.js","/_next/static/chunks/0vuvql8rloda5.js","/_next/static/chunks/002-dxhags4dj.js","/_next/static/chunks/0xmmk3vebw8xs.js","/_next/static/chunks/1250wo~-5dgyx.js","/_next/static/chunks/0tyhv6.y7~yxd.js","/_next/static/chunks/0tgbcgsca9mrg.js","/_next/static/chunks/0rnt-f3pjxb-d.js","/_next/static/chunks/0yo22_w53mo~5.js","/_next/static/chunks/07nbyndvzftr1.js","/_next/static/chunks/0qf163pbrwy4z.js","/_next/static/chunks/02shswpmybici.js"],"ZoomWrapper"]
|
|
3
|
+
3:I[950396,["/_next/static/chunks/00lca9lsasdm7.js","/_next/static/chunks/05tx6hzdtkgi9.js","/_next/static/chunks/0gig.k.rq8d0x.js","/_next/static/chunks/12c0jp0qvlr1t.js","/_next/static/chunks/16cyr8ilpx1nn.js","/_next/static/chunks/0vuvql8rloda5.js","/_next/static/chunks/002-dxhags4dj.js","/_next/static/chunks/0xmmk3vebw8xs.js","/_next/static/chunks/1250wo~-5dgyx.js","/_next/static/chunks/0tyhv6.y7~yxd.js","/_next/static/chunks/0tgbcgsca9mrg.js","/_next/static/chunks/0rnt-f3pjxb-d.js","/_next/static/chunks/0yo22_w53mo~5.js","/_next/static/chunks/07nbyndvzftr1.js","/_next/static/chunks/0qf163pbrwy4z.js","/_next/static/chunks/02shswpmybici.js"],"ThemeProvider"]
|
|
4
|
+
4:I[556106,["/_next/static/chunks/00lca9lsasdm7.js","/_next/static/chunks/05tx6hzdtkgi9.js","/_next/static/chunks/0gig.k.rq8d0x.js","/_next/static/chunks/12c0jp0qvlr1t.js","/_next/static/chunks/16cyr8ilpx1nn.js","/_next/static/chunks/0vuvql8rloda5.js","/_next/static/chunks/002-dxhags4dj.js","/_next/static/chunks/0xmmk3vebw8xs.js","/_next/static/chunks/1250wo~-5dgyx.js","/_next/static/chunks/0tyhv6.y7~yxd.js","/_next/static/chunks/0tgbcgsca9mrg.js","/_next/static/chunks/0rnt-f3pjxb-d.js","/_next/static/chunks/0yo22_w53mo~5.js","/_next/static/chunks/07nbyndvzftr1.js","/_next/static/chunks/0qf163pbrwy4z.js","/_next/static/chunks/02shswpmybici.js"],"LocaleProvider"]
|
|
5
|
+
5:I[694819,["/_next/static/chunks/00lca9lsasdm7.js","/_next/static/chunks/05tx6hzdtkgi9.js","/_next/static/chunks/0gig.k.rq8d0x.js","/_next/static/chunks/12c0jp0qvlr1t.js","/_next/static/chunks/16cyr8ilpx1nn.js","/_next/static/chunks/0vuvql8rloda5.js","/_next/static/chunks/002-dxhags4dj.js","/_next/static/chunks/0xmmk3vebw8xs.js","/_next/static/chunks/1250wo~-5dgyx.js","/_next/static/chunks/0tyhv6.y7~yxd.js","/_next/static/chunks/0tgbcgsca9mrg.js","/_next/static/chunks/0rnt-f3pjxb-d.js","/_next/static/chunks/0yo22_w53mo~5.js","/_next/static/chunks/07nbyndvzftr1.js","/_next/static/chunks/0qf163pbrwy4z.js","/_next/static/chunks/02shswpmybici.js"],"ViewportInsets"]
|
|
6
|
+
6:I[177053,["/_next/static/chunks/00lca9lsasdm7.js","/_next/static/chunks/05tx6hzdtkgi9.js","/_next/static/chunks/0gig.k.rq8d0x.js","/_next/static/chunks/12c0jp0qvlr1t.js","/_next/static/chunks/16cyr8ilpx1nn.js","/_next/static/chunks/0vuvql8rloda5.js","/_next/static/chunks/002-dxhags4dj.js","/_next/static/chunks/0xmmk3vebw8xs.js","/_next/static/chunks/1250wo~-5dgyx.js","/_next/static/chunks/0tyhv6.y7~yxd.js","/_next/static/chunks/0tgbcgsca9mrg.js","/_next/static/chunks/0rnt-f3pjxb-d.js","/_next/static/chunks/0yo22_w53mo~5.js","/_next/static/chunks/07nbyndvzftr1.js","/_next/static/chunks/0qf163pbrwy4z.js","/_next/static/chunks/02shswpmybici.js"],"AuthGuard"]
|
|
7
|
+
7:I[994876,["/_next/static/chunks/00lca9lsasdm7.js","/_next/static/chunks/05tx6hzdtkgi9.js","/_next/static/chunks/0gig.k.rq8d0x.js","/_next/static/chunks/12c0jp0qvlr1t.js","/_next/static/chunks/16cyr8ilpx1nn.js","/_next/static/chunks/0vuvql8rloda5.js","/_next/static/chunks/002-dxhags4dj.js","/_next/static/chunks/0xmmk3vebw8xs.js","/_next/static/chunks/1250wo~-5dgyx.js","/_next/static/chunks/0tyhv6.y7~yxd.js","/_next/static/chunks/0tgbcgsca9mrg.js","/_next/static/chunks/0rnt-f3pjxb-d.js","/_next/static/chunks/0yo22_w53mo~5.js","/_next/static/chunks/07nbyndvzftr1.js","/_next/static/chunks/0qf163pbrwy4z.js","/_next/static/chunks/02shswpmybici.js"],"AppShell"]
|
|
8
|
+
8:I[242864,["/_next/static/chunks/00lca9lsasdm7.js","/_next/static/chunks/05tx6hzdtkgi9.js","/_next/static/chunks/0gig.k.rq8d0x.js","/_next/static/chunks/12c0jp0qvlr1t.js","/_next/static/chunks/16cyr8ilpx1nn.js","/_next/static/chunks/0vuvql8rloda5.js","/_next/static/chunks/002-dxhags4dj.js","/_next/static/chunks/0xmmk3vebw8xs.js","/_next/static/chunks/1250wo~-5dgyx.js","/_next/static/chunks/0tyhv6.y7~yxd.js","/_next/static/chunks/0tgbcgsca9mrg.js","/_next/static/chunks/0rnt-f3pjxb-d.js","/_next/static/chunks/0yo22_w53mo~5.js","/_next/static/chunks/07nbyndvzftr1.js","/_next/static/chunks/0qf163pbrwy4z.js","/_next/static/chunks/02shswpmybici.js"],"default"]
|
|
9
|
+
9:I[46907,["/_next/static/chunks/00lca9lsasdm7.js","/_next/static/chunks/05tx6hzdtkgi9.js","/_next/static/chunks/0gig.k.rq8d0x.js","/_next/static/chunks/12c0jp0qvlr1t.js","/_next/static/chunks/16cyr8ilpx1nn.js","/_next/static/chunks/0vuvql8rloda5.js","/_next/static/chunks/002-dxhags4dj.js","/_next/static/chunks/0xmmk3vebw8xs.js","/_next/static/chunks/1250wo~-5dgyx.js","/_next/static/chunks/0tyhv6.y7~yxd.js","/_next/static/chunks/0tgbcgsca9mrg.js","/_next/static/chunks/0rnt-f3pjxb-d.js","/_next/static/chunks/0yo22_w53mo~5.js","/_next/static/chunks/07nbyndvzftr1.js","/_next/static/chunks/0qf163pbrwy4z.js","/_next/static/chunks/02shswpmybici.js"],"default"]
|
|
10
|
+
a:I[698679,["/_next/static/chunks/00lca9lsasdm7.js","/_next/static/chunks/05tx6hzdtkgi9.js","/_next/static/chunks/0gig.k.rq8d0x.js","/_next/static/chunks/12c0jp0qvlr1t.js","/_next/static/chunks/16cyr8ilpx1nn.js","/_next/static/chunks/0vuvql8rloda5.js","/_next/static/chunks/002-dxhags4dj.js","/_next/static/chunks/0xmmk3vebw8xs.js","/_next/static/chunks/1250wo~-5dgyx.js","/_next/static/chunks/0tyhv6.y7~yxd.js","/_next/static/chunks/0tgbcgsca9mrg.js","/_next/static/chunks/0rnt-f3pjxb-d.js","/_next/static/chunks/0yo22_w53mo~5.js","/_next/static/chunks/07nbyndvzftr1.js","/_next/static/chunks/0qf163pbrwy4z.js","/_next/static/chunks/02shswpmybici.js"],"CommandPalette"]
|
|
11
|
+
b:I[360112,["/_next/static/chunks/00lca9lsasdm7.js","/_next/static/chunks/05tx6hzdtkgi9.js","/_next/static/chunks/0gig.k.rq8d0x.js","/_next/static/chunks/12c0jp0qvlr1t.js","/_next/static/chunks/16cyr8ilpx1nn.js","/_next/static/chunks/0vuvql8rloda5.js","/_next/static/chunks/002-dxhags4dj.js","/_next/static/chunks/0xmmk3vebw8xs.js","/_next/static/chunks/1250wo~-5dgyx.js","/_next/static/chunks/0tyhv6.y7~yxd.js","/_next/static/chunks/0tgbcgsca9mrg.js","/_next/static/chunks/0rnt-f3pjxb-d.js","/_next/static/chunks/0yo22_w53mo~5.js","/_next/static/chunks/07nbyndvzftr1.js","/_next/static/chunks/0qf163pbrwy4z.js","/_next/static/chunks/02shswpmybici.js"],"Toaster"]
|
|
12
|
+
c:I[984642,["/_next/static/chunks/00lca9lsasdm7.js","/_next/static/chunks/05tx6hzdtkgi9.js","/_next/static/chunks/0gig.k.rq8d0x.js","/_next/static/chunks/12c0jp0qvlr1t.js","/_next/static/chunks/16cyr8ilpx1nn.js","/_next/static/chunks/0vuvql8rloda5.js","/_next/static/chunks/002-dxhags4dj.js","/_next/static/chunks/0xmmk3vebw8xs.js","/_next/static/chunks/1250wo~-5dgyx.js","/_next/static/chunks/0tyhv6.y7~yxd.js","/_next/static/chunks/0tgbcgsca9mrg.js","/_next/static/chunks/0rnt-f3pjxb-d.js","/_next/static/chunks/0yo22_w53mo~5.js","/_next/static/chunks/07nbyndvzftr1.js","/_next/static/chunks/0qf163pbrwy4z.js","/_next/static/chunks/02shswpmybici.js"],"ConsolePanel"]
|
|
13
|
+
d:I[487786,["/_next/static/chunks/00lca9lsasdm7.js","/_next/static/chunks/05tx6hzdtkgi9.js","/_next/static/chunks/0gig.k.rq8d0x.js","/_next/static/chunks/12c0jp0qvlr1t.js","/_next/static/chunks/16cyr8ilpx1nn.js","/_next/static/chunks/0vuvql8rloda5.js","/_next/static/chunks/002-dxhags4dj.js","/_next/static/chunks/0xmmk3vebw8xs.js","/_next/static/chunks/1250wo~-5dgyx.js","/_next/static/chunks/0tyhv6.y7~yxd.js","/_next/static/chunks/0tgbcgsca9mrg.js","/_next/static/chunks/0rnt-f3pjxb-d.js","/_next/static/chunks/0yo22_w53mo~5.js","/_next/static/chunks/07nbyndvzftr1.js","/_next/static/chunks/0qf163pbrwy4z.js","/_next/static/chunks/02shswpmybici.js"],"ClientPageRoot"]
|
|
14
|
+
e:I[259295,["/_next/static/chunks/00lca9lsasdm7.js","/_next/static/chunks/05tx6hzdtkgi9.js","/_next/static/chunks/0gig.k.rq8d0x.js","/_next/static/chunks/12c0jp0qvlr1t.js","/_next/static/chunks/16cyr8ilpx1nn.js","/_next/static/chunks/0vuvql8rloda5.js","/_next/static/chunks/002-dxhags4dj.js","/_next/static/chunks/0xmmk3vebw8xs.js","/_next/static/chunks/1250wo~-5dgyx.js","/_next/static/chunks/0tyhv6.y7~yxd.js","/_next/static/chunks/0tgbcgsca9mrg.js","/_next/static/chunks/0rnt-f3pjxb-d.js","/_next/static/chunks/0yo22_w53mo~5.js","/_next/static/chunks/07nbyndvzftr1.js","/_next/static/chunks/0qf163pbrwy4z.js","/_next/static/chunks/02shswpmybici.js","/_next/static/chunks/08kfx8on9oty~.js"],"default"]
|
|
15
|
+
11:I[990774,["/_next/static/chunks/00lca9lsasdm7.js","/_next/static/chunks/05tx6hzdtkgi9.js","/_next/static/chunks/0gig.k.rq8d0x.js","/_next/static/chunks/12c0jp0qvlr1t.js","/_next/static/chunks/16cyr8ilpx1nn.js","/_next/static/chunks/0vuvql8rloda5.js","/_next/static/chunks/002-dxhags4dj.js","/_next/static/chunks/0xmmk3vebw8xs.js","/_next/static/chunks/1250wo~-5dgyx.js","/_next/static/chunks/0tyhv6.y7~yxd.js","/_next/static/chunks/0tgbcgsca9mrg.js","/_next/static/chunks/0rnt-f3pjxb-d.js","/_next/static/chunks/0yo22_w53mo~5.js","/_next/static/chunks/07nbyndvzftr1.js","/_next/static/chunks/0qf163pbrwy4z.js","/_next/static/chunks/02shswpmybici.js"],"OutletBoundary"]
|
|
16
16
|
12:"$Sreact.suspense"
|
|
17
|
-
|
|
18
|
-
17:I[990774,["/_next/static/chunks/0x4b-a2ixww6m.js","/_next/static/chunks/0-1pn22sg~67u.js","/_next/static/chunks/0gig.k.rq8d0x.js","/_next/static/chunks/0w3o.7vi.dlm6.js","/_next/static/chunks/0mny8i81aenx3.js","/_next/static/chunks/002-dxhags4dj.js","/_next/static/chunks/1285yqy_oirb-.js","/_next/static/chunks/125nunjfj2fj0.js","/_next/static/chunks/0nsu~f3voe~0i.js","/_next/static/chunks/05eu2fdixf7c9.js","/_next/static/chunks/0cs830n97dgjy.js","/_next/static/chunks/0_g3irbniww6d.js","/_next/static/chunks/1250wo~-5dgyx.js","/_next/static/chunks/0sz8_nijfiz0p.js","/_next/static/chunks/03me5_ir..2ix.js"],"MetadataBoundary"]
|
|
19
|
-
1a:I[785502,["/_next/static/chunks/0x4b-a2ixww6m.js","/_next/static/chunks/0-1pn22sg~67u.js","/_next/static/chunks/0gig.k.rq8d0x.js","/_next/static/chunks/0w3o.7vi.dlm6.js","/_next/static/chunks/0mny8i81aenx3.js","/_next/static/chunks/002-dxhags4dj.js","/_next/static/chunks/1285yqy_oirb-.js","/_next/static/chunks/125nunjfj2fj0.js","/_next/static/chunks/0nsu~f3voe~0i.js","/_next/static/chunks/05eu2fdixf7c9.js","/_next/static/chunks/0cs830n97dgjy.js","/_next/static/chunks/0_g3irbniww6d.js","/_next/static/chunks/1250wo~-5dgyx.js","/_next/static/chunks/0sz8_nijfiz0p.js","/_next/static/chunks/03me5_ir..2ix.js"],"default",1]
|
|
17
|
+
19:I[785502,["/_next/static/chunks/00lca9lsasdm7.js","/_next/static/chunks/05tx6hzdtkgi9.js","/_next/static/chunks/0gig.k.rq8d0x.js","/_next/static/chunks/12c0jp0qvlr1t.js","/_next/static/chunks/16cyr8ilpx1nn.js","/_next/static/chunks/0vuvql8rloda5.js","/_next/static/chunks/002-dxhags4dj.js","/_next/static/chunks/0xmmk3vebw8xs.js","/_next/static/chunks/1250wo~-5dgyx.js","/_next/static/chunks/0tyhv6.y7~yxd.js","/_next/static/chunks/0tgbcgsca9mrg.js","/_next/static/chunks/0rnt-f3pjxb-d.js","/_next/static/chunks/0yo22_w53mo~5.js","/_next/static/chunks/07nbyndvzftr1.js","/_next/static/chunks/0qf163pbrwy4z.js","/_next/static/chunks/02shswpmybici.js"],"default",1]
|
|
20
18
|
:HL["/_next/static/chunks/0-oog4zg4_m~m.css","style"]
|
|
21
|
-
:HL["/_next/static/chunks/
|
|
19
|
+
:HL["/_next/static/chunks/0i51q.5s_-.vh.css","style"]
|
|
22
20
|
:HL["/_next/static/media/1b99372b3eaef0c8-s.p.0gx2haw2tmll8.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
|
|
23
21
|
:HL["/_next/static/media/5c285b27cdda1fe8-s.p.0yo6-5yoeeudq.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
|
|
24
22
|
:HL["/_next/static/media/8e6fa89aa22d24ec-s.p.0uvzar8hswo3p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
|
|
25
23
|
:HL["/_next/static/media/a218039a3287bcfd-s.p.17-1enzs_j91b.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
|
|
26
24
|
:HL["/_next/static/media/e2334d715941921e-s.p.12skym0rqknxy.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
|
|
27
|
-
0:{"P":null,"c":["","workspaces"],"q":"","i":false,"f":[[["",{"children":["workspaces",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0-oog4zg4_m~m.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/chunks/
|
|
28
|
-
1d:[]
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
0:{"P":null,"c":["","workspaces"],"q":"","i":false,"f":[[["",{"children":["workspaces",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0-oog4zg4_m~m.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/chunks/0i51q.5s_-.vh.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/00lca9lsasdm7.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/_next/static/chunks/05tx6hzdtkgi9.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/_next/static/chunks/0gig.k.rq8d0x.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/_next/static/chunks/12c0jp0qvlr1t.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/_next/static/chunks/16cyr8ilpx1nn.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/_next/static/chunks/0vuvql8rloda5.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/_next/static/chunks/002-dxhags4dj.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/_next/static/chunks/0xmmk3vebw8xs.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/_next/static/chunks/1250wo~-5dgyx.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/_next/static/chunks/0tyhv6.y7~yxd.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/_next/static/chunks/0tgbcgsca9mrg.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/_next/static/chunks/0rnt-f3pjxb-d.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/_next/static/chunks/0yo22_w53mo~5.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/_next/static/chunks/07nbyndvzftr1.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/_next/static/chunks/0qf163pbrwy4z.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/_next/static/chunks/02shswpmybici.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"","className":"dm_sans_81a33cc5-module___RQdfW__variable outfit_8334a424-module__TwcMYa__variable poppins_37c4598a-module__JRG3Wq__variable h-[var(--app-content-height)] overflow-hidden antialiased","suppressHydrationWarning":true,"children":["$","body",null,{"className":"h-[var(--app-content-height)] overflow-hidden font-sans","children":["$","$L2",null,{"children":["$","$L3",null,{"attribute":"class","defaultTheme":"system","enableSystem":true,"disableTransitionOnChange":true,"children":["$","$L4",null,{"children":[["$","$L5",null,{}],["$","$L6",null,{"children":[["$","$L7",null,{"children":["$","$L8",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L9",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}],["$","$La",null,{}],["$","$Lb",null,{"richColors":true,"position":"bottom-right"}]]}],["$","$Lc",null,{}]]}]}]}]}]}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L8",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L9",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[["$","$Ld",null,{"Component":"$e","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@f","$@10"]}}],[["$","script","script-0",{"src":"/_next/static/chunks/08kfx8on9oty~.js","async":true,"nonce":"$undefined"}]],["$","$L11",null,{"children":["$","$12",null,{"name":"Next.MetadataOutlet","children":"$@13"}]}]]}],{},null,false,null]},null,false,"$@14"]},null,false,null],["$","$1","h",{"children":["$L15","$L16","$L17","$L18"]}],false]],"m":"$undefined","G":["$19",["$L1a","$L1b"]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"GS3b40oeaeLxm7i9-ibaj"}
|
|
26
|
+
1d:I[990774,["/_next/static/chunks/00lca9lsasdm7.js","/_next/static/chunks/05tx6hzdtkgi9.js","/_next/static/chunks/0gig.k.rq8d0x.js","/_next/static/chunks/12c0jp0qvlr1t.js","/_next/static/chunks/16cyr8ilpx1nn.js","/_next/static/chunks/0vuvql8rloda5.js","/_next/static/chunks/002-dxhags4dj.js","/_next/static/chunks/0xmmk3vebw8xs.js","/_next/static/chunks/1250wo~-5dgyx.js","/_next/static/chunks/0tyhv6.y7~yxd.js","/_next/static/chunks/0tgbcgsca9mrg.js","/_next/static/chunks/0rnt-f3pjxb-d.js","/_next/static/chunks/0yo22_w53mo~5.js","/_next/static/chunks/07nbyndvzftr1.js","/_next/static/chunks/0qf163pbrwy4z.js","/_next/static/chunks/02shswpmybici.js"],"ViewportBoundary"]
|
|
27
|
+
1f:I[990774,["/_next/static/chunks/00lca9lsasdm7.js","/_next/static/chunks/05tx6hzdtkgi9.js","/_next/static/chunks/0gig.k.rq8d0x.js","/_next/static/chunks/12c0jp0qvlr1t.js","/_next/static/chunks/16cyr8ilpx1nn.js","/_next/static/chunks/0vuvql8rloda5.js","/_next/static/chunks/002-dxhags4dj.js","/_next/static/chunks/0xmmk3vebw8xs.js","/_next/static/chunks/1250wo~-5dgyx.js","/_next/static/chunks/0tyhv6.y7~yxd.js","/_next/static/chunks/0tgbcgsca9mrg.js","/_next/static/chunks/0rnt-f3pjxb-d.js","/_next/static/chunks/0yo22_w53mo~5.js","/_next/static/chunks/07nbyndvzftr1.js","/_next/static/chunks/0qf163pbrwy4z.js","/_next/static/chunks/02shswpmybici.js"],"MetadataBoundary"]
|
|
28
|
+
1c:[]
|
|
29
|
+
14:"$W1c"
|
|
30
|
+
15:null
|
|
31
|
+
16:["$","$L1d",null,{"children":"$L1e"}]
|
|
32
|
+
17:["$","div",null,{"hidden":true,"children":["$","$L1f",null,{"children":["$","$12",null,{"name":"Next.Metadata","children":"$L20"}]}]}]
|
|
33
|
+
18:["$","meta",null,{"name":"next-size-adjust","content":""}]
|
|
34
|
+
1a:["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0-oog4zg4_m~m.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]
|
|
35
|
+
1b:["$","link","1",{"rel":"stylesheet","href":"/_next/static/chunks/0i51q.5s_-.vh.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]
|
|
33
36
|
f:{}
|
|
34
37
|
10:"$0:f:0:1:1:children:1:children:0:props:children:0:props:serverProvidedParams:params"
|
|
35
|
-
|
|
36
|
-
|
|
38
|
+
1e:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, viewport-fit=cover"}]]
|
|
39
|
+
21:I[946513,["/_next/static/chunks/00lca9lsasdm7.js","/_next/static/chunks/05tx6hzdtkgi9.js","/_next/static/chunks/0gig.k.rq8d0x.js","/_next/static/chunks/12c0jp0qvlr1t.js","/_next/static/chunks/16cyr8ilpx1nn.js","/_next/static/chunks/0vuvql8rloda5.js","/_next/static/chunks/002-dxhags4dj.js","/_next/static/chunks/0xmmk3vebw8xs.js","/_next/static/chunks/1250wo~-5dgyx.js","/_next/static/chunks/0tyhv6.y7~yxd.js","/_next/static/chunks/0tgbcgsca9mrg.js","/_next/static/chunks/0rnt-f3pjxb-d.js","/_next/static/chunks/0yo22_w53mo~5.js","/_next/static/chunks/07nbyndvzftr1.js","/_next/static/chunks/0qf163pbrwy4z.js","/_next/static/chunks/02shswpmybici.js"],"IconMark"]
|
|
37
40
|
13:null
|
|
38
|
-
|
|
41
|
+
20:[["$","title","0",{"children":"Agent Spaces"}],["$","meta","1",{"name":"description","content":"Multi-agent collaborative coding workspace"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.0~ekuj.zhggpa.ico","sizes":"32x32","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"/favicon.ico"}],["$","link","4",{"rel":"apple-touch-icon","href":"/apple-touch-icon.png"}],["$","$L21","5",{}]]
|
package/dist/ws/agent-runner.js
CHANGED
|
@@ -10,6 +10,7 @@ import { createAgentRuntime } from '../adapters/agent-runtime.js';
|
|
|
10
10
|
import { saveToolDetails } from '../services/tool-detail.js';
|
|
11
11
|
import { getThinkingRuntimeConfig } from '../services/llm-model-config.js';
|
|
12
12
|
import { buildAgentMessageParts, normalizeOutputLines, mergeRuntimeOutput, buildToolDetailId, summarizeToolLine, findToolDetailForResult } from './message-parts.js';
|
|
13
|
+
import { buildPersistentAgentContextDetails } from '../services/persistent-agent-context.js';
|
|
13
14
|
import { buildAgentPrompt, buildBuiltInTools } from './agent-prompt.js';
|
|
14
15
|
// --- State ---
|
|
15
16
|
const activeSchedulers = new Set();
|
|
@@ -127,21 +128,30 @@ export function handleAnswerQuestion(_ws, workspaceId, data) {
|
|
|
127
128
|
`Answer: ${trimmed}`,
|
|
128
129
|
'Continue from this answer and complete the original task.',
|
|
129
130
|
].join('\n'), {
|
|
131
|
+
agentSessionId: message.metadata?.agentSessionId,
|
|
130
132
|
messageId,
|
|
131
133
|
seedOutput: normalizeOutputLines([message.content]),
|
|
132
134
|
seedQuestions: seedQuestion ? [seedQuestion] : [],
|
|
135
|
+
resumeSessionId: message.metadata?.runtimeSessionId,
|
|
133
136
|
});
|
|
134
137
|
}
|
|
135
138
|
export async function runMentionedAgent(workspaceId, channelId, agentConfigId, prompt, options = {}) {
|
|
136
139
|
const preset = agentService.listPresets(workspaceId)?.find((agent) => agent.id === agentConfigId);
|
|
137
140
|
if (!preset || preset.enabled === false)
|
|
138
141
|
return;
|
|
139
|
-
const session =
|
|
140
|
-
|
|
141
|
-
|
|
142
|
+
const session = options.agentSessionId
|
|
143
|
+
? agentService.getById(workspaceId, options.agentSessionId)
|
|
144
|
+
: null;
|
|
145
|
+
const nextSession = session ?? agentService.create(workspaceId, preset.role, preset.id);
|
|
146
|
+
const sessionChanged = !session;
|
|
147
|
+
const previousStatus = nextSession.status;
|
|
148
|
+
if (!sessionChanged) {
|
|
149
|
+
broadcastToWorkspace(workspaceId, 'agent.started', nextSession);
|
|
150
|
+
}
|
|
151
|
+
agentService.updateStatus(workspaceId, nextSession.id, 'active');
|
|
142
152
|
broadcastToWorkspace(workspaceId, 'agent.status_changed', {
|
|
143
|
-
agentId:
|
|
144
|
-
from:
|
|
153
|
+
agentId: nextSession.id,
|
|
154
|
+
from: previousStatus,
|
|
145
155
|
to: 'active',
|
|
146
156
|
});
|
|
147
157
|
const configDir = agentService.getAgentConfigDir(workspaceId, preset);
|
|
@@ -174,7 +184,7 @@ export async function runMentionedAgent(workspaceId, channelId, agentConfigId, p
|
|
|
174
184
|
status: 'streaming',
|
|
175
185
|
metadata: {
|
|
176
186
|
...existingMessage.metadata,
|
|
177
|
-
agentSessionId:
|
|
187
|
+
agentSessionId: nextSession.id,
|
|
178
188
|
runtimeSessionId: options.resumeSessionId ?? existingMessage.metadata?.runtimeSessionId,
|
|
179
189
|
runtime: preset.runtimeKind,
|
|
180
190
|
model: preset.modelId,
|
|
@@ -188,14 +198,14 @@ export async function runMentionedAgent(workspaceId, channelId, agentConfigId, p
|
|
|
188
198
|
type: 'text',
|
|
189
199
|
status: 'streaming',
|
|
190
200
|
metadata: {
|
|
191
|
-
agentSessionId:
|
|
201
|
+
agentSessionId: nextSession.id,
|
|
192
202
|
runtime: preset.runtimeKind,
|
|
193
203
|
model: preset.modelId,
|
|
194
204
|
duration: 0,
|
|
195
205
|
},
|
|
196
206
|
parts: [
|
|
197
207
|
{
|
|
198
|
-
id: `reasoning-${
|
|
208
|
+
id: `reasoning-${nextSession.id}`,
|
|
199
209
|
type: 'reasoning',
|
|
200
210
|
text: 'Preparing agent runtime and loading conversation context...',
|
|
201
211
|
status: 'streaming',
|
|
@@ -207,6 +217,12 @@ export async function runMentionedAgent(workspaceId, channelId, agentConfigId, p
|
|
|
207
217
|
const liveReasoning = [];
|
|
208
218
|
let agentPrompt = '';
|
|
209
219
|
let runtimeSessionId = options.resumeSessionId ?? existingMessage?.metadata?.runtimeSessionId;
|
|
220
|
+
const persistentContext = buildPersistentAgentContextDetails({
|
|
221
|
+
workspaceId,
|
|
222
|
+
workingDir: workspace?.boundDirs?.[0] || workingDir,
|
|
223
|
+
boundDirs: workspace?.boundDirs,
|
|
224
|
+
excludeNativeClaudeMd: preset.runtimeKind === 'claude-code',
|
|
225
|
+
}).summary;
|
|
210
226
|
try {
|
|
211
227
|
const runtime = createAgentRuntime({
|
|
212
228
|
kind: preset.runtimeKind,
|
|
@@ -218,7 +234,7 @@ export async function runMentionedAgent(workspaceId, channelId, agentConfigId, p
|
|
|
218
234
|
...getThinkingRuntimeConfig(preset),
|
|
219
235
|
});
|
|
220
236
|
activeRun = {
|
|
221
|
-
agentId:
|
|
237
|
+
agentId: nextSession.id,
|
|
222
238
|
agentConfigId,
|
|
223
239
|
messageId: pending.id,
|
|
224
240
|
runtime,
|
|
@@ -253,7 +269,7 @@ export async function runMentionedAgent(workspaceId, channelId, agentConfigId, p
|
|
|
253
269
|
return;
|
|
254
270
|
lastLiveUpdate = now;
|
|
255
271
|
const parts = buildAgentMessageParts({
|
|
256
|
-
sessionId:
|
|
272
|
+
sessionId: nextSession.id,
|
|
257
273
|
workspaceRoot: workspace?.boundDirs?.[0],
|
|
258
274
|
presetName: preset.name || preset.role,
|
|
259
275
|
role: preset.role,
|
|
@@ -263,6 +279,7 @@ export async function runMentionedAgent(workspaceId, channelId, agentConfigId, p
|
|
|
263
279
|
systemPrompt: preset.systemPrompt,
|
|
264
280
|
userPrompt: prompt,
|
|
265
281
|
fullPrompt: agentPrompt,
|
|
282
|
+
persistentContext,
|
|
266
283
|
mcpServers: runtimePromptConfig.mcpServers,
|
|
267
284
|
skills: runtimePromptConfig.skills,
|
|
268
285
|
builtInTools: runtimePromptConfig.builtInTools,
|
|
@@ -273,7 +290,7 @@ export async function runMentionedAgent(workspaceId, channelId, agentConfigId, p
|
|
|
273
290
|
askUserQuestions,
|
|
274
291
|
success: true,
|
|
275
292
|
});
|
|
276
|
-
const displayParts = buildContinuationParts(existingMessage?.parts,
|
|
293
|
+
const displayParts = buildContinuationParts(existingMessage?.parts, nextSession.id, options.appendUserMessage, parts);
|
|
277
294
|
if (displayParts.length === 0)
|
|
278
295
|
return;
|
|
279
296
|
const status = askUserQuestions.some((question) => !question.answer) ? 'waiting_for_user' : 'streaming';
|
|
@@ -316,7 +333,7 @@ export async function runMentionedAgent(workspaceId, channelId, agentConfigId, p
|
|
|
316
333
|
}
|
|
317
334
|
if (event.type === 'reasoning') {
|
|
318
335
|
liveReasoning.push({ text: event.text, status: event.status });
|
|
319
|
-
broadcastToWorkspace(workspaceId, 'agent.output', { agentId:
|
|
336
|
+
broadcastToWorkspace(workspaceId, 'agent.output', { agentId: nextSession.id, data: event.text });
|
|
320
337
|
broadcastLiveParts();
|
|
321
338
|
return;
|
|
322
339
|
}
|
|
@@ -369,7 +386,7 @@ export async function runMentionedAgent(workspaceId, channelId, agentConfigId, p
|
|
|
369
386
|
toolName: event.name,
|
|
370
387
|
text: event.line,
|
|
371
388
|
}));
|
|
372
|
-
broadcastToWorkspace(workspaceId, 'agent.output', { agentId:
|
|
389
|
+
broadcastToWorkspace(workspaceId, 'agent.output', { agentId: nextSession.id, data: event.line });
|
|
373
390
|
broadcastLiveParts();
|
|
374
391
|
return;
|
|
375
392
|
}
|
|
@@ -412,7 +429,7 @@ export async function runMentionedAgent(workspaceId, channelId, agentConfigId, p
|
|
|
412
429
|
type: 'output',
|
|
413
430
|
text: event.line,
|
|
414
431
|
}));
|
|
415
|
-
broadcastToWorkspace(workspaceId, 'agent.output', { agentId:
|
|
432
|
+
broadcastToWorkspace(workspaceId, 'agent.output', { agentId: nextSession.id, data: event.line });
|
|
416
433
|
broadcastLiveParts();
|
|
417
434
|
},
|
|
418
435
|
});
|
|
@@ -422,8 +439,8 @@ export async function runMentionedAgent(workspaceId, channelId, agentConfigId, p
|
|
|
422
439
|
const displayOutput = mergeRuntimeOutput(liveOutput, result.output);
|
|
423
440
|
if (shouldWaitForUserAnswer(askUserQuestions, result.summary, result.error, displayOutput)) {
|
|
424
441
|
const waitingOutput = stripAskUserQuestionErrorLines(liveOutput);
|
|
425
|
-
const waitingParts = buildContinuationParts(existingMessage?.parts,
|
|
426
|
-
sessionId:
|
|
442
|
+
const waitingParts = buildContinuationParts(existingMessage?.parts, nextSession.id, options.appendUserMessage, buildAgentMessageParts({
|
|
443
|
+
sessionId: nextSession.id,
|
|
427
444
|
workspaceRoot: workspace?.boundDirs?.[0],
|
|
428
445
|
presetName: preset.name || preset.role,
|
|
429
446
|
role: preset.role,
|
|
@@ -433,6 +450,7 @@ export async function runMentionedAgent(workspaceId, channelId, agentConfigId, p
|
|
|
433
450
|
systemPrompt: preset.systemPrompt,
|
|
434
451
|
userPrompt: prompt,
|
|
435
452
|
fullPrompt: agentPrompt,
|
|
453
|
+
persistentContext,
|
|
436
454
|
mcpServers: runtimePromptConfig.mcpServers,
|
|
437
455
|
skills: runtimePromptConfig.skills,
|
|
438
456
|
output: waitingOutput,
|
|
@@ -447,7 +465,7 @@ export async function runMentionedAgent(workspaceId, channelId, agentConfigId, p
|
|
|
447
465
|
type: 'text',
|
|
448
466
|
status: 'waiting_for_user',
|
|
449
467
|
metadata: {
|
|
450
|
-
agentSessionId:
|
|
468
|
+
agentSessionId: nextSession.id,
|
|
451
469
|
runtimeSessionId: result.sessionId ?? runtimeSessionId,
|
|
452
470
|
runtime: preset.runtimeKind,
|
|
453
471
|
model: preset.modelId,
|
|
@@ -458,9 +476,9 @@ export async function runMentionedAgent(workspaceId, channelId, agentConfigId, p
|
|
|
458
476
|
});
|
|
459
477
|
if (waiting)
|
|
460
478
|
broadcastToWorkspace(workspaceId, 'channel.message.updated', waiting);
|
|
461
|
-
agentService.updateStatus(workspaceId,
|
|
479
|
+
agentService.updateStatus(workspaceId, nextSession.id, 'blocked');
|
|
462
480
|
broadcastToWorkspace(workspaceId, 'agent.status_changed', {
|
|
463
|
-
agentId:
|
|
481
|
+
agentId: nextSession.id,
|
|
464
482
|
from: 'active',
|
|
465
483
|
to: 'blocked',
|
|
466
484
|
});
|
|
@@ -468,10 +486,10 @@ export async function runMentionedAgent(workspaceId, channelId, agentConfigId, p
|
|
|
468
486
|
}
|
|
469
487
|
if (liveOutput.length === 0) {
|
|
470
488
|
for (const line of result.output) {
|
|
471
|
-
broadcastToWorkspace(workspaceId, 'agent.output', { agentId:
|
|
489
|
+
broadcastToWorkspace(workspaceId, 'agent.output', { agentId: nextSession.id, data: line });
|
|
472
490
|
}
|
|
473
491
|
}
|
|
474
|
-
agentService.complete(workspaceId,
|
|
492
|
+
agentService.complete(workspaceId, nextSession.id, result.success ? undefined : result.error, {
|
|
475
493
|
runtime: preset.runtimeKind,
|
|
476
494
|
model: preset.modelId,
|
|
477
495
|
summary: result.summary,
|
|
@@ -481,7 +499,7 @@ export async function runMentionedAgent(workspaceId, channelId, agentConfigId, p
|
|
|
481
499
|
costUsd: result.costUsd,
|
|
482
500
|
});
|
|
483
501
|
broadcastToWorkspace(workspaceId, 'agent.completed', {
|
|
484
|
-
agentId:
|
|
502
|
+
agentId: nextSession.id,
|
|
485
503
|
channelId,
|
|
486
504
|
result: {
|
|
487
505
|
success: result.success,
|
|
@@ -491,8 +509,8 @@ export async function runMentionedAgent(workspaceId, channelId, agentConfigId, p
|
|
|
491
509
|
},
|
|
492
510
|
error: result.error,
|
|
493
511
|
});
|
|
494
|
-
const replyParts = buildContinuationParts(existingMessage?.parts,
|
|
495
|
-
sessionId:
|
|
512
|
+
const replyParts = buildContinuationParts(existingMessage?.parts, nextSession.id, options.appendUserMessage, buildAgentMessageParts({
|
|
513
|
+
sessionId: nextSession.id,
|
|
496
514
|
workspaceRoot: workspace?.boundDirs?.[0],
|
|
497
515
|
presetName: preset.name || preset.role,
|
|
498
516
|
role: preset.role,
|
|
@@ -503,6 +521,7 @@ export async function runMentionedAgent(workspaceId, channelId, agentConfigId, p
|
|
|
503
521
|
systemPrompt: preset.systemPrompt,
|
|
504
522
|
userPrompt: prompt,
|
|
505
523
|
fullPrompt: agentPrompt,
|
|
524
|
+
persistentContext,
|
|
506
525
|
mcpServers: runtimePromptConfig.mcpServers,
|
|
507
526
|
skills: runtimePromptConfig.skills,
|
|
508
527
|
builtInTools: runtimePromptConfig.builtInTools,
|
|
@@ -523,7 +542,7 @@ export async function runMentionedAgent(workspaceId, channelId, agentConfigId, p
|
|
|
523
542
|
type: 'text',
|
|
524
543
|
status: result.success ? 'completed' : 'error',
|
|
525
544
|
metadata: {
|
|
526
|
-
agentSessionId:
|
|
545
|
+
agentSessionId: nextSession.id,
|
|
527
546
|
runtimeSessionId: result.sessionId ?? runtimeSessionId,
|
|
528
547
|
runtime: preset.runtimeKind,
|
|
529
548
|
model: preset.modelId,
|
|
@@ -539,16 +558,16 @@ export async function runMentionedAgent(workspaceId, channelId, agentConfigId, p
|
|
|
539
558
|
if (activeRun?.stopped)
|
|
540
559
|
return;
|
|
541
560
|
const error = err instanceof Error ? err.message : String(err);
|
|
542
|
-
agentService.complete(workspaceId,
|
|
561
|
+
agentService.complete(workspaceId, nextSession.id, error, {
|
|
543
562
|
runtime: preset.runtimeKind,
|
|
544
563
|
model: preset.modelId,
|
|
545
564
|
summary: error,
|
|
546
565
|
output: [error],
|
|
547
566
|
durationMs: Date.now() - startTime,
|
|
548
567
|
});
|
|
549
|
-
broadcastToWorkspace(workspaceId, 'agent.error', { agentId:
|
|
550
|
-
const errorParts = buildContinuationParts(existingMessage?.parts,
|
|
551
|
-
sessionId:
|
|
568
|
+
broadcastToWorkspace(workspaceId, 'agent.error', { agentId: nextSession.id, error });
|
|
569
|
+
const errorParts = buildContinuationParts(existingMessage?.parts, nextSession.id, options.appendUserMessage, buildAgentMessageParts({
|
|
570
|
+
sessionId: nextSession.id,
|
|
552
571
|
workspaceRoot: workspace?.boundDirs?.[0],
|
|
553
572
|
presetName: preset.name || preset.role,
|
|
554
573
|
role: preset.role,
|
|
@@ -558,6 +577,7 @@ export async function runMentionedAgent(workspaceId, channelId, agentConfigId, p
|
|
|
558
577
|
systemPrompt: preset.systemPrompt,
|
|
559
578
|
userPrompt: prompt,
|
|
560
579
|
fullPrompt: agentPrompt,
|
|
580
|
+
persistentContext,
|
|
561
581
|
mcpServers: runtimePromptConfig.mcpServers,
|
|
562
582
|
skills: runtimePromptConfig.skills,
|
|
563
583
|
builtInTools: runtimePromptConfig.builtInTools,
|
|
@@ -578,7 +598,7 @@ export async function runMentionedAgent(workspaceId, channelId, agentConfigId, p
|
|
|
578
598
|
type: 'text',
|
|
579
599
|
status: 'error',
|
|
580
600
|
metadata: {
|
|
581
|
-
agentSessionId:
|
|
601
|
+
agentSessionId: nextSession.id,
|
|
582
602
|
runtimeSessionId,
|
|
583
603
|
runtime: preset.runtimeKind,
|
|
584
604
|
model: preset.modelId,
|
|
@@ -590,7 +610,7 @@ export async function runMentionedAgent(workspaceId, channelId, agentConfigId, p
|
|
|
590
610
|
broadcastToWorkspace(workspaceId, 'channel.message.updated', reply);
|
|
591
611
|
}
|
|
592
612
|
finally {
|
|
593
|
-
untrackChannelRun(workspaceId, channelId,
|
|
613
|
+
untrackChannelRun(workspaceId, channelId, nextSession.id);
|
|
594
614
|
}
|
|
595
615
|
}
|
|
596
616
|
// --- Internal helpers ---
|
package/dist/ws/message-parts.js
CHANGED
|
@@ -6,7 +6,7 @@ export function buildAgentMessageParts(input) {
|
|
|
6
6
|
: '';
|
|
7
7
|
const usage = input.usage ?? extractUsage(lines);
|
|
8
8
|
const parts = [];
|
|
9
|
-
const chainItems = buildChainItems(lines, finalTextRange, finalText, input.workspaceRoot, input.toolDetails);
|
|
9
|
+
const chainItems = buildChainItems(lines, finalTextRange, finalText, input.workspaceRoot, input.toolDetails, input.persistentContext, input.askUserQuestions);
|
|
10
10
|
const reasoningText = normalizeReasoningText(input.reasoning);
|
|
11
11
|
if (reasoningText) {
|
|
12
12
|
parts.push({
|
|
@@ -57,6 +57,7 @@ export function buildAgentMessageParts(input) {
|
|
|
57
57
|
fullPrompt: input.fullPrompt,
|
|
58
58
|
output: lines.join('\n'),
|
|
59
59
|
outputItems: input.outputItems,
|
|
60
|
+
persistentContext: input.persistentContext,
|
|
60
61
|
},
|
|
61
62
|
});
|
|
62
63
|
}
|
|
@@ -137,6 +138,10 @@ export function summarizeToolLine(line, workspaceRoot) {
|
|
|
137
138
|
command,
|
|
138
139
|
};
|
|
139
140
|
}
|
|
141
|
+
const skillSummary = extractSkillParams(trimmed, toolName);
|
|
142
|
+
if (skillSummary) {
|
|
143
|
+
return { ...skillSummary, toolName };
|
|
144
|
+
}
|
|
140
145
|
const searchSummary = extractSearchParams(trimmed, toolName, workspaceRoot);
|
|
141
146
|
if (searchSummary) {
|
|
142
147
|
return { ...searchSummary, toolName };
|
|
@@ -228,12 +233,21 @@ function findFinalTextRange(lines) {
|
|
|
228
233
|
}
|
|
229
234
|
return { start, end };
|
|
230
235
|
}
|
|
231
|
-
function buildChainItems(lines, finalTextRange, finalText, workspaceRoot, toolDetails) {
|
|
236
|
+
function buildChainItems(lines, finalTextRange, finalText, workspaceRoot, toolDetails, persistentContext, askUserQuestions) {
|
|
232
237
|
let toolIndex = 0;
|
|
233
238
|
let messageIndex = 0;
|
|
234
239
|
const items = [];
|
|
235
240
|
const toolDetailMatchCounts = new Map();
|
|
236
241
|
let messageBuffer = [];
|
|
242
|
+
const persistentContextItem = buildPersistentContextToolItem(persistentContext);
|
|
243
|
+
if (persistentContextItem) {
|
|
244
|
+
items.push(persistentContextItem);
|
|
245
|
+
toolIndex += 1;
|
|
246
|
+
}
|
|
247
|
+
for (const question of askUserQuestions ?? []) {
|
|
248
|
+
items.push(buildAskUserQuestionToolItem(question, toolIndex));
|
|
249
|
+
toolIndex += 1;
|
|
250
|
+
}
|
|
237
251
|
const flushMessageBuffer = () => {
|
|
238
252
|
if (messageBuffer.length === 0)
|
|
239
253
|
return;
|
|
@@ -276,6 +290,7 @@ function buildToolTodo(line, index, workspaceRoot, toolDetails, toolDetailMatchC
|
|
|
276
290
|
const detailId = findToolDetailId(line, toolDetails, toolDetailMatchCounts);
|
|
277
291
|
return {
|
|
278
292
|
id: `tool-${index}`,
|
|
293
|
+
kind: 'tool',
|
|
279
294
|
title: summary.title,
|
|
280
295
|
description: summary.description,
|
|
281
296
|
status: 'completed',
|
|
@@ -285,6 +300,38 @@ function buildToolTodo(line, index, workspaceRoot, toolDetails, toolDetailMatchC
|
|
|
285
300
|
detailId,
|
|
286
301
|
};
|
|
287
302
|
}
|
|
303
|
+
function buildPersistentContextToolItem(persistentContext) {
|
|
304
|
+
const counts = persistentContext?.counts;
|
|
305
|
+
if (!counts?.total)
|
|
306
|
+
return null;
|
|
307
|
+
const parts = [
|
|
308
|
+
counts.claudeMd ? `${counts.claudeMd} claude.md` : null,
|
|
309
|
+
counts.agentsMd ? `${counts.agentsMd} AGENTS.md` : null,
|
|
310
|
+
].filter(Boolean);
|
|
311
|
+
return {
|
|
312
|
+
id: 'tool-persistent-context',
|
|
313
|
+
kind: 'tool',
|
|
314
|
+
title: 'Load claude.md',
|
|
315
|
+
description: parts.length ? parts.join(', ') : `${counts.total} instruction files`,
|
|
316
|
+
status: 'completed',
|
|
317
|
+
toolName: 'LoadClaudeMd',
|
|
318
|
+
};
|
|
319
|
+
}
|
|
320
|
+
function buildAskUserQuestionToolItem(question, index) {
|
|
321
|
+
const choices = question.choices.length ? `选项:${question.choices.join(' / ')}` : undefined;
|
|
322
|
+
const description = question.answer
|
|
323
|
+
? [question.question, `回答:${question.answer}`].join('\n')
|
|
324
|
+
: [question.question, choices].filter(Boolean).join('\n');
|
|
325
|
+
return {
|
|
326
|
+
id: `tool-ask-user-question-${question.id || index}`,
|
|
327
|
+
kind: 'tool',
|
|
328
|
+
title: 'Ask user question',
|
|
329
|
+
description,
|
|
330
|
+
status: question.answer ? 'completed' : 'pending',
|
|
331
|
+
toolName: 'AskUserQuestion',
|
|
332
|
+
answer: question.answer,
|
|
333
|
+
};
|
|
334
|
+
}
|
|
288
335
|
function extractSearchParams(line, toolName, workspaceRoot) {
|
|
289
336
|
if (!/^(Glob|Grep|Search|SemanticSearch|WebSearch|WebFetch|Fetch)$/i.test(toolName))
|
|
290
337
|
return null;
|
|
@@ -502,6 +549,18 @@ function extractQuotedField(line, key) {
|
|
|
502
549
|
const json = line.match(new RegExp(`"${key}"\\s*:\\s*"([^"]+)"`))?.[1];
|
|
503
550
|
return json;
|
|
504
551
|
}
|
|
552
|
+
function extractSkillParams(line, toolName) {
|
|
553
|
+
if (!/^Skill$/i.test(toolName))
|
|
554
|
+
return null;
|
|
555
|
+
const skill = extractQuotedField(line, 'skill');
|
|
556
|
+
if (!skill)
|
|
557
|
+
return null;
|
|
558
|
+
const args = extractQuotedField(line, 'args');
|
|
559
|
+
return {
|
|
560
|
+
title: `Skill ${skill}`,
|
|
561
|
+
description: args ? truncate(args, 120) : undefined,
|
|
562
|
+
};
|
|
563
|
+
}
|
|
505
564
|
function extractCommand(line, toolName) {
|
|
506
565
|
if (!toolName || !/^(Bash|Shell|Command)$/i.test(toolName))
|
|
507
566
|
return undefined;
|