@agent-spaces/server 0.3.62 → 0.3.64
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/agent-runtime-types.js +12 -0
- package/dist/adapters/claude-code-runtime/index.js +3 -0
- package/dist/adapters/claude-code-runtime/message-format.js +1 -1
- package/dist/adapters/codex-runtime.js +2 -2
- package/dist/adapters/git.js +161 -57
- package/dist/adapters/langchain-runtime.js +2 -2
- package/dist/adapters/open-agent-sdk-runtime.js +2 -2
- package/dist/agents/agent-designer.js +66 -12
- package/dist/agents/commit-agent.js +1 -0
- package/dist/agents/issue-agent-progress.js +4 -2
- package/dist/agents/issue-agent-runner.js +5 -5
- package/dist/agents/issue-task-controller.js +96 -15
- package/dist/app.js +123 -5
- package/dist/package.json +1 -1
- package/dist/routes/agent-commands.js +72 -0
- package/dist/routes/agent-sse.js +10 -2
- package/dist/routes/agent.js +15 -1
- package/dist/routes/database.js +345 -0
- package/dist/routes/git.js +52 -1
- package/dist/routes/hooks.js +88 -0
- package/dist/routes/issue.js +59 -1
- package/dist/routes/kanban.js +39 -0
- package/dist/routes/output-style.js +48 -0
- package/dist/routes/prompt-template.js +2 -2
- package/dist/routes/skill.js +86 -15
- package/dist/routes/task.js +13 -1
- package/dist/services/agent-commands.js +168 -0
- package/dist/services/builtin-tools/command-tools.js +117 -0
- package/dist/services/builtin-tools/database-tools.js +578 -0
- package/dist/services/builtin-tools/index.js +5 -0
- package/dist/services/builtin-tools/input-helpers.js +26 -0
- package/dist/services/builtin-tools/issue-tools.js +209 -0
- package/dist/services/builtin-tools/kanban-tools.js +277 -0
- package/dist/services/database-vector.js +244 -0
- package/dist/services/hook-engine.js +118 -0
- package/dist/services/issue.js +6 -0
- package/dist/services/kanban.js +50 -0
- package/dist/services/notification-hub/bot-agent.js +1 -0
- package/dist/services/output-style.js +134 -0
- package/dist/services/prompt-template.js +2 -2
- package/dist/services/skill.js +148 -35
- package/dist/storage/database-store.js +365 -0
- package/dist/storage/hook-store.js +55 -0
- package/dist/storage/kanban-store.js +142 -0
- package/dist/web/404.html +1 -1
- package/dist/web/__next.__PAGE__.txt +4 -4
- package/dist/web/__next._full.txt +26 -30
- package/dist/web/__next._head.txt +4 -4
- package/dist/web/__next._index.txt +14 -14
- package/dist/web/__next._tree.txt +3 -8
- package/dist/web/_next/static/chunks/0-9194nbxy_6d.js +1 -0
- package/dist/web/_next/static/chunks/0-f~0xmwl__u5.js +1 -0
- package/dist/web/_next/static/chunks/0.n~yfwf4~6w-.js +1 -0
- package/dist/web/_next/static/chunks/002_j970b9gdx.js +1 -0
- package/dist/web/_next/static/chunks/01iqv28_snwus.js +1 -0
- package/dist/web/_next/static/chunks/01~quun6sefgl.js +1 -0
- package/dist/web/_next/static/chunks/02mf61htij8g0.js +31 -0
- package/dist/web/_next/static/chunks/03scq1-0ykve3.js +1 -0
- package/dist/web/_next/static/chunks/04a4vsq2wknm4.js +1 -0
- package/dist/web/_next/static/chunks/04dg4l4hv11q2.js +3 -0
- package/dist/web/_next/static/chunks/04fxddw-y20~-.js +7 -0
- package/dist/web/_next/static/chunks/04w7~5ooz_pwm.js +1 -0
- package/dist/web/_next/static/chunks/05oc21sj24wtq.js +1 -0
- package/dist/web/_next/static/chunks/{0zd1o3u04~qvo.js → 05psi2gtx~bev.js} +7 -7
- package/dist/web/_next/static/chunks/{0-oog4zg4_m~m.css → 062f9zqctzg.b.css} +0 -3
- package/dist/web/_next/static/chunks/{12odetnu-lyrr.js → 06whz1~s_7pva.js} +12 -12
- package/dist/web/_next/static/chunks/08ckpwmmwlors.js +3 -0
- package/dist/web/_next/static/chunks/08k~meqbd8d6v.js +1 -0
- package/dist/web/_next/static/chunks/099h96wjsdb25.js +2 -0
- package/dist/web/_next/static/chunks/09h23logvq65m.js +1 -0
- package/dist/web/_next/static/chunks/{0njy89g5coeyi.js → 0_8dm7bxp18xo.js} +6 -6
- package/dist/web/_next/static/chunks/0_mvduwjsm35w.js +1 -0
- package/dist/web/_next/static/chunks/0_vi1a~g4wx46.js +3 -0
- package/dist/web/_next/static/chunks/0a5y-vhf4i5id.js +3 -0
- package/dist/web/_next/static/chunks/0ake2f3x2uan4.js +24 -0
- package/dist/web/_next/static/chunks/{0tvd~rxgf0oh_.js → 0bbmx45w_h5np.js} +1 -1
- package/dist/web/_next/static/chunks/0ck8dw_9-1cdx.js +1 -0
- package/dist/web/_next/static/chunks/{07a0rktf_nr5h.js → 0ctg5qmw7uu.1.js} +2 -2
- package/dist/web/_next/static/chunks/0ewceguykiut5.js +1 -0
- package/dist/web/_next/static/chunks/0f7cb9li~3jra.js +67 -0
- package/dist/web/_next/static/chunks/0fttswpzu69qx.js +1 -0
- package/dist/web/_next/static/chunks/0ghs9on7wodrm.js +1 -0
- package/dist/web/_next/static/chunks/0ghx3j_.-gdyd.js +1 -0
- package/dist/web/_next/static/chunks/{0202ia13sijwb.js → 0h18ej5yf974e.js} +1 -1
- package/dist/web/_next/static/chunks/0h9cu-k6z5o08.js +1 -0
- package/dist/web/_next/static/chunks/0i39jifmxla7q.js +1 -0
- package/dist/web/_next/static/chunks/0iuf30t0rjsjv.js +19 -0
- package/dist/web/_next/static/chunks/0jb4~3qqkw2ps.js +1 -0
- package/dist/web/_next/static/chunks/0k4zdm72k_bfy.js +1 -0
- package/dist/web/_next/static/chunks/{08o-zmr-40r5g.js → 0m11vvph7q94-.js} +1 -1
- package/dist/web/_next/static/chunks/0n6_4so_afuwk.js +71 -0
- package/dist/web/_next/static/chunks/0nb8.iteznuvx.js +1 -0
- package/dist/web/_next/static/chunks/0np.d~hc1-pmh.js +4 -0
- package/dist/web/_next/static/chunks/{0qpq0~_58fe9a.js → 0oaq67r7ix.vg.js} +1 -1
- package/dist/web/_next/static/chunks/{0d_dp_4ofz0l3.css → 0ojcao3hdm36s.css} +0 -1
- package/dist/web/_next/static/chunks/0os58q93stt7j.js +3 -0
- package/dist/web/_next/static/chunks/{0gig.k.rq8d0x.js → 0ppr271hz0xoq.js} +1 -1
- package/dist/web/_next/static/chunks/0s9lmk8iauou3.js +1 -0
- package/dist/web/_next/static/chunks/0sp_zbx~w0am7.js +1 -0
- package/dist/web/_next/static/chunks/0tel~zsv4z8l_.js +1 -0
- package/dist/web/_next/static/chunks/0twamv4wr_dbv.js +1 -0
- package/dist/web/_next/static/chunks/0uhol5wafdbl~.js +1 -0
- package/dist/web/_next/static/chunks/0v3a_x4vt42kx.js +5 -0
- package/dist/web/_next/static/chunks/{002-dxhags4dj.js → 0v6hte2z-32ca.js} +2 -2
- package/dist/web/_next/static/chunks/0v7q4mys.mnm..css +1 -0
- package/dist/web/_next/static/chunks/0vbqaynjq8ga..js +3 -0
- package/dist/web/_next/static/chunks/0xbaakj0dfc0..js +1 -0
- package/dist/web/_next/static/chunks/{0..g0jl-8qup7.js → 0xoo17yef_b8g.js} +1 -1
- package/dist/web/_next/static/chunks/0xt-8wk21gs7g.js +1 -0
- package/dist/web/_next/static/chunks/0za1r07-6az6w.js +1 -0
- package/dist/web/_next/static/chunks/0z~vqzbm_q371.js +1 -0
- package/dist/web/_next/static/chunks/0~3xm80~j9ddg.js +1 -0
- package/dist/web/_next/static/chunks/0~u.5r3-t7179.js +1 -0
- package/dist/web/_next/static/chunks/10l-9myrdo3x9.js +1 -0
- package/dist/web/_next/static/chunks/11-czmcci_55y.js +1 -0
- package/dist/web/_next/static/chunks/11k-.49r~1mfm.js +1 -0
- package/dist/web/_next/static/chunks/{0k.8qdk7oi_os.js → 128ugqd34tr_-.js} +1 -1
- package/dist/web/_next/static/chunks/12jm4gwmvq-0q.js +90 -0
- package/dist/web/_next/static/chunks/{0rke_patcovgr.js → 1442stwa0gbxe.js} +1 -1
- package/dist/web/_next/static/chunks/{0jokpgh485~28.js → 14hqmid8q4apf.js} +11 -11
- package/dist/web/_next/static/chunks/14s37n6h0_q3x.js +16 -0
- package/dist/web/_next/static/chunks/161ik5kfyuwtd.js +1 -0
- package/dist/web/_next/static/chunks/16sg-lflc8csx.js +1 -0
- package/dist/web/_next/static/chunks/17k~zbv0_4rep.js +1 -0
- package/dist/web/_next/static/chunks/17oc2l.ekcs8b.css +1 -0
- package/dist/web/_next/static/chunks/{turbopack-0lrdxynxb9-1t.js → turbopack-0ndm2zc_pdptk.js} +1 -1
- package/dist/web/_not-found/__next._full.txt +30 -31
- package/dist/web/_not-found/__next._head.txt +4 -4
- package/dist/web/_not-found/__next._index.txt +14 -14
- 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 +3 -3
- package/dist/web/_not-found.html +1 -1
- package/dist/web/_not-found.txt +30 -31
- package/dist/web/index.html +1 -1
- package/dist/web/index.txt +26 -30
- package/dist/web/login/__next._full.txt +32 -36
- package/dist/web/login/__next._head.txt +4 -4
- package/dist/web/login/__next._index.txt +14 -14
- package/dist/web/login/__next._tree.txt +3 -8
- 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 +32 -36
- package/dist/web/settings/__next._full.txt +29 -34
- package/dist/web/settings/__next._head.txt +4 -4
- package/dist/web/settings/__next._index.txt +14 -14
- package/dist/web/settings/__next._tree.txt +3 -8
- 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 +27 -32
- package/dist/web/settings/agents/__next._head.txt +4 -4
- package/dist/web/settings/agents/__next._index.txt +14 -14
- package/dist/web/settings/agents/__next._tree.txt +3 -8
- 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 +27 -32
- package/dist/web/settings/mcps/__next._full.txt +27 -32
- package/dist/web/settings/mcps/__next._head.txt +4 -4
- package/dist/web/settings/mcps/__next._index.txt +14 -14
- package/dist/web/settings/mcps/__next._tree.txt +3 -8
- 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 +27 -32
- package/dist/web/settings/models/__next._full.txt +27 -32
- package/dist/web/settings/models/__next._head.txt +4 -4
- package/dist/web/settings/models/__next._index.txt +14 -14
- package/dist/web/settings/models/__next._tree.txt +3 -8
- 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 +27 -32
- package/dist/web/settings/output-styles/__next._full.txt +38 -0
- package/dist/web/settings/output-styles/__next._head.txt +6 -0
- package/dist/web/settings/output-styles/__next._index.txt +15 -0
- package/dist/web/settings/output-styles/__next._tree.txt +3 -0
- package/dist/web/settings/output-styles/__next.settings.output-styles.__PAGE__.txt +9 -0
- package/dist/web/settings/output-styles/__next.settings.output-styles.txt +5 -0
- package/dist/web/settings/output-styles/__next.settings.txt +7 -0
- package/dist/web/settings/output-styles.html +1 -0
- package/dist/web/settings/output-styles.txt +38 -0
- package/dist/web/settings/prompts/__next._full.txt +27 -32
- package/dist/web/settings/prompts/__next._head.txt +4 -4
- package/dist/web/settings/prompts/__next._index.txt +14 -14
- package/dist/web/settings/prompts/__next._tree.txt +3 -8
- 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 +27 -32
- package/dist/web/settings/providers/__next._full.txt +27 -32
- package/dist/web/settings/providers/__next._head.txt +4 -4
- package/dist/web/settings/providers/__next._index.txt +14 -14
- package/dist/web/settings/providers/__next._tree.txt +3 -8
- 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 +27 -32
- package/dist/web/settings/skills/__next._full.txt +27 -32
- package/dist/web/settings/skills/__next._head.txt +4 -4
- package/dist/web/settings/skills/__next._index.txt +14 -14
- package/dist/web/settings/skills/__next._tree.txt +3 -8
- 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 +27 -32
- package/dist/web/settings/tools/__next._full.txt +38 -0
- package/dist/web/settings/tools/__next._head.txt +6 -0
- package/dist/web/settings/tools/__next._index.txt +15 -0
- package/dist/web/settings/tools/__next._tree.txt +3 -0
- package/dist/web/settings/tools/__next.settings.tools.__PAGE__.txt +9 -0
- package/dist/web/settings/tools/__next.settings.tools.txt +5 -0
- package/dist/web/settings/tools/__next.settings.txt +7 -0
- package/dist/web/settings/tools.html +1 -0
- package/dist/web/settings/tools.txt +38 -0
- package/dist/web/settings.html +1 -1
- package/dist/web/settings.txt +29 -34
- package/dist/web/workflows/__next._full.txt +34 -37
- package/dist/web/workflows/__next._head.txt +4 -4
- package/dist/web/workflows/__next._index.txt +14 -14
- package/dist/web/workflows/__next._tree.txt +3 -8
- 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 +34 -37
- package/dist/web/workspace/_/__next._full.txt +32 -77
- package/dist/web/workspace/_/__next._head.txt +4 -4
- package/dist/web/workspace/_/__next._index.txt +14 -14
- package/dist/web/workspace/_/__next._tree.txt +4 -23
- package/dist/web/workspace/_/__next.workspace.$d$id.__PAGE__.txt +3 -18
- 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 +32 -77
- package/dist/web/workspaces/__next._full.txt +32 -38
- package/dist/web/workspaces/__next._head.txt +4 -4
- package/dist/web/workspaces/__next._index.txt +14 -14
- package/dist/web/workspaces/__next._tree.txt +3 -8
- 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 +32 -38
- package/dist/ws/agent-prompt.js +45 -8
- package/dist/ws/agent-runner.js +10 -6
- package/package.json +11 -10
- package/public/output-styles/carmack-mode.md +381 -0
- package/public/output-styles/codex-rigor-mode.md +114 -0
- package/public/output-styles/dhh-mode.md +265 -0
- package/public/output-styles/evan-you-mode.md +539 -0
- package/public/output-styles/index.json +37 -0
- package/public/output-styles/jobs-mode.md +369 -0
- package/public/output-styles/linus-mode.md +135 -0
- package/public/output-styles/uncle-bob-mode.md +221 -0
- package/public/prompt/andrej-karpathy-skills.md +65 -0
- package/public/prompt/claude-token-efficient-coding.md +35 -0
- package/public/prompt/index.json +12 -0
- package/public/skills/index.json +92 -0
- package/public/skills/planning-with-files/planning-with-files-zh/SKILL.md +243 -0
- package/public/skills/planning-with-files/planning-with-files-zh/scripts/check-complete.ps1 +44 -0
- package/public/skills/planning-with-files/planning-with-files-zh/scripts/check-complete.sh +46 -0
- package/public/skills/planning-with-files/planning-with-files-zh/scripts/init-session.ps1 +124 -0
- package/public/skills/planning-with-files/planning-with-files-zh/scripts/init-session.sh +124 -0
- package/public/skills/planning-with-files/planning-with-files-zh/scripts/session-catchup.py +438 -0
- package/public/skills/planning-with-files/planning-with-files-zh/templates/findings.md +29 -0
- package/public/skills/planning-with-files/planning-with-files-zh/templates/progress.md +40 -0
- package/public/skills/planning-with-files/planning-with-files-zh/templates/task_plan.md +58 -0
- package/public/skills/superpowers/brainstorming/SKILL.md +164 -0
- package/public/skills/superpowers/brainstorming/scripts/frame-template.html +214 -0
- package/public/skills/superpowers/brainstorming/scripts/helper.js +88 -0
- package/public/skills/superpowers/brainstorming/scripts/server.cjs +354 -0
- package/public/skills/superpowers/brainstorming/scripts/start-server.sh +148 -0
- package/public/skills/superpowers/brainstorming/scripts/stop-server.sh +56 -0
- package/public/skills/superpowers/brainstorming/spec-document-reviewer-prompt.md +49 -0
- package/public/skills/superpowers/brainstorming/visual-companion.md +287 -0
- package/public/skills/superpowers/dispatching-parallel-agents/SKILL.md +182 -0
- package/public/skills/superpowers/executing-plans/SKILL.md +70 -0
- package/public/skills/superpowers/finishing-a-development-branch/SKILL.md +251 -0
- package/public/skills/superpowers/receiving-code-review/SKILL.md +213 -0
- package/public/skills/superpowers/requesting-code-review/SKILL.md +103 -0
- package/public/skills/superpowers/requesting-code-review/code-reviewer.md +168 -0
- package/public/skills/superpowers/subagent-driven-development/SKILL.md +279 -0
- package/public/skills/superpowers/subagent-driven-development/code-quality-reviewer-prompt.md +25 -0
- package/public/skills/superpowers/subagent-driven-development/implementer-prompt.md +113 -0
- package/public/skills/superpowers/subagent-driven-development/spec-reviewer-prompt.md +61 -0
- package/public/skills/superpowers/systematic-debugging/CREATION-LOG.md +119 -0
- package/public/skills/superpowers/systematic-debugging/SKILL.md +296 -0
- package/public/skills/superpowers/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/public/skills/superpowers/systematic-debugging/condition-based-waiting.md +115 -0
- package/public/skills/superpowers/systematic-debugging/defense-in-depth.md +122 -0
- package/public/skills/superpowers/systematic-debugging/find-polluter.sh +63 -0
- package/public/skills/superpowers/systematic-debugging/root-cause-tracing.md +169 -0
- package/public/skills/superpowers/systematic-debugging/test-academic.md +14 -0
- package/public/skills/superpowers/systematic-debugging/test-pressure-1.md +58 -0
- package/public/skills/superpowers/systematic-debugging/test-pressure-2.md +68 -0
- package/public/skills/superpowers/systematic-debugging/test-pressure-3.md +69 -0
- package/public/skills/superpowers/test-driven-development/SKILL.md +371 -0
- package/public/skills/superpowers/test-driven-development/testing-anti-patterns.md +299 -0
- package/public/skills/superpowers/using-git-worktrees/SKILL.md +215 -0
- package/public/skills/superpowers/using-superpowers/SKILL.md +117 -0
- package/public/skills/superpowers/using-superpowers/references/codex-tools.md +59 -0
- package/public/skills/superpowers/using-superpowers/references/copilot-tools.md +42 -0
- package/public/skills/superpowers/using-superpowers/references/gemini-tools.md +51 -0
- package/public/skills/superpowers/verification-before-completion/SKILL.md +139 -0
- package/public/skills/superpowers/writing-plans/SKILL.md +152 -0
- package/public/skills/superpowers/writing-plans/plan-document-reviewer-prompt.md +49 -0
- package/public/skills/superpowers/writing-skills/SKILL.md +655 -0
- package/public/skills/superpowers/writing-skills/anthropic-best-practices.md +1150 -0
- package/public/skills/superpowers/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
- package/public/skills/superpowers/writing-skills/graphviz-conventions.dot +172 -0
- package/public/skills/superpowers/writing-skills/persuasion-principles.md +187 -0
- package/public/skills/superpowers/writing-skills/render-graphs.js +168 -0
- package/public/skills/superpowers/writing-skills/testing-skills-with-subagents.md +384 -0
- package/dist/web/_next/static/chunks/0-81wi7xr2nd-.js +0 -270
- package/dist/web/_next/static/chunks/00lca9lsasdm7.js +0 -1
- package/dist/web/_next/static/chunks/01gi~q0c6ez6..js +0 -1
- package/dist/web/_next/static/chunks/02shswpmybici.js +0 -1
- package/dist/web/_next/static/chunks/05tx6hzdtkgi9.js +0 -2
- package/dist/web/_next/static/chunks/07nbyndvzftr1.js +0 -3
- package/dist/web/_next/static/chunks/0bn~onkv~9xza.js +0 -1
- package/dist/web/_next/static/chunks/0g-0n6glz_z6w.js +0 -1
- package/dist/web/_next/static/chunks/0gyede80jpy3n.js +0 -4
- package/dist/web/_next/static/chunks/0hrbuvzuxrjfl.js +0 -1
- package/dist/web/_next/static/chunks/0i51q.5s_-.vh.css +0 -1
- package/dist/web/_next/static/chunks/0qf163pbrwy4z.js +0 -1
- package/dist/web/_next/static/chunks/0rnt-f3pjxb-d.js +0 -5
- package/dist/web/_next/static/chunks/0tgbcgsca9mrg.js +0 -1
- package/dist/web/_next/static/chunks/0tyhv6.y7~yxd.js +0 -1
- package/dist/web/_next/static/chunks/0u7_qd9hzqwac.js +0 -1
- package/dist/web/_next/static/chunks/0vuvql8rloda5.js +0 -1
- package/dist/web/_next/static/chunks/0wv0h27jafag4.js +0 -1
- package/dist/web/_next/static/chunks/0wwvc4zc2q6bn.js +0 -1
- package/dist/web/_next/static/chunks/0xmmk3vebw8xs.js +0 -1
- package/dist/web/_next/static/chunks/0xwqf.llmm_u2.js +0 -31
- package/dist/web/_next/static/chunks/0yo22_w53mo~5.js +0 -1
- package/dist/web/_next/static/chunks/12c0jp0qvlr1t.js +0 -1
- package/dist/web/_next/static/chunks/12pg1nn3v~~5k.js +0 -1
- package/dist/web/_next/static/chunks/16cyr8ilpx1nn.js +0 -1
- package/dist/web/_next/static/media/0a7740363b4d4863-s.1110aazvokzp..woff2 +0 -0
- package/dist/web/_next/static/media/0da9c7f357bd9d4d-s.0ek5sshv8wk3m.woff2 +0 -0
- package/dist/web/_next/static/media/1b99372b3eaef0c8-s.p.0gx2haw2tmll8.woff2 +0 -0
- package/dist/web/_next/static/media/41e95f694c5c4549-s.0r1jrq7neqdsq.woff2 +0 -0
- package/dist/web/_next/static/media/5c285b27cdda1fe8-s.p.0yo6-5yoeeudq.woff2 +0 -0
- package/dist/web/_next/static/media/5f9d24ebef5d5292-s.0esuu2f5si~v8.woff2 +0 -0
- package/dist/web/_next/static/media/6c55a692938ebbbc-s.0g6rbszwfgn9y.woff2 +0 -0
- package/dist/web/_next/static/media/8e6fa89aa22d24ec-s.p.0uvzar8hswo3p.woff2 +0 -0
- package/dist/web/_next/static/media/a218039a3287bcfd-s.p.17-1enzs_j91b.woff2 +0 -0
- package/dist/web/_next/static/media/b2ea385cb5ae8625-s.0kjod.kaq1k69.woff2 +0 -0
- package/dist/web/_next/static/media/bdc7e24a509eb931-s.0apt5mko2.qn3.woff2 +0 -0
- package/dist/web/_next/static/media/c3cb240f9c892514-s.163v2i5cux7-c.woff2 +0 -0
- package/dist/web/_next/static/media/e2334d715941921e-s.p.12skym0rqknxy.woff2 +0 -0
- package/public/avatars/1777813826407-bea0ja-minimax.svg +0 -1
- package/public/avatars/1777813967088-3xlvd0-minimax.svg +0 -1
- package/public/avatars/1777814041714-yp0qeq-minimax.svg +0 -1
- package/public/avatars/1777904986095-rg26je-icon.png +0 -0
- package/public/avatars/1778953228323-5je54x-user.jpg +0 -0
- package/public/avatars/1778954057880-g01q6y-user.jpg +0 -0
- /package/dist/web/_next/static/{GS3b40oeaeLxm7i9-ibaj → e8w3vd9Eov_LDYWj_0zsE}/_buildManifest.js +0 -0
- /package/dist/web/_next/static/{GS3b40oeaeLxm7i9-ibaj → e8w3vd9Eov_LDYWj_0zsE}/_clientMiddlewareManifest.js +0 -0
- /package/dist/web/_next/static/{GS3b40oeaeLxm7i9-ibaj → e8w3vd9Eov_LDYWj_0zsE}/_ssgManifest.js +0 -0
- /package/public/avatars/{1777815865622-08wp9m-user.jpg → user.jpg} +0 -0
|
@@ -5,12 +5,12 @@ router.get('/', (_req, res) => {
|
|
|
5
5
|
res.json(listPromptTemplates());
|
|
6
6
|
});
|
|
7
7
|
router.post('/', (req, res) => {
|
|
8
|
-
const { name, content } = req.body;
|
|
8
|
+
const { name, content, storeId } = req.body;
|
|
9
9
|
if (!name || !content) {
|
|
10
10
|
res.status(400).json({ error: 'name and content required' });
|
|
11
11
|
return;
|
|
12
12
|
}
|
|
13
|
-
res.json(createPromptTemplate(name, content));
|
|
13
|
+
res.json(createPromptTemplate(name, content, storeId));
|
|
14
14
|
});
|
|
15
15
|
router.put('/:id', (req, res) => {
|
|
16
16
|
const id = typeof req.params.id === 'string' ? req.params.id : req.params.id[0];
|
package/dist/routes/skill.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { Router } from 'express';
|
|
2
|
-
import {
|
|
2
|
+
import { exec } from 'node:child_process';
|
|
3
|
+
import { join } from 'node:path';
|
|
4
|
+
import { existsSync } from 'node:fs';
|
|
5
|
+
import { listSkills, importSkill, importSkillsBatch, importSkillFromStore, toggleFavorite, updateSkillContent, deleteSkill, checkSkillSync, syncSkills, importSkillsFromGit, listSkillFiles, readSkillFile, writeSkillFile } from '../services/skill.js';
|
|
6
|
+
import { getDataDir } from '../storage/json-store.js';
|
|
3
7
|
const router = Router();
|
|
4
8
|
router.get('/', (_req, res) => {
|
|
5
9
|
res.json(listSkills());
|
|
@@ -34,25 +38,38 @@ router.post('/import-batch', (req, res) => {
|
|
|
34
38
|
const skills = importSkillsBatch(items);
|
|
35
39
|
res.json(skills);
|
|
36
40
|
});
|
|
41
|
+
router.post('/import-store', (req, res) => {
|
|
42
|
+
const { path, group } = req.body;
|
|
43
|
+
if (!path) {
|
|
44
|
+
res.status(400).json({ error: 'path required' });
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
const skill = importSkillFromStore(path, group || '');
|
|
48
|
+
if (!skill) {
|
|
49
|
+
res.status(404).json({ error: 'Store skill not found' });
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
res.json(skill);
|
|
53
|
+
});
|
|
54
|
+
router.post('/import-git', (req, res) => {
|
|
55
|
+
const { url } = req.body;
|
|
56
|
+
if (!url) {
|
|
57
|
+
res.status(400).json({ error: 'url required' });
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
try {
|
|
61
|
+
const skills = importSkillsFromGit(url);
|
|
62
|
+
res.json(skills);
|
|
63
|
+
}
|
|
64
|
+
catch (err) {
|
|
65
|
+
res.status(500).json({ error: err.message || 'Git clone failed' });
|
|
66
|
+
}
|
|
67
|
+
});
|
|
37
68
|
router.post('/:name/favorite', (req, res) => {
|
|
38
69
|
const name = typeof req.params.name === 'string' ? req.params.name : req.params.name[0];
|
|
39
70
|
const favorited = toggleFavorite(name);
|
|
40
71
|
res.json({ favorited });
|
|
41
72
|
});
|
|
42
|
-
router.post('/:name/toggle', (req, res) => {
|
|
43
|
-
const name = typeof req.params.name === 'string' ? req.params.name : req.params.name[0];
|
|
44
|
-
const enabled = toggleEnabled(name);
|
|
45
|
-
res.json({ enabled });
|
|
46
|
-
});
|
|
47
|
-
router.post('/toggle-all', (req, res) => {
|
|
48
|
-
const { names, enabled } = req.body;
|
|
49
|
-
if (!Array.isArray(names) || typeof enabled !== 'boolean') {
|
|
50
|
-
res.status(400).json({ error: 'names and enabled required' });
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
toggleAllEnabled(names, enabled);
|
|
54
|
-
res.json({ success: true });
|
|
55
|
-
});
|
|
56
73
|
router.put('/:name', (req, res) => {
|
|
57
74
|
const name = typeof req.params.name === 'string' ? req.params.name : req.params.name[0];
|
|
58
75
|
const { content } = req.body;
|
|
@@ -67,6 +84,60 @@ router.put('/:name', (req, res) => {
|
|
|
67
84
|
}
|
|
68
85
|
res.json({ success: true });
|
|
69
86
|
});
|
|
87
|
+
router.get('/:name/files', (req, res) => {
|
|
88
|
+
const name = typeof req.params.name === 'string' ? req.params.name : req.params.name[0];
|
|
89
|
+
const files = listSkillFiles(name);
|
|
90
|
+
res.json(files);
|
|
91
|
+
});
|
|
92
|
+
router.get('/:name/files/{*filePath}', (req, res) => {
|
|
93
|
+
const name = typeof req.params.name === 'string' ? req.params.name : req.params.name[0];
|
|
94
|
+
const filePath = Array.isArray(req.params.filePath) ? req.params.filePath.join('/') : req.params.filePath;
|
|
95
|
+
if (!filePath) {
|
|
96
|
+
res.status(400).json({ error: 'file path required' });
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
const content = readSkillFile(name, filePath);
|
|
100
|
+
if (content === null) {
|
|
101
|
+
res.status(404).json({ error: 'File not found' });
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
res.json({ content });
|
|
105
|
+
});
|
|
106
|
+
router.put('/:name/files/{*filePath}', (req, res) => {
|
|
107
|
+
const name = typeof req.params.name === 'string' ? req.params.name : req.params.name[0];
|
|
108
|
+
const filePath = Array.isArray(req.params.filePath) ? req.params.filePath.join('/') : req.params.filePath;
|
|
109
|
+
const { content } = req.body;
|
|
110
|
+
if (!filePath || content === undefined) {
|
|
111
|
+
res.status(400).json({ error: 'file path and content required' });
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
const ok = writeSkillFile(name, filePath, content);
|
|
115
|
+
if (!ok) {
|
|
116
|
+
res.status(400).json({ error: 'Failed to write file' });
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
res.json({ success: true });
|
|
120
|
+
});
|
|
121
|
+
router.post('/:name/reveal', (req, res) => {
|
|
122
|
+
const name = typeof req.params.name === 'string' ? req.params.name : req.params.name[0];
|
|
123
|
+
const skillDir = join(getDataDir(), 'skills', name);
|
|
124
|
+
if (!existsSync(skillDir)) {
|
|
125
|
+
res.status(404).json({ error: 'Skill folder not found' });
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
const cmd = process.platform === 'darwin'
|
|
129
|
+
? `open "${skillDir}"`
|
|
130
|
+
: process.platform === 'win32'
|
|
131
|
+
? `explorer "${skillDir}"`
|
|
132
|
+
: `xdg-open "${skillDir}"`;
|
|
133
|
+
exec(cmd, (err) => {
|
|
134
|
+
if (err) {
|
|
135
|
+
res.status(500).json({ error: 'Failed to reveal', detail: err.message });
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
res.json({ ok: true, path: skillDir });
|
|
139
|
+
});
|
|
140
|
+
});
|
|
70
141
|
router.delete('/:name', (req, res) => {
|
|
71
142
|
const name = typeof req.params.name === 'string' ? req.params.name : req.params.name[0];
|
|
72
143
|
const ok = deleteSkill(name);
|
package/dist/routes/task.js
CHANGED
|
@@ -11,15 +11,23 @@ router.post('/', (req, res) => {
|
|
|
11
11
|
res.status(400).json({ error: 'issueId and title are required' });
|
|
12
12
|
return;
|
|
13
13
|
}
|
|
14
|
+
if (typeof agentConfigId !== 'string' || !agentConfigId.trim()) {
|
|
15
|
+
res.status(400).json({ error: 'agentConfigId is required' });
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
14
18
|
const issue = issueService.getById(req.params.id, issueId);
|
|
15
19
|
if (!issue) {
|
|
16
20
|
res.status(404).json({ error: 'issue not found' });
|
|
17
21
|
return;
|
|
18
22
|
}
|
|
23
|
+
if (!issue.members.includes(agentConfigId)) {
|
|
24
|
+
res.status(400).json({ error: 'agentConfigId must be an issue member' });
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
19
27
|
const task = taskService.create(req.params.id, issueId, {
|
|
20
28
|
title,
|
|
21
29
|
description: description || '',
|
|
22
|
-
agentConfigId,
|
|
30
|
+
agentConfigId: agentConfigId.trim(),
|
|
23
31
|
dependsOnTaskIds,
|
|
24
32
|
sandboxDirs,
|
|
25
33
|
});
|
|
@@ -60,6 +68,10 @@ router.put('/:taskId', (req, res) => {
|
|
|
60
68
|
res.status(400).json({ error: 'title, description, agentConfigId, dependsOnTaskIds, or sandboxDirs is required' });
|
|
61
69
|
return;
|
|
62
70
|
}
|
|
71
|
+
if (agentConfigId !== undefined && (typeof agentConfigId !== 'string' || !agentConfigId.trim())) {
|
|
72
|
+
res.status(400).json({ error: 'agentConfigId cannot be empty' });
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
63
75
|
const task = taskService.update(req.params.id, req.params.taskId, { title, description, agentConfigId, dependsOnTaskIds, sandboxDirs });
|
|
64
76
|
if (!task) {
|
|
65
77
|
res.status(404).json({ error: 'task not found or not editable (must be pending)' });
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { existsSync, readdirSync, readFileSync, writeFileSync, unlinkSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { getDataDir, ensureDir } from '../storage/json-store.js';
|
|
4
|
+
function getAgentTemplatesDir() {
|
|
5
|
+
return join(getDataDir(), 'agent-templates');
|
|
6
|
+
}
|
|
7
|
+
function getCommandsDir(agentId) {
|
|
8
|
+
return join(getAgentTemplatesDir(), agentId, 'commands');
|
|
9
|
+
}
|
|
10
|
+
function getAgentName(agentId) {
|
|
11
|
+
const agentPath = join(getAgentTemplatesDir(), agentId, 'agent.json');
|
|
12
|
+
if (!existsSync(agentPath))
|
|
13
|
+
return undefined;
|
|
14
|
+
try {
|
|
15
|
+
const config = JSON.parse(readFileSync(agentPath, 'utf-8'));
|
|
16
|
+
return config.name || agentId;
|
|
17
|
+
}
|
|
18
|
+
catch {
|
|
19
|
+
return agentId;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
function readCommandsFromDir(dir, agentId, group = '') {
|
|
23
|
+
if (!existsSync(dir))
|
|
24
|
+
return [];
|
|
25
|
+
const agentName = getAgentName(agentId);
|
|
26
|
+
return readdirSync(dir, { withFileTypes: true })
|
|
27
|
+
.flatMap((entry) => {
|
|
28
|
+
if (entry.isDirectory()) {
|
|
29
|
+
return readCommandsFromDir(join(dir, entry.name), agentId, entry.name);
|
|
30
|
+
}
|
|
31
|
+
if (!entry.name.endsWith('.md'))
|
|
32
|
+
return [];
|
|
33
|
+
return {
|
|
34
|
+
name: entry.name.replace(/\.md$/, ''),
|
|
35
|
+
content: readFileSync(join(dir, entry.name), 'utf-8'),
|
|
36
|
+
group,
|
|
37
|
+
agentId,
|
|
38
|
+
agentName,
|
|
39
|
+
};
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
export function listAgentsWithCommands() {
|
|
43
|
+
const templatesDir = getAgentTemplatesDir();
|
|
44
|
+
if (!existsSync(templatesDir))
|
|
45
|
+
return [];
|
|
46
|
+
return readdirSync(templatesDir, { withFileTypes: true })
|
|
47
|
+
.filter((entry) => entry.isDirectory())
|
|
48
|
+
.map((entry) => {
|
|
49
|
+
const commandsDir = getCommandsDir(entry.name);
|
|
50
|
+
const commands = readCommandsFromDir(commandsDir, entry.name);
|
|
51
|
+
return {
|
|
52
|
+
agentId: entry.name,
|
|
53
|
+
agentName: getAgentName(entry.name) || entry.name,
|
|
54
|
+
commandCount: commands.length,
|
|
55
|
+
};
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
export function listAllCommands() {
|
|
59
|
+
const templatesDir = getAgentTemplatesDir();
|
|
60
|
+
if (!existsSync(templatesDir))
|
|
61
|
+
return [];
|
|
62
|
+
return readdirSync(templatesDir, { withFileTypes: true })
|
|
63
|
+
.filter((entry) => entry.isDirectory())
|
|
64
|
+
.flatMap((entry) => {
|
|
65
|
+
const commandsDir = getCommandsDir(entry.name);
|
|
66
|
+
return readCommandsFromDir(commandsDir, entry.name);
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
export function listCommands(agentId) {
|
|
70
|
+
return readCommandsFromDir(getCommandsDir(agentId), agentId);
|
|
71
|
+
}
|
|
72
|
+
function resolveCommandPath(agentId, name, group) {
|
|
73
|
+
if (group) {
|
|
74
|
+
return join(getCommandsDir(agentId), group, `${name}.md`);
|
|
75
|
+
}
|
|
76
|
+
return join(getCommandsDir(agentId), `${name}.md`);
|
|
77
|
+
}
|
|
78
|
+
function findCommandPath(agentId, name, group) {
|
|
79
|
+
if (group) {
|
|
80
|
+
const p = join(getCommandsDir(agentId), group, `${name}.md`);
|
|
81
|
+
return existsSync(p) ? p : null;
|
|
82
|
+
}
|
|
83
|
+
// Search root first, then subdirectories
|
|
84
|
+
const root = join(getCommandsDir(agentId), `${name}.md`);
|
|
85
|
+
if (existsSync(root))
|
|
86
|
+
return root;
|
|
87
|
+
if (existsSync(getCommandsDir(agentId))) {
|
|
88
|
+
for (const entry of readdirSync(getCommandsDir(agentId), { withFileTypes: true })) {
|
|
89
|
+
if (entry.isDirectory()) {
|
|
90
|
+
const p = join(getCommandsDir(agentId), entry.name, `${name}.md`);
|
|
91
|
+
if (existsSync(p))
|
|
92
|
+
return p;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return null;
|
|
97
|
+
}
|
|
98
|
+
export function getCommand(agentId, name, group) {
|
|
99
|
+
const filePath = findCommandPath(agentId, name, group);
|
|
100
|
+
if (!filePath)
|
|
101
|
+
return null;
|
|
102
|
+
// Infer group from path
|
|
103
|
+
const commandsDir = getCommandsDir(agentId);
|
|
104
|
+
const relative = filePath.slice(commandsDir.length + 1);
|
|
105
|
+
const parts = relative.split('/');
|
|
106
|
+
const inferredGroup = parts.length > 1 ? parts.slice(0, -1).join('/') : '';
|
|
107
|
+
return {
|
|
108
|
+
name,
|
|
109
|
+
content: readFileSync(filePath, 'utf-8'),
|
|
110
|
+
group: inferredGroup,
|
|
111
|
+
agentId,
|
|
112
|
+
agentName: getAgentName(agentId),
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
export function createCommand(agentId, name, content, group) {
|
|
116
|
+
const dir = group ? join(getCommandsDir(agentId), group) : getCommandsDir(agentId);
|
|
117
|
+
ensureDir(dir);
|
|
118
|
+
const filePath = join(dir, `${name}.md`);
|
|
119
|
+
writeFileSync(filePath, content, 'utf-8');
|
|
120
|
+
return {
|
|
121
|
+
name,
|
|
122
|
+
content,
|
|
123
|
+
group: group || '',
|
|
124
|
+
agentId,
|
|
125
|
+
agentName: getAgentName(agentId),
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
export function updateCommand(agentId, name, content, group) {
|
|
129
|
+
const filePath = findCommandPath(agentId, name, group);
|
|
130
|
+
if (!filePath)
|
|
131
|
+
return null;
|
|
132
|
+
writeFileSync(filePath, content, 'utf-8');
|
|
133
|
+
const commandsDir = getCommandsDir(agentId);
|
|
134
|
+
const relative = filePath.slice(commandsDir.length + 1);
|
|
135
|
+
const parts = relative.split('/');
|
|
136
|
+
const inferredGroup = parts.length > 1 ? parts.slice(0, -1).join('/') : '';
|
|
137
|
+
return {
|
|
138
|
+
name,
|
|
139
|
+
content,
|
|
140
|
+
group: inferredGroup,
|
|
141
|
+
agentId,
|
|
142
|
+
agentName: getAgentName(agentId),
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
export function deleteCommand(agentId, name, group) {
|
|
146
|
+
const filePath = findCommandPath(agentId, name, group);
|
|
147
|
+
if (!filePath)
|
|
148
|
+
return false;
|
|
149
|
+
unlinkSync(filePath);
|
|
150
|
+
return true;
|
|
151
|
+
}
|
|
152
|
+
export function applyCommandToAgents(sourceAgentId, name, group, targetAgentIds) {
|
|
153
|
+
const src = getCommand(sourceAgentId, name, group);
|
|
154
|
+
if (!src)
|
|
155
|
+
return 0;
|
|
156
|
+
let applied = 0;
|
|
157
|
+
for (const targetId of targetAgentIds) {
|
|
158
|
+
if (targetId === sourceAgentId)
|
|
159
|
+
continue;
|
|
160
|
+
try {
|
|
161
|
+
createCommand(targetId, src.name, src.content);
|
|
162
|
+
applied++;
|
|
163
|
+
}
|
|
164
|
+
catch { /* skip */ }
|
|
165
|
+
}
|
|
166
|
+
return applied;
|
|
167
|
+
}
|
|
168
|
+
//# sourceMappingURL=agent-commands.js.map
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { BUILT_IN_AGENT_TOOLS } from '@agent-spaces/shared';
|
|
2
|
+
import * as commandService from '../command.js';
|
|
3
|
+
import * as commandProcessManager from '../command-process-manager.js';
|
|
4
|
+
const readTerminalOutputInputSchema = {
|
|
5
|
+
type: 'object',
|
|
6
|
+
properties: {
|
|
7
|
+
workspaceId: {
|
|
8
|
+
type: 'string',
|
|
9
|
+
description: 'Optional workspace ID. If omitted, the current workspace is used.',
|
|
10
|
+
},
|
|
11
|
+
sessionId: {
|
|
12
|
+
type: 'string',
|
|
13
|
+
description: 'Terminal session ID to read.',
|
|
14
|
+
},
|
|
15
|
+
offset: {
|
|
16
|
+
type: 'integer',
|
|
17
|
+
minimum: 0,
|
|
18
|
+
description: 'Number of newest lines to skip before reading. Defaults to 0.',
|
|
19
|
+
},
|
|
20
|
+
limit: {
|
|
21
|
+
type: 'integer',
|
|
22
|
+
minimum: 1,
|
|
23
|
+
maximum: 1000,
|
|
24
|
+
description: 'Maximum number of lines to read. Defaults to 100.',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
required: ['sessionId'],
|
|
28
|
+
additionalProperties: false,
|
|
29
|
+
};
|
|
30
|
+
export function createCommandFunctionTools(workspaceId, allowedTools) {
|
|
31
|
+
const allowedToolNames = new Set(allowedTools ?? BUILT_IN_AGENT_TOOLS.map((tool) => tool.name));
|
|
32
|
+
const tools = [
|
|
33
|
+
{
|
|
34
|
+
name: 'ReadTerminalOutput',
|
|
35
|
+
description: 'Read paginated terminal output by terminal session ID. Defaults to the newest 100 lines.',
|
|
36
|
+
inputSchema: readTerminalOutputInputSchema,
|
|
37
|
+
annotations: { readOnly: true, openWorld: false },
|
|
38
|
+
execute: async (input) => {
|
|
39
|
+
const data = input;
|
|
40
|
+
if (data.workspaceId && data.workspaceId !== workspaceId)
|
|
41
|
+
throw new Error('workspaceId mismatch');
|
|
42
|
+
return commandProcessManager.readTerminalOutput(workspaceId, data.sessionId, {
|
|
43
|
+
offset: data.offset,
|
|
44
|
+
limit: data.limit,
|
|
45
|
+
});
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: 'ListQuickCommands',
|
|
50
|
+
description: 'List all quick commands for the workspace with running status.',
|
|
51
|
+
inputSchema: {
|
|
52
|
+
type: 'object',
|
|
53
|
+
properties: {
|
|
54
|
+
workspaceId: { type: 'string', description: 'The workspace ID' },
|
|
55
|
+
},
|
|
56
|
+
required: ['workspaceId'],
|
|
57
|
+
additionalProperties: false,
|
|
58
|
+
},
|
|
59
|
+
annotations: { readOnly: true, openWorld: false },
|
|
60
|
+
execute: async (input) => {
|
|
61
|
+
const data = input;
|
|
62
|
+
if (data.workspaceId !== workspaceId)
|
|
63
|
+
throw new Error('workspaceId mismatch');
|
|
64
|
+
const commands = commandService.listCommands(workspaceId);
|
|
65
|
+
const processes = commandProcessManager.getCommandProcesses(workspaceId);
|
|
66
|
+
const processMap = new Map(processes.map(p => [p.commandId, p]));
|
|
67
|
+
return commands.map(cmd => ({
|
|
68
|
+
...cmd,
|
|
69
|
+
running: processMap.has(cmd.id) ? processMap.get(cmd.id).status : false,
|
|
70
|
+
}));
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
name: 'RunQuickCommand',
|
|
75
|
+
description: 'Run a quick command by ID. Returns sessionId.',
|
|
76
|
+
inputSchema: {
|
|
77
|
+
type: 'object',
|
|
78
|
+
properties: {
|
|
79
|
+
workspaceId: { type: 'string' },
|
|
80
|
+
commandId: { type: 'string' },
|
|
81
|
+
},
|
|
82
|
+
required: ['workspaceId', 'commandId'],
|
|
83
|
+
additionalProperties: false,
|
|
84
|
+
},
|
|
85
|
+
annotations: { destructive: false, openWorld: false },
|
|
86
|
+
execute: async (input) => {
|
|
87
|
+
const data = input;
|
|
88
|
+
if (data.workspaceId !== workspaceId)
|
|
89
|
+
throw new Error('workspaceId mismatch');
|
|
90
|
+
return { sessionId: commandProcessManager.runCommand(workspaceId, data.commandId) };
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
name: 'StopQuickCommand',
|
|
95
|
+
description: 'Stop a running quick command by ID.',
|
|
96
|
+
inputSchema: {
|
|
97
|
+
type: 'object',
|
|
98
|
+
properties: {
|
|
99
|
+
workspaceId: { type: 'string' },
|
|
100
|
+
commandId: { type: 'string' },
|
|
101
|
+
},
|
|
102
|
+
required: ['workspaceId', 'commandId'],
|
|
103
|
+
additionalProperties: false,
|
|
104
|
+
},
|
|
105
|
+
annotations: { destructive: false, openWorld: false },
|
|
106
|
+
execute: async (input) => {
|
|
107
|
+
const data = input;
|
|
108
|
+
if (data.workspaceId !== workspaceId)
|
|
109
|
+
throw new Error('workspaceId mismatch');
|
|
110
|
+
commandProcessManager.stopCommand(workspaceId, data.commandId);
|
|
111
|
+
return { stopped: true };
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
];
|
|
115
|
+
return tools.filter((tool) => allowedToolNames.has(tool.name));
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=command-tools.js.map
|