@turmind/halo 0.1.9
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/LICENSE +21 -0
- package/README.md +143 -0
- package/admin-out/404.html +1 -0
- package/admin-out/_next/static/IBP_mwBDf-cPwZSZZGpi8/_buildManifest.js +1 -0
- package/admin-out/_next/static/IBP_mwBDf-cPwZSZZGpi8/_ssgManifest.js +1 -0
- package/admin-out/_next/static/chunks/1d2d5650-810a3ca1ae20cab5.js +18 -0
- package/admin-out/_next/static/chunks/200.3b8f8a74f005a134.js +1 -0
- package/admin-out/_next/static/chunks/220.3dc41cd6269b88e6.js +1 -0
- package/admin-out/_next/static/chunks/298-d6b224b569da4de0.js +1 -0
- package/admin-out/_next/static/chunks/304eda7d.b1ee7f523653e027.js +1 -0
- package/admin-out/_next/static/chunks/330.3b784cf0dcd69163.js +1 -0
- package/admin-out/_next/static/chunks/442.f4302087bddb1ec1.js +1 -0
- package/admin-out/_next/static/chunks/443.d1b289781793f8de.js +25 -0
- package/admin-out/_next/static/chunks/503-7c6d9935df6e0cea.js +1 -0
- package/admin-out/_next/static/chunks/533.5f2d4bfe3d076095.js +1 -0
- package/admin-out/_next/static/chunks/579.a2718ddd395a2f3a.js +1 -0
- package/admin-out/_next/static/chunks/635-3dd0043ed0520b9d.js +1 -0
- package/admin-out/_next/static/chunks/65.859665ba6717967a.js +1 -0
- package/admin-out/_next/static/chunks/661.a4fe93f3f2a5e871.js +1 -0
- package/admin-out/_next/static/chunks/688.4e014ac6cfc7e152.js +1 -0
- package/admin-out/_next/static/chunks/868.0c95dfe283400a00.js +1 -0
- package/admin-out/_next/static/chunks/app/_not-found/page-8e35399c8fd5016d.js +1 -0
- package/admin-out/_next/static/chunks/app/layout-58f773336e6fce61.js +1 -0
- package/admin-out/_next/static/chunks/app/page-cc8043335282d745.js +1 -0
- package/admin-out/_next/static/chunks/db534642.09d3c650ff587175.js +1 -0
- package/admin-out/_next/static/chunks/fb4ec4d6-3fa44f69484f91b9.js +1 -0
- package/admin-out/_next/static/chunks/framework-c3031ae54a63fe16.js +1 -0
- package/admin-out/_next/static/chunks/main-14b48e3c2588354f.js +1 -0
- package/admin-out/_next/static/chunks/main-app-483b436873410ddc.js +1 -0
- package/admin-out/_next/static/chunks/pages/_app-b2fc6e5f920d1b1a.js +1 -0
- package/admin-out/_next/static/chunks/pages/_error-f3696a8f3d67d150.js +1 -0
- package/admin-out/_next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
- package/admin-out/_next/static/chunks/webpack-8bd7ef88a6527feb.js +1 -0
- package/admin-out/_next/static/css/659eccb5db697b76.css +1 -0
- package/admin-out/_next/static/css/8fce4e1a54dac12a.css +3 -0
- package/admin-out/_next/static/media/19cfc7226ec3afaa-s.woff2 +0 -0
- package/admin-out/_next/static/media/21350d82a1f187e9-s.woff2 +0 -0
- package/admin-out/_next/static/media/8e9860b6e62d6359-s.woff2 +0 -0
- package/admin-out/_next/static/media/ba9851c3c22cd980-s.woff2 +0 -0
- package/admin-out/_next/static/media/c5fe6dc8356a8c31-s.woff2 +0 -0
- package/admin-out/_next/static/media/df0a9ae256c0569c-s.woff2 +0 -0
- package/admin-out/_next/static/media/e4af272ccee01ff0-s.p.woff2 +0 -0
- package/admin-out/favicon.ico +0 -0
- package/admin-out/icon.svg +18 -0
- package/admin-out/index.html +1 -0
- package/admin-out/index.txt +23 -0
- package/admin-out/monaco/vs/_commonjsHelpers-CT9FvmAN.js +1 -0
- package/admin-out/monaco/vs/abap-D-t0cyap.js +1 -0
- package/admin-out/monaco/vs/apex-CcIm7xu6.js +1 -0
- package/admin-out/monaco/vs/assets/css.worker-HnVq6Ewq.js +93 -0
- package/admin-out/monaco/vs/assets/editor.worker-Be8ye1pW.js +26 -0
- package/admin-out/monaco/vs/assets/html.worker-B51mlPHg.js +470 -0
- package/admin-out/monaco/vs/assets/json.worker-DKiEKt88.js +58 -0
- package/admin-out/monaco/vs/assets/ts.worker-CMbG-7ft.js +67731 -0
- package/admin-out/monaco/vs/azcli-BA0tQDCg.js +1 -0
- package/admin-out/monaco/vs/basic-languages/monaco.contribution.js +1 -0
- package/admin-out/monaco/vs/bat-C397hTD6.js +1 -0
- package/admin-out/monaco/vs/bicep-DF5aW17k.js +2 -0
- package/admin-out/monaco/vs/cameligo-plsz8qhj.js +1 -0
- package/admin-out/monaco/vs/clojure-Y2auQMzK.js +1 -0
- package/admin-out/monaco/vs/coffee-Bu45yuWE.js +1 -0
- package/admin-out/monaco/vs/cpp-CkKPQIni.js +1 -0
- package/admin-out/monaco/vs/csharp-CX28MZyh.js +1 -0
- package/admin-out/monaco/vs/csp-D8uWnyxW.js +1 -0
- package/admin-out/monaco/vs/css-CaeNmE3S.js +3 -0
- package/admin-out/monaco/vs/cssMode-CjiAH6dQ.js +1 -0
- package/admin-out/monaco/vs/cypher-DVThT8BS.js +1 -0
- package/admin-out/monaco/vs/dart-CmGfCvrO.js +1 -0
- package/admin-out/monaco/vs/dockerfile-CZqqYdch.js +1 -0
- package/admin-out/monaco/vs/ecl-30fUercY.js +1 -0
- package/admin-out/monaco/vs/editor/editor.main.css +1 -0
- package/admin-out/monaco/vs/editor/editor.main.js +5 -0
- package/admin-out/monaco/vs/editor.api-CalNCsUg.js +903 -0
- package/admin-out/monaco/vs/elixir-xjPaIfzF.js +1 -0
- package/admin-out/monaco/vs/flow9-DqtmStfK.js +1 -0
- package/admin-out/monaco/vs/freemarker2-Cz_sV6Md.js +3 -0
- package/admin-out/monaco/vs/fsharp-BOMdg4U1.js +1 -0
- package/admin-out/monaco/vs/go-D_hbi-Jt.js +1 -0
- package/admin-out/monaco/vs/graphql-CKUU4kLG.js +1 -0
- package/admin-out/monaco/vs/handlebars-OwglfO-1.js +1 -0
- package/admin-out/monaco/vs/hcl-DTaboeZW.js +1 -0
- package/admin-out/monaco/vs/html-Pa1xEWsY.js +1 -0
- package/admin-out/monaco/vs/htmlMode-Bz67EXwp.js +1 -0
- package/admin-out/monaco/vs/ini-CsNwO04R.js +1 -0
- package/admin-out/monaco/vs/java-CI4ZMsH9.js +1 -0
- package/admin-out/monaco/vs/javascript-PczUCGdz.js +1 -0
- package/admin-out/monaco/vs/jsonMode-DULH5oaX.js +7 -0
- package/admin-out/monaco/vs/julia-BwzEvaQw.js +1 -0
- package/admin-out/monaco/vs/kotlin-IUYPiTV8.js +1 -0
- package/admin-out/monaco/vs/language/css/monaco.contribution.js +1 -0
- package/admin-out/monaco/vs/language/html/monaco.contribution.js +1 -0
- package/admin-out/monaco/vs/language/json/monaco.contribution.js +1 -0
- package/admin-out/monaco/vs/language/typescript/monaco.contribution.js +1 -0
- package/admin-out/monaco/vs/less-C0eDYdqa.js +2 -0
- package/admin-out/monaco/vs/lexon-iON-Kj97.js +1 -0
- package/admin-out/monaco/vs/liquid-DqKjdPGy.js +1 -0
- package/admin-out/monaco/vs/loader.js +1368 -0
- package/admin-out/monaco/vs/lspLanguageFeatures-kM9O9rjY.js +4 -0
- package/admin-out/monaco/vs/lua-DtygF91M.js +1 -0
- package/admin-out/monaco/vs/m3-CsR4AuFi.js +1 -0
- package/admin-out/monaco/vs/markdown-C_rD0bIw.js +1 -0
- package/admin-out/monaco/vs/mdx-DEWtB1K5.js +1 -0
- package/admin-out/monaco/vs/mips-CiYP61RB.js +1 -0
- package/admin-out/monaco/vs/monaco.contribution-D2OdxNBt.js +1 -0
- package/admin-out/monaco/vs/monaco.contribution-DO3azKX8.js +1 -0
- package/admin-out/monaco/vs/monaco.contribution-EcChJV6a.js +1 -0
- package/admin-out/monaco/vs/monaco.contribution-qLAYrEOP.js +1 -0
- package/admin-out/monaco/vs/msdax-C38-sJlp.js +1 -0
- package/admin-out/monaco/vs/mysql-CdtbpvbG.js +1 -0
- package/admin-out/monaco/vs/nls.messages-loader.js +1 -0
- package/admin-out/monaco/vs/nls.messages.cs.js.js +17 -0
- package/admin-out/monaco/vs/nls.messages.de.js.js +17 -0
- package/admin-out/monaco/vs/nls.messages.es.js.js +17 -0
- package/admin-out/monaco/vs/nls.messages.fr.js.js +15 -0
- package/admin-out/monaco/vs/nls.messages.it.js.js +15 -0
- package/admin-out/monaco/vs/nls.messages.ja.js.js +17 -0
- package/admin-out/monaco/vs/nls.messages.js.js +10 -0
- package/admin-out/monaco/vs/nls.messages.ko.js.js +25 -0
- package/admin-out/monaco/vs/nls.messages.pl.js.js +17 -0
- package/admin-out/monaco/vs/nls.messages.pt-br.js.js +6 -0
- package/admin-out/monaco/vs/nls.messages.ru.js.js +17 -0
- package/admin-out/monaco/vs/nls.messages.tr.js.js +15 -0
- package/admin-out/monaco/vs/nls.messages.zh-cn.js.js +17 -0
- package/admin-out/monaco/vs/nls.messages.zh-tw.js.js +15 -0
- package/admin-out/monaco/vs/objective-c-CntZFaHX.js +1 -0
- package/admin-out/monaco/vs/pascal-r6kuqfl_.js +1 -0
- package/admin-out/monaco/vs/pascaligo-BiXoTmXh.js +1 -0
- package/admin-out/monaco/vs/perl-DABw_TcH.js +1 -0
- package/admin-out/monaco/vs/pgsql-me_jFXeX.js +1 -0
- package/admin-out/monaco/vs/php-D_kh-9LK.js +1 -0
- package/admin-out/monaco/vs/pla-VfZjczW0.js +1 -0
- package/admin-out/monaco/vs/postiats-BBSzz8Pk.js +1 -0
- package/admin-out/monaco/vs/powerquery-Dt-g_2cc.js +1 -0
- package/admin-out/monaco/vs/powershell-B-7ap1zc.js +1 -0
- package/admin-out/monaco/vs/protobuf-BmtuEB1A.js +2 -0
- package/admin-out/monaco/vs/pug-BRpRNeEb.js +1 -0
- package/admin-out/monaco/vs/python-Cr0UkIbn.js +1 -0
- package/admin-out/monaco/vs/qsharp-BzsFaUU9.js +1 -0
- package/admin-out/monaco/vs/r-f8dDdrp4.js +1 -0
- package/admin-out/monaco/vs/razor-BYAHOTkz.js +1 -0
- package/admin-out/monaco/vs/redis-fvZQY4PI.js +1 -0
- package/admin-out/monaco/vs/redshift-45Et0LQi.js +1 -0
- package/admin-out/monaco/vs/restructuredtext-C7UUFKFD.js +1 -0
- package/admin-out/monaco/vs/ruby-CZO8zYTz.js +1 -0
- package/admin-out/monaco/vs/rust-Bfetafyc.js +1 -0
- package/admin-out/monaco/vs/sb-3GYllVck.js +1 -0
- package/admin-out/monaco/vs/scala-foMgrKo1.js +1 -0
- package/admin-out/monaco/vs/scheme-CHdMtr7p.js +1 -0
- package/admin-out/monaco/vs/scss-C1cmLt9V.js +3 -0
- package/admin-out/monaco/vs/shell-ClXCKCEW.js +1 -0
- package/admin-out/monaco/vs/solidity-MZ6ExpPy.js +1 -0
- package/admin-out/monaco/vs/sophia-DWkuSsPQ.js +1 -0
- package/admin-out/monaco/vs/sparql-AUGFYSyk.js +1 -0
- package/admin-out/monaco/vs/sql-32GpJSV2.js +1 -0
- package/admin-out/monaco/vs/st-CuDFIVZ_.js +1 -0
- package/admin-out/monaco/vs/swift-n-2HociN.js +3 -0
- package/admin-out/monaco/vs/systemverilog-Ch4vA8Yt.js +1 -0
- package/admin-out/monaco/vs/tcl-D74tq1nH.js +1 -0
- package/admin-out/monaco/vs/tsMode-CZz1Umrk.js +11 -0
- package/admin-out/monaco/vs/twig-C6taOxMV.js +1 -0
- package/admin-out/monaco/vs/typescript-DfOrAzoV.js +1 -0
- package/admin-out/monaco/vs/typespec-D-PIh9Xw.js +1 -0
- package/admin-out/monaco/vs/vb-Dyb2648j.js +1 -0
- package/admin-out/monaco/vs/wgsl-BhLXMOR0.js +298 -0
- package/admin-out/monaco/vs/workers-DcJshg-q.js +1 -0
- package/admin-out/monaco/vs/xml-CdsdnY8S.js +1 -0
- package/admin-out/monaco/vs/yaml-DYGvmE88.js +1 -0
- package/bin/halo.js +9 -0
- package/bundled-docs/design/agent.md +145 -0
- package/bundled-docs/design/architecture.md +270 -0
- package/bundled-docs/design/background-dispatch.md +151 -0
- package/bundled-docs/design/command.md +58 -0
- package/bundled-docs/design/cron.md +88 -0
- package/bundled-docs/design/evolution.md +383 -0
- package/bundled-docs/design/express-self.md +145 -0
- package/bundled-docs/design/feishu.md +224 -0
- package/bundled-docs/design/halo-city.md +112 -0
- package/bundled-docs/design/prompt-system.md +411 -0
- package/bundled-docs/design/session.md +321 -0
- package/bundled-docs/design/slack.md +212 -0
- package/bundled-docs/design/storage.md +578 -0
- package/bundled-docs/design/telegram.md +161 -0
- package/bundled-docs/design/web.md +222 -0
- package/bundled-docs/design/wechat.md +146 -0
- package/bundled-docs/design/ws.md +144 -0
- package/bundled-docs/dev/acp-adapter.md +337 -0
- package/bundled-docs/dev/add-channel.md +376 -0
- package/bundled-docs/dev/add-model-provider.md +386 -0
- package/bundled-docs/dev/api.md +686 -0
- package/bundled-docs/dev/deploy.md +198 -0
- package/bundled-docs/dev/desktop-packaging.md +327 -0
- package/bundled-docs/dev/env.md +158 -0
- package/bundled-docs/dev/logging.md +85 -0
- package/bundled-docs/dev/previews.md +225 -0
- package/bundled-docs/dev/tools.md +331 -0
- package/bundled-docs/guide/README.md +29 -0
- package/bundled-docs/guide/agents.md +264 -0
- package/bundled-docs/guide/channels/README.md +62 -0
- package/bundled-docs/guide/channels/acp.md +150 -0
- package/bundled-docs/guide/channels/feishu.md +154 -0
- package/bundled-docs/guide/channels/slack.md +156 -0
- package/bundled-docs/guide/channels/telegram.md +112 -0
- package/bundled-docs/guide/channels/web.md +149 -0
- package/bundled-docs/guide/channels/wechat.md +110 -0
- package/bundled-docs/guide/chat.md +112 -0
- package/bundled-docs/guide/cli.md +197 -0
- package/bundled-docs/guide/getting-started.md +93 -0
- package/bundled-docs/guide/secrets-and-credentials.md +161 -0
- package/bundled-docs/guide/sessions.md +104 -0
- package/bundled-docs/guide/skills.md +302 -0
- package/bundled-docs/guide/testing-agents-and-skills.md +136 -0
- package/bundled-docs/guide/workspace.md +131 -0
- package/bundled-docs/plans/cron-tasks.md +362 -0
- package/bundled-docs/plans/design-suggestions.md +203 -0
- package/bundled-docs/plans/issue-session-deep-nesting.md +208 -0
- package/bundled-docs/plans/launch-plan.md +111 -0
- package/bundled-docs/plans/md-and-agent-refactor.md +197 -0
- package/bundled-docs/plans/remote-mac-worker.md +196 -0
- package/bundled-docs/plans/roadmap.md +40 -0
- package/bundled-docs/plans/self-evolution.md +1379 -0
- package/bundled-docs/plans/todo.md +32 -0
- package/bundled-docs/plans/weixin-channel.md +255 -0
- package/bundled-docs/requirements/agent.md +92 -0
- package/bundled-docs/requirements/chat.md +81 -0
- package/bundled-docs/requirements/command.md +130 -0
- package/bundled-docs/requirements/editor.md +82 -0
- package/bundled-docs/requirements/explorer.md +89 -0
- package/bundled-docs/requirements/overview.md +62 -0
- package/bundled-docs/requirements/session.md +73 -0
- package/bundled-docs/requirements/settings.md +224 -0
- package/bundled-docs/requirements/skill.md +125 -0
- package/bundled-docs/requirements/source-control.md +82 -0
- package/bundled-docs/requirements/terminal.md +118 -0
- package/bundled-docs/requirements/workspace.md +80 -0
- package/bundled-docs/test/docs-seeding.md +101 -0
- package/bundled-docs/test/session.md +374 -0
- package/dist/index.js +26750 -0
- package/package.json +67 -0
- package/templates/INSTRUCTIONS.md +25 -0
- package/templates/agents/__apply_agent__/AGENT.md +229 -0
- package/templates/agents/__apply_agent__/agent.yaml +30 -0
- package/templates/agents/__evo_agent__/AGENT.md +323 -0
- package/templates/agents/__evo_agent__/agent.yaml +29 -0
- package/templates/agents/__score__/AGENT.md +177 -0
- package/templates/agents/__score__/agent.yaml +29 -0
- package/templates/agents/deep-executor/AGENT.md +60 -0
- package/templates/agents/deep-executor/agent.yaml +25 -0
- package/templates/agents/default/AGENT.md +38 -0
- package/templates/agents/default/agent.yaml +51 -0
- package/templates/agents/executor/AGENT.md +38 -0
- package/templates/agents/executor/agent.yaml +25 -0
- package/templates/aliases.yaml +26 -0
- package/templates/canvas/self.html +660 -0
- package/templates/config.yaml +69 -0
- package/templates/models/anthropic.yaml +47 -0
- package/templates/models/aws-bedrock-claude-invoke.yaml +156 -0
- package/templates/models/aws-bedrock-mantle.yaml +89 -0
- package/templates/models/deepseek.yaml +62 -0
- package/templates/models/doubao.yaml +137 -0
- package/templates/models/hunyuan.yaml +56 -0
- package/templates/models/kimi.yaml +41 -0
- package/templates/models/mimo-token-plan-china.yaml +61 -0
- package/templates/models/minimax.yaml +80 -0
- package/templates/models/openai.yaml +51 -0
- package/templates/models/qwen.yaml +78 -0
- package/templates/optional-skills/tavily-web-search/SKILL.md +91 -0
- package/templates/optional-skills/tavily-web-search/config.yaml +10 -0
- package/templates/prompts/all/TOOL_GUIDELINES.md +35 -0
- package/templates/prompts/all/TOOL_SHELL.md +4 -0
- package/templates/prompts/all/TOOL_SHELL.windows.md +7 -0
- package/templates/prompts/bootstrap/BOOTSTRAP.md +26 -0
- package/templates/prompts/root/WORKSPACE_MEMORY.md +11 -0
- package/templates/schema.sql +30 -0
- package/templates/skills/acp/SKILL.md +236 -0
- package/templates/skills/acp/templates/SKILL.md.tmpl +74 -0
- package/templates/skills/acp/templates/ask.py +176 -0
- package/templates/skills/acp/templates/config.yaml.tmpl +33 -0
- package/templates/skills/agent/SKILL.md +128 -0
- package/templates/skills/aws-knowledge/SKILL.md +82 -0
- package/templates/skills/aws-knowledge/scripts/aws_kb.py +61 -0
- package/templates/skills/cron/SKILL.md +217 -0
- package/templates/skills/cron/manage-cron.py +434 -0
- package/templates/skills/halo/SKILL.md +98 -0
- package/templates/skills/nova-web-search/SKILL.md +65 -0
- package/templates/skills/self/SKILL.md +139 -0
- package/templates/skills/send-file/SKILL.md +28 -0
- package/templates/skills/send-file/feishu.md +16 -0
- package/templates/skills/send-file/slack.md +7 -0
- package/templates/skills/send-file/telegram.md +9 -0
- package/templates/skills/send-file/web.md +6 -0
- package/templates/skills/send-file/wechat.md +8 -0
- package/templates/skills/skill/SKILL.md +131 -0
- package/templates/skills/workspace/SKILL.md +28 -0
- package/templates/skills/workspace/setup-tidy.md +265 -0
- package/templates/skills/workspace/share.md +187 -0
- package/templates/skills/workspace/stage.py +487 -0
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
define("vs/wgsl-BhLXMOR0",["exports"],(function(a){"use strict";const s={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"[",close:"]"},{open:"{",close:"}"},{open:"(",close:")"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"}]};function e(b){let i=[];const o=b.split(/\t+|\r+|\n+| +/);for(let r=0;r<o.length;++r)o[r].length>0&&i.push(o[r]);return i}const c=e("true false"),m=e(`
|
|
2
|
+
alias
|
|
3
|
+
break
|
|
4
|
+
case
|
|
5
|
+
const
|
|
6
|
+
const_assert
|
|
7
|
+
continue
|
|
8
|
+
continuing
|
|
9
|
+
default
|
|
10
|
+
diagnostic
|
|
11
|
+
discard
|
|
12
|
+
else
|
|
13
|
+
enable
|
|
14
|
+
fn
|
|
15
|
+
for
|
|
16
|
+
if
|
|
17
|
+
let
|
|
18
|
+
loop
|
|
19
|
+
override
|
|
20
|
+
requires
|
|
21
|
+
return
|
|
22
|
+
struct
|
|
23
|
+
switch
|
|
24
|
+
var
|
|
25
|
+
while
|
|
26
|
+
`),l=e(`
|
|
27
|
+
NULL
|
|
28
|
+
Self
|
|
29
|
+
abstract
|
|
30
|
+
active
|
|
31
|
+
alignas
|
|
32
|
+
alignof
|
|
33
|
+
as
|
|
34
|
+
asm
|
|
35
|
+
asm_fragment
|
|
36
|
+
async
|
|
37
|
+
attribute
|
|
38
|
+
auto
|
|
39
|
+
await
|
|
40
|
+
become
|
|
41
|
+
binding_array
|
|
42
|
+
cast
|
|
43
|
+
catch
|
|
44
|
+
class
|
|
45
|
+
co_await
|
|
46
|
+
co_return
|
|
47
|
+
co_yield
|
|
48
|
+
coherent
|
|
49
|
+
column_major
|
|
50
|
+
common
|
|
51
|
+
compile
|
|
52
|
+
compile_fragment
|
|
53
|
+
concept
|
|
54
|
+
const_cast
|
|
55
|
+
consteval
|
|
56
|
+
constexpr
|
|
57
|
+
constinit
|
|
58
|
+
crate
|
|
59
|
+
debugger
|
|
60
|
+
decltype
|
|
61
|
+
delete
|
|
62
|
+
demote
|
|
63
|
+
demote_to_helper
|
|
64
|
+
do
|
|
65
|
+
dynamic_cast
|
|
66
|
+
enum
|
|
67
|
+
explicit
|
|
68
|
+
export
|
|
69
|
+
extends
|
|
70
|
+
extern
|
|
71
|
+
external
|
|
72
|
+
fallthrough
|
|
73
|
+
filter
|
|
74
|
+
final
|
|
75
|
+
finally
|
|
76
|
+
friend
|
|
77
|
+
from
|
|
78
|
+
fxgroup
|
|
79
|
+
get
|
|
80
|
+
goto
|
|
81
|
+
groupshared
|
|
82
|
+
highp
|
|
83
|
+
impl
|
|
84
|
+
implements
|
|
85
|
+
import
|
|
86
|
+
inline
|
|
87
|
+
instanceof
|
|
88
|
+
interface
|
|
89
|
+
layout
|
|
90
|
+
lowp
|
|
91
|
+
macro
|
|
92
|
+
macro_rules
|
|
93
|
+
match
|
|
94
|
+
mediump
|
|
95
|
+
meta
|
|
96
|
+
mod
|
|
97
|
+
module
|
|
98
|
+
move
|
|
99
|
+
mut
|
|
100
|
+
mutable
|
|
101
|
+
namespace
|
|
102
|
+
new
|
|
103
|
+
nil
|
|
104
|
+
noexcept
|
|
105
|
+
noinline
|
|
106
|
+
nointerpolation
|
|
107
|
+
noperspective
|
|
108
|
+
null
|
|
109
|
+
nullptr
|
|
110
|
+
of
|
|
111
|
+
operator
|
|
112
|
+
package
|
|
113
|
+
packoffset
|
|
114
|
+
partition
|
|
115
|
+
pass
|
|
116
|
+
patch
|
|
117
|
+
pixelfragment
|
|
118
|
+
precise
|
|
119
|
+
precision
|
|
120
|
+
premerge
|
|
121
|
+
priv
|
|
122
|
+
protected
|
|
123
|
+
pub
|
|
124
|
+
public
|
|
125
|
+
readonly
|
|
126
|
+
ref
|
|
127
|
+
regardless
|
|
128
|
+
register
|
|
129
|
+
reinterpret_cast
|
|
130
|
+
require
|
|
131
|
+
resource
|
|
132
|
+
restrict
|
|
133
|
+
self
|
|
134
|
+
set
|
|
135
|
+
shared
|
|
136
|
+
sizeof
|
|
137
|
+
smooth
|
|
138
|
+
snorm
|
|
139
|
+
static
|
|
140
|
+
static_assert
|
|
141
|
+
static_cast
|
|
142
|
+
std
|
|
143
|
+
subroutine
|
|
144
|
+
super
|
|
145
|
+
target
|
|
146
|
+
template
|
|
147
|
+
this
|
|
148
|
+
thread_local
|
|
149
|
+
throw
|
|
150
|
+
trait
|
|
151
|
+
try
|
|
152
|
+
type
|
|
153
|
+
typedef
|
|
154
|
+
typeid
|
|
155
|
+
typename
|
|
156
|
+
typeof
|
|
157
|
+
union
|
|
158
|
+
unless
|
|
159
|
+
unorm
|
|
160
|
+
unsafe
|
|
161
|
+
unsized
|
|
162
|
+
use
|
|
163
|
+
using
|
|
164
|
+
varying
|
|
165
|
+
virtual
|
|
166
|
+
volatile
|
|
167
|
+
wgsl
|
|
168
|
+
where
|
|
169
|
+
with
|
|
170
|
+
writeonly
|
|
171
|
+
yield
|
|
172
|
+
`),u=e(`
|
|
173
|
+
read write read_write
|
|
174
|
+
function private workgroup uniform storage
|
|
175
|
+
perspective linear flat
|
|
176
|
+
center centroid sample
|
|
177
|
+
vertex_index instance_index position front_facing frag_depth
|
|
178
|
+
local_invocation_id local_invocation_index
|
|
179
|
+
global_invocation_id workgroup_id num_workgroups
|
|
180
|
+
sample_index sample_mask
|
|
181
|
+
rgba8unorm
|
|
182
|
+
rgba8snorm
|
|
183
|
+
rgba8uint
|
|
184
|
+
rgba8sint
|
|
185
|
+
rgba16uint
|
|
186
|
+
rgba16sint
|
|
187
|
+
rgba16float
|
|
188
|
+
r32uint
|
|
189
|
+
r32sint
|
|
190
|
+
r32float
|
|
191
|
+
rg32uint
|
|
192
|
+
rg32sint
|
|
193
|
+
rg32float
|
|
194
|
+
rgba32uint
|
|
195
|
+
rgba32sint
|
|
196
|
+
rgba32float
|
|
197
|
+
bgra8unorm
|
|
198
|
+
`),p=e(`
|
|
199
|
+
bool
|
|
200
|
+
f16
|
|
201
|
+
f32
|
|
202
|
+
i32
|
|
203
|
+
sampler sampler_comparison
|
|
204
|
+
texture_depth_2d
|
|
205
|
+
texture_depth_2d_array
|
|
206
|
+
texture_depth_cube
|
|
207
|
+
texture_depth_cube_array
|
|
208
|
+
texture_depth_multisampled_2d
|
|
209
|
+
texture_external
|
|
210
|
+
texture_external
|
|
211
|
+
u32
|
|
212
|
+
`),d=e(`
|
|
213
|
+
array
|
|
214
|
+
atomic
|
|
215
|
+
mat2x2
|
|
216
|
+
mat2x3
|
|
217
|
+
mat2x4
|
|
218
|
+
mat3x2
|
|
219
|
+
mat3x3
|
|
220
|
+
mat3x4
|
|
221
|
+
mat4x2
|
|
222
|
+
mat4x3
|
|
223
|
+
mat4x4
|
|
224
|
+
ptr
|
|
225
|
+
texture_1d
|
|
226
|
+
texture_2d
|
|
227
|
+
texture_2d_array
|
|
228
|
+
texture_3d
|
|
229
|
+
texture_cube
|
|
230
|
+
texture_cube_array
|
|
231
|
+
texture_multisampled_2d
|
|
232
|
+
texture_storage_1d
|
|
233
|
+
texture_storage_2d
|
|
234
|
+
texture_storage_2d_array
|
|
235
|
+
texture_storage_3d
|
|
236
|
+
vec2
|
|
237
|
+
vec3
|
|
238
|
+
vec4
|
|
239
|
+
`),x=e(`
|
|
240
|
+
vec2i vec3i vec4i
|
|
241
|
+
vec2u vec3u vec4u
|
|
242
|
+
vec2f vec3f vec4f
|
|
243
|
+
vec2h vec3h vec4h
|
|
244
|
+
mat2x2f mat2x3f mat2x4f
|
|
245
|
+
mat3x2f mat3x3f mat3x4f
|
|
246
|
+
mat4x2f mat4x3f mat4x4f
|
|
247
|
+
mat2x2h mat2x3h mat2x4h
|
|
248
|
+
mat3x2h mat3x3h mat3x4h
|
|
249
|
+
mat4x2h mat4x3h mat4x4h
|
|
250
|
+
`),f=e(`
|
|
251
|
+
bitcast all any select arrayLength abs acos acosh asin asinh atan atanh atan2
|
|
252
|
+
ceil clamp cos cosh countLeadingZeros countOneBits countTrailingZeros cross
|
|
253
|
+
degrees determinant distance dot exp exp2 extractBits faceForward firstLeadingBit
|
|
254
|
+
firstTrailingBit floor fma fract frexp inverseBits inverseSqrt ldexp length
|
|
255
|
+
log log2 max min mix modf normalize pow quantizeToF16 radians reflect refract
|
|
256
|
+
reverseBits round saturate sign sin sinh smoothstep sqrt step tan tanh transpose
|
|
257
|
+
trunc dpdx dpdxCoarse dpdxFine dpdy dpdyCoarse dpdyFine fwidth fwidthCoarse fwidthFine
|
|
258
|
+
textureDimensions textureGather textureGatherCompare textureLoad textureNumLayers
|
|
259
|
+
textureNumLevels textureNumSamples textureSample textureSampleBias textureSampleCompare
|
|
260
|
+
textureSampleCompareLevel textureSampleGrad textureSampleLevel textureSampleBaseClampToEdge
|
|
261
|
+
textureStore atomicLoad atomicStore atomicAdd atomicSub atomicMax atomicMin
|
|
262
|
+
atomicAnd atomicOr atomicXor atomicExchange atomicCompareExchangeWeak pack4x8snorm
|
|
263
|
+
pack4x8unorm pack2x16snorm pack2x16unorm pack2x16float unpack4x8snorm unpack4x8unorm
|
|
264
|
+
unpack2x16snorm unpack2x16unorm unpack2x16float storageBarrier workgroupBarrier
|
|
265
|
+
workgroupUniformLoad
|
|
266
|
+
`),_=e(`
|
|
267
|
+
&
|
|
268
|
+
&&
|
|
269
|
+
->
|
|
270
|
+
/
|
|
271
|
+
=
|
|
272
|
+
==
|
|
273
|
+
!=
|
|
274
|
+
>
|
|
275
|
+
>=
|
|
276
|
+
<
|
|
277
|
+
<=
|
|
278
|
+
%
|
|
279
|
+
-
|
|
280
|
+
--
|
|
281
|
+
+
|
|
282
|
+
++
|
|
283
|
+
|
|
|
284
|
+
||
|
|
285
|
+
*
|
|
286
|
+
<<
|
|
287
|
+
>>
|
|
288
|
+
+=
|
|
289
|
+
-=
|
|
290
|
+
*=
|
|
291
|
+
/=
|
|
292
|
+
%=
|
|
293
|
+
&=
|
|
294
|
+
|=
|
|
295
|
+
^=
|
|
296
|
+
>>=
|
|
297
|
+
<<=
|
|
298
|
+
`),g=/enable|requires|diagnostic/,n=new RegExp("[_\\p{XID_Start}]\\p{XID_Continue}*","u"),t="variable.predefined",h={tokenPostfix:".wgsl",defaultToken:"invalid",unicode:!0,atoms:c,keywords:m,reserved:l,predeclared_enums:u,predeclared_types:p,predeclared_type_generators:d,predeclared_type_aliases:x,predeclared_intrinsics:f,operators:_,symbols:/[!%&*+\-\.\/:;<=>^|_~,]+/,tokenizer:{root:[[g,"keyword","@directive"],[n,{cases:{"@atoms":t,"@keywords":"keyword","@reserved":"invalid","@predeclared_enums":t,"@predeclared_types":t,"@predeclared_type_generators":t,"@predeclared_type_aliases":t,"@predeclared_intrinsics":t,"@default":"identifier"}}],{include:"@commentOrSpace"},{include:"@numbers"},[/[{}()\[\]]/,"@brackets"],["@","annotation","@attribute"],[/@symbols/,{cases:{"@operators":"operator","@default":"delimiter"}}],[/./,"invalid"]],commentOrSpace:[[/\s+/,"white"],[/\/\*/,"comment","@blockComment"],[/\/\/.*$/,"comment"]],blockComment:[[/[^\/*]+/,"comment"],[/\/\*/,"comment","@push"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],attribute:[{include:"@commentOrSpace"},[/\w+/,"annotation","@pop"]],directive:[{include:"@commentOrSpace"},[/[()]/,"@brackets"],[/,/,"delimiter"],[n,"meta.content"],[/;/,"delimiter","@pop"]],numbers:[[/0[fh]/,"number.float"],[/[1-9][0-9]*[fh]/,"number.float"],[/[0-9]*\.[0-9]+([eE][+-]?[0-9]+)?[fh]?/,"number.float"],[/[0-9]+\.[0-9]*([eE][+-]?[0-9]+)?[fh]?/,"number.float"],[/[0-9]+[eE][+-]?[0-9]+[fh]?/,"number.float"],[/0[xX][0-9a-fA-F]*\.[0-9a-fA-F]+(?:[pP][+-]?[0-9]+[fh]?)?/,"number.hex"],[/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*(?:[pP][+-]?[0-9]+[fh]?)?/,"number.hex"],[/0[xX][0-9a-fA-F]+[pP][+-]?[0-9]+[fh]?/,"number.hex"],[/0[xX][0-9a-fA-F]+[iu]?/,"number.hex"],[/[1-9][0-9]*[iu]?/,"number"],[/0[iu]?/,"number"]]}};a.conf=s,a.language=h,Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
define("vs/workers-DcJshg-q",["exports","./editor.api-CalNCsUg"],(function(c,a){"use strict";function l(e,o){const r=globalThis.MonacoEnvironment;if(r?.createTrustedTypesPolicy)try{return r.createTrustedTypesPolicy(e,o)}catch(t){console.error(t);return}try{return globalThis.trustedTypes?.createPolicy(e,o)}catch(t){console.error(t);return}}let n;typeof self=="object"&&self.constructor&&self.constructor.name==="DedicatedWorkerGlobalScope"&&globalThis.workerttPolicy!==void 0?n=globalThis.workerttPolicy:n=l("defaultWorkerFactory",{createScriptURL:e=>e});function i(e){const o=e.label,r=globalThis.MonacoEnvironment;if(r){if(typeof r.getWorker=="function")return r.getWorker("workerMain.js",o);if(typeof r.getWorkerUrl=="function"){const t=r.getWorkerUrl("workerMain.js",o);return new Worker(n?n.createScriptURL(t):t,{name:o,type:"module"})}}if(e.createWorker)return e.createWorker();throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}function s(e){const o=Promise.resolve(i({label:e.label??"monaco-editor-worker",moduleId:e.moduleId,createWorker:e.createWorker})).then(r=>(r.postMessage("ignore"),r.postMessage(e.createData),r));return a.editor.createWebWorker({worker:o,host:e.host,keepIdleModels:e.keepIdleModels})}c.createWebWorker=s}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
define("vs/xml-CdsdnY8S",["exports","./editor.api-CalNCsUg"],(function(e,t){"use strict";const n={comments:{blockComment:["<!--","-->"]},brackets:[["<",">"]],autoClosingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],surroundingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],onEnterRules:[{beforeText:new RegExp("<([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:t.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:t.languages.IndentAction.Indent}}]},a={defaultToken:"",tokenPostfix:".xml",ignoreCase:!0,qualifiedName:/(?:[\w\.\-]+:)?[\w\.\-]+/,tokenizer:{root:[[/[^<&]+/,""],{include:"@whitespace"},[/(<)(@qualifiedName)/,[{token:"delimiter"},{token:"tag",next:"@tag"}]],[/(<\/)(@qualifiedName)(\s*)(>)/,[{token:"delimiter"},{token:"tag"},"",{token:"delimiter"}]],[/(<\?)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/(<\!)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/<\!\[CDATA\[/,{token:"delimiter.cdata",next:"@cdata"}],[/&\w+;/,"string.escape"]],cdata:[[/[^\]]+/,""],[/\]\]>/,{token:"delimiter.cdata",next:"@pop"}],[/\]/,""]],tag:[[/[ \t\r\n]+/,""],[/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/,["attribute.name","","attribute.value"]],[/@qualifiedName/,"attribute.name"],[/\?>/,{token:"delimiter",next:"@pop"}],[/(\/)(>)/,[{token:"tag"},{token:"delimiter",next:"@pop"}]],[/>/,{token:"delimiter",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[/<!--/,{token:"comment",next:"@comment"}]],comment:[[/[^<\-]+/,"comment.content"],[/-->/,{token:"comment",next:"@pop"}],[/<!--/,"comment.content.invalid"],[/[<\-]/,"comment.content"]]}};e.conf=n,e.language=a,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
define("vs/yaml-DYGvmE88",["exports","./editor.api-CalNCsUg"],(function(e,n){"use strict";const t={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{offSide:!0},onEnterRules:[{beforeText:/:\s*$/,action:{indentAction:n.languages.IndentAction.Indent}}]},o={tokenPostfix:".yaml",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.square",open:"[",close:"]"}],keywords:["true","True","TRUE","false","False","FALSE","null","Null","Null","~"],numberInteger:/(?:0|[+-]?[0-9]+)/,numberFloat:/(?:0|[+-]?[0-9]+)(?:\.[0-9]+)?(?:e[-+][1-9][0-9]*)?/,numberOctal:/0o[0-7]+/,numberHex:/0x[0-9a-fA-F]+/,numberInfinity:/[+-]?\.(?:inf|Inf|INF)/,numberNaN:/\.(?:nan|Nan|NAN)/,numberDate:/\d{4}-\d\d-\d\d([Tt ]\d\d:\d\d:\d\d(\.\d+)?(( ?[+-]\d\d?(:\d\d)?)|Z)?)?/,escapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,tokenizer:{root:[{include:"@whitespace"},{include:"@comment"},[/%[^ ]+.*$/,"meta.directive"],[/---/,"operators.directivesEnd"],[/\.{3}/,"operators.documentEnd"],[/[-?:](?= )/,"operators"],{include:"@anchor"},{include:"@tagHandle"},{include:"@flowCollections"},{include:"@blockStyle"},[/@numberInteger(?![ \t]*\S+)/,"number"],[/@numberFloat(?![ \t]*\S+)/,"number.float"],[/@numberOctal(?![ \t]*\S+)/,"number.octal"],[/@numberHex(?![ \t]*\S+)/,"number.hex"],[/@numberInfinity(?![ \t]*\S+)/,"number.infinity"],[/@numberNaN(?![ \t]*\S+)/,"number.nan"],[/@numberDate(?![ \t]*\S+)/,"number.date"],[/(".*?"|'.*?'|[^#'"]*?)([ \t]*)(:)( |$)/,["type","white","operators","white"]],{include:"@flowScalars"},[/.+?(?=(\s+#|$))/,{cases:{"@keywords":"keyword","@default":"string"}}]],object:[{include:"@whitespace"},{include:"@comment"},[/\}/,"@brackets","@pop"],[/,/,"delimiter.comma"],[/:(?= )/,"operators"],[/(?:".*?"|'.*?'|[^,\{\[]+?)(?=: )/,"type"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\},]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],array:[{include:"@whitespace"},{include:"@comment"},[/\]/,"@brackets","@pop"],[/,/,"delimiter.comma"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\],]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],multiString:[[/^( +).+$/,"string","@multiStringContinued.$1"]],multiStringContinued:[[/^( *).+$/,{cases:{"$1==$S2":"string","@default":{token:"@rematch",next:"@popall"}}}]],whitespace:[[/[ \t\r\n]+/,"white"]],comment:[[/#.*$/,"comment"]],flowCollections:[[/\[/,"@brackets","@array"],[/\{/,"@brackets","@object"]],flowScalars:[[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/'[^']*'/,"string"],[/"/,"string","@doubleQuotedString"]],doubleQuotedString:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],blockStyle:[[/[>|][0-9]*[+-]?$/,"operators","@multiString"]],flowNumber:[[/@numberInteger(?=[ \t]*[,\]\}])/,"number"],[/@numberFloat(?=[ \t]*[,\]\}])/,"number.float"],[/@numberOctal(?=[ \t]*[,\]\}])/,"number.octal"],[/@numberHex(?=[ \t]*[,\]\}])/,"number.hex"],[/@numberInfinity(?=[ \t]*[,\]\}])/,"number.infinity"],[/@numberNaN(?=[ \t]*[,\]\}])/,"number.nan"],[/@numberDate(?=[ \t]*[,\]\}])/,"number.date"]],tagHandle:[[/\![^ ]*/,"tag"]],anchor:[[/[&*][^ ]+/,"namespace"]]}};e.conf=t,e.language=o,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));
|
package/bin/halo.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const emit = process.emitWarning.bind(process)
|
|
3
|
+
process.emitWarning = (warning, ...args) => {
|
|
4
|
+
const o = args[0]
|
|
5
|
+
const type = typeof o === 'string' ? o : o && o.type
|
|
6
|
+
if (type === 'ExperimentalWarning' || type === 'DeprecationWarning') return
|
|
7
|
+
return emit(warning, ...args)
|
|
8
|
+
}
|
|
9
|
+
await import('../dist/index.js')
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# Agent — Design
|
|
2
|
+
|
|
3
|
+
Agent instances, lifecycle, tools, and message formats.
|
|
4
|
+
|
|
5
|
+
## Agent instance
|
|
6
|
+
|
|
7
|
+
Each session is 1:1 with a `ModelRuntime`. `ModelRuntime` is a provider-agnostic interface; `agent.yaml`'s `model.provider` selects the concrete implementation.
|
|
8
|
+
|
|
9
|
+
**Files**:
|
|
10
|
+
- [packages/server/src/agents/model-runtime.ts](../../../packages/server/src/agents/model-runtime.ts) — the interface plus the `createModelRuntime(providerId, cfg)` dispatcher
|
|
11
|
+
- [packages/server/src/agents/bedrock-agent.ts](../../../packages/server/src/agents/bedrock-agent.ts) — the `aws-bedrock-claude-invoke` implementation (uses Bedrock InvokeModel, non-streaming)
|
|
12
|
+
|
|
13
|
+
### State
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
messages: AnthropicMessage[] ← full conversation history (external code can mutate for compact/repair)
|
|
17
|
+
run(input, opts): AsyncGenerator ← the only public entry point
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Each provider's SDK client and config details are encapsulated inside its runtime implementation; session-manager does not see them.
|
|
21
|
+
|
|
22
|
+
### Core loop
|
|
23
|
+
|
|
24
|
+
`*run(input, {cancelSignal})` — async generator (non-streaming):
|
|
25
|
+
1. Append the user message to `messages`
|
|
26
|
+
2. `callModel()` → invoke the provider API, get complete response
|
|
27
|
+
3. Yield `thinking` / `text` / `usage` / `tool_call` events
|
|
28
|
+
4. If `stop_reason=tool_use` → execute tools, yield `tool_result` events → loop
|
|
29
|
+
5. Otherwise yield a `stop` event and return
|
|
30
|
+
|
|
31
|
+
### Adding a new provider
|
|
32
|
+
|
|
33
|
+
1. Write the model manifest and capabilities at `~/.halo/global/models/<providerId>.yaml` (see `aws-bedrock-claude-invoke.yaml` for shape)
|
|
34
|
+
2. Add a case to the switch in `model-runtime.ts` returning a class that implements `ModelRuntime`
|
|
35
|
+
3. Nothing else changes — session-manager will automatically route by `agent.yaml`'s `model.provider`
|
|
36
|
+
|
|
37
|
+
## Agent build pipeline (SessionManager.buildAgentInstance)
|
|
38
|
+
|
|
39
|
+
1. Load `agent.yaml` (workspace > global)
|
|
40
|
+
2. Resolve `model.provider`, `model.id`, `model.endpoint` — all three **must** be specified in `agent.yaml`; missing any one throws an error (no defaults)
|
|
41
|
+
3. Filter the workspace tool set by `yaml.tools`
|
|
42
|
+
4. Build the system prompt: AGENT.md > YAML `system_prompt` > built-in default
|
|
43
|
+
5. Inject the MD layers (USER.md / AGENT.md / INSTRUCTIONS.md chain / INDEX.md)
|
|
44
|
+
6. **Render AGENT.md placeholders**: `{{var}}` / `{{<skill-id>.params.<key>}}` / `<<ENV>>` substitution (see [prompt-system.md](prompt-system.md#placeholder-rendering-pipeline))
|
|
45
|
+
7. Inject skill metadata (use `activate_skill` to load the full body on demand)
|
|
46
|
+
8. `createModelRuntime(providerId, {modelId, endpoint, systemPrompt, tools, ...})`
|
|
47
|
+
|
|
48
|
+
See [prompt-system.md](prompt-system.md).
|
|
49
|
+
|
|
50
|
+
## Session tools
|
|
51
|
+
|
|
52
|
+
Agents manage other sessions with these tools. The whole 8-tool bundle is granted automatically by a non-empty `team` in `agent.yaml` (listing them under `tools:` has no effect); the `team` ids also scope who's reachable. Full schema in [dev/tools.md](../dev/tools.md#session-tools), gating in [prompt-system.md](prompt-system.md#agent-roster).
|
|
53
|
+
|
|
54
|
+
| Tool | Purpose |
|
|
55
|
+
|------|---------|
|
|
56
|
+
| `start_session` | Start a new sub-session asynchronously; auto-reports to its parent when done |
|
|
57
|
+
| `session_list` | List the current session's children and their status |
|
|
58
|
+
| `query_session` | Send a message to another session (runs immediately if idle, queues if busy) |
|
|
59
|
+
| `interrupt_session` | Enqueue a message + immediately abort the in-flight turn so the queue drains now (= `query_session` + abort) |
|
|
60
|
+
| `stop_session` | Fold the queue into history (preserve, don't drop) + abort + repair, no re-run |
|
|
61
|
+
| `archive_session` | Archive a session and all its descendants (sets archivedAt) |
|
|
62
|
+
| `get_session_output` | Read the latest text output of a session |
|
|
63
|
+
| `query_agent` | Get an agent's full details (AGENT.md, YAML config, skills); team-gated to the agent's roster |
|
|
64
|
+
|
|
65
|
+
Plus the workspace tools for direct work. The tool set varies by access level and bwrap availability:
|
|
66
|
+
|
|
67
|
+
| Level | Tools (with bwrap) | Tools (without bwrap) |
|
|
68
|
+
|---|---|---|
|
|
69
|
+
| `full` | All 9 tools | All 9 tools |
|
|
70
|
+
| `workspace` | All 9 tools | All 9 tools |
|
|
71
|
+
| `readonly` | All 9 tools | file_read, view_image, file_list, grep, glob (5 tools) |
|
|
72
|
+
|
|
73
|
+
`view_image` is also vision-gated: models that don't declare `capabilities.image: true` get the same lists minus `view_image`, so the model never sees a tool that would 400 the moment it called it. See [dev/tools.md](../dev/tools.md#view_image).
|
|
74
|
+
|
|
75
|
+
When `accessLevel` is not `full`, tool execution is routed through a bwrap sandbox (`packages/server/src/tools/sandbox.ts`):
|
|
76
|
+
- Base: `--ro-bind / /` (entire filesystem read-only) + `--tmpfs /tmp` (isolated writable temp)
|
|
77
|
+
- Sensitive paths hidden via tmpfs/devnull overlays — configurable in `settings.yaml general.sandbox.hidden_dirs/hidden_files` (scope: global only, workspace cannot override)
|
|
78
|
+
- `workspace`: workspace directory overridden with `--bind` (rw)
|
|
79
|
+
- `readonly`: workspace stays ro from the root bind; without bwrap, tool set is reduced to 5 read-only tools
|
|
80
|
+
- Error sanitization: sandbox internals (bwrap flags, mount details) are stripped from error messages before reaching the agent
|
|
81
|
+
|
|
82
|
+
When bwrap is not installed, app-level path validation (`assertPathAllowed`) enforces workspace + `~/.halo/global/` boundaries. `shell_exec` is blocked entirely without bwrap for non-full sessions.
|
|
83
|
+
|
|
84
|
+
**`activate_skill`**: auto-injected whenever the YAML has a non-empty `skills` list (does **not** need to be declared in `tools`). It loads the full SKILL.md on demand. Disabled skills are excluded.
|
|
85
|
+
|
|
86
|
+
## Root agent rule
|
|
87
|
+
|
|
88
|
+
Root agent = `!parentId` (i.e. `parentId === null`).
|
|
89
|
+
|
|
90
|
+
| Injected content | Root agent | Sub-agent |
|
|
91
|
+
|---|---|---|
|
|
92
|
+
| USER.md | ✓ | ✗ |
|
|
93
|
+
| AGENT.md | ✓ | ✓ |
|
|
94
|
+
| INSTRUCTIONS.md (global + per-level) | ✓ | ✓ |
|
|
95
|
+
| INDEX.md (project root) | ✓ | ✓ |
|
|
96
|
+
| `prompts/all/` | ✓ | ✓ |
|
|
97
|
+
| `prompts/root/` | ✓ | ✗ |
|
|
98
|
+
| `prompts/bootstrap/` | ✓ (only when needsBootstrap) | ✗ |
|
|
99
|
+
| `"workspace at..."` | ✓ | ✓ |
|
|
100
|
+
| `"Working directory: ..."` | only when workingDir ≠ root | always |
|
|
101
|
+
|
|
102
|
+
Seed default agent: id `default`, priority 99. The chat panel auto-selects the highest-priority agent when no session is active and the user hasn't picked one manually, so `default` wins as long as no other agent is configured with `priority > 99`.
|
|
103
|
+
|
|
104
|
+
## Scaffolding new agents (`buildScaffoldModelBlock`)
|
|
105
|
+
|
|
106
|
+
When the admin UI creates a new agent (POST `/agent-configs`) or seeds the default agent on first run, the `model:` block in the freshly written `agent.yaml` is generated, not hard-coded. Sources, in order:
|
|
107
|
+
|
|
108
|
+
1. **Provider** — `general.agent.default_provider` from `settings.yaml` (Settings → General). Fallback chain: configured value → `aws-bedrock-claude-invoke` if installed → first provider on disk.
|
|
109
|
+
2. **Model id, endpoint, prompt-caching TTL, thinking defaults** — read from that provider's YAML in `<global>/models/<id>.yaml`:
|
|
110
|
+
- `defaultModelId` → `model.id`
|
|
111
|
+
- `defaultEndpoint` → `model.endpoint`
|
|
112
|
+
- The selected model's `capabilities.promptCaching.default` → `model.promptCaching`
|
|
113
|
+
- `capabilities.thinking.defaultEnabled / default / defaultBudgetTokens` → `model.thinking.{enabled, effort, budget_tokens}`
|
|
114
|
+
|
|
115
|
+
The provider YAML is the single source of truth. Existing `agent.yaml` files are never rewritten when the General default is changed — the setting only affects subsequently-scaffolded agents. Implementation: [packages/server/src/routes/agent-configs.ts](../../../packages/server/src/routes/agent-configs.ts) `buildScaffoldModelBlock()`.
|
|
116
|
+
|
|
117
|
+
## Graceful interrupt (message queueing)
|
|
118
|
+
|
|
119
|
+
When the user sends a new message while the agent is working (the **soft** interrupt):
|
|
120
|
+
1. The message is pushed onto the single `messageQueue` (no `sourceSessionId` — it's a user entry) and `interruptRequested` is set
|
|
121
|
+
2. Inside `runAgentTurn`'s event loop, when `event.type === 'tool_result'` and `interruptRequested` is true → `abortController.abort('interrupt')` — the abort waits for the current tool, so a mid-flight `shell_exec` is **not** killed
|
|
122
|
+
3. The loop terminates (AbortError or cancelled)
|
|
123
|
+
4. **Conversation repair** (`repairConversationMessages`) cleans up orphan `toolUse` / `toolResult` blocks
|
|
124
|
+
5. Control returns to `runSession`, whose `drainQueue` folds the queued message into one merged follow-up turn
|
|
125
|
+
|
|
126
|
+
**Hard stop** is the Stop button — immediate abort, then repair. It does **not** discard the queue: the un-drained messages are folded into history first so nothing is lost (see the three-tier interrupt model + stop/archive contrast in [session.md](session.md#message-queue-and-drain)).
|
|
127
|
+
|
|
128
|
+
## Limits
|
|
129
|
+
|
|
130
|
+
Source: `packages/server/src/config.ts`
|
|
131
|
+
|
|
132
|
+
| Config | Default | Description |
|
|
133
|
+
|---|---|---|
|
|
134
|
+
| `model.maxContextTokens` | 200,000 | Max context window (env: `HALO_MAX_CONTEXT_TOKENS`) |
|
|
135
|
+
| `model.compressAt` | 0.8 | Auto-compact threshold (80%) |
|
|
136
|
+
| `agent.maxRetries` | 5 | Max retry count (settings: `general.agent.max_retries`) |
|
|
137
|
+
| `session.maxCachedSessions` | 50 | In-memory session cache (env: `HALO_MAX_CACHED_SESSIONS`) |
|
|
138
|
+
| `session.maxQueueSize` | 256 | inter-session message queue cap (settings: `general.session.max_queue_size`) |
|
|
139
|
+
| `session.maxNestingDepth` | 16 | Max session nesting depth (settings: `general.session.max_nesting_depth`) |
|
|
140
|
+
|
|
141
|
+
Note: there is no `model.defaultModelId` — model ID must be specified per-agent in `agent.yaml`.
|
|
142
|
+
|
|
143
|
+
## Error handling
|
|
144
|
+
|
|
145
|
+
When a sub-agent session crashes, the error is auto-reported back to its parent through the `.then()` callback chain — the parent never silently loses work.
|