Commit Graph
25 Commits
Author SHA1 Message Date
chenchenandClaude Opus 4.8 c3f51fe479 feat: wire swarm stop to runtime + add events SSE stream (#45/#46)
契约已冻结(agent_swarm#14 runtime-contract v1 / #15 event-schema v1),HM 侧据此
落地两项原本 deferred 的能力,叠在读侧适配(PR #59)之上:

- stop(#45):HeicodeStopSwarm 真实调用运行时冻结路径
  POST /api/agent/swarm/deployments/{deployment_id}/stop,复用 agent_runtime_client
  的配置/URL/信封解析;Bearer SWARM_RUNTIME_SERVICE_TOKEN + X-Idempotency-Key 幂等。
  仅 SWARM_RUNTIME_ENABLED=true 且配齐 base_url+token 时发起,否则 POLICY_REJECTED,
  绝不伪造 accepted;终态不抢写,由 swarm.stopped 回调写回。
- events SSE(#46 读侧):GET /api/heicode/swarms/:id/events/stream?after=,与
  events?after 同源(HM 持久化回调事件,按 user_id 收口 + payload 脱敏),命中终态
  (swarm.completed/failed/stopped)/客户端断开/超时(30min)收流。不调运行时。
- docs:刷新 heicode-swarm-deferred.md(登记冻结契约、读侧/stop/SSE 已落地、唯一剩余
  计费缺口 #60)与 heicode-desktop-client-api.md §5.2(SSE + stop 端点)。

影响面:Client(新增 SSE 端点 + stop 行为变化)、agent_swarm(按冻结契约调用其 stop)。
不涉及 Manager↔AM、密钥、计费扣费逻辑(计费缺口 #60 仍阻塞于 agent_swarm#16)。
测试:callSwarmRuntimeStop(httptest 校验路径/鉴权/幂等头/信封解析/错误路径/runtime
id 回退)+ swarmEventIsTerminal;go build ./... 与 controller 测试全绿。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-10 21:43:00 +08:00
chenchenandClaude Opus 4.8 292504735e feat(swarm): add goal_summary to swarm status view (#45/#28 consumer ask)
@Mem0ried 客户端 consumer 验收(#59)指出 GET /swarms/:id 缺 goal_summary —— Run 列表
只能显示 deployment_id/status,体验差。补:swarmDeploymentView 增加 goal_summary,从持久化
plan_json 顶层 objective 提取,折叠空白为单行 + 截断(200 rune)+ RedactText 兜底;取不到
(无 plan / 无 objective / 坏 JSON)返回空串,不臆造。list 与 detail 同走 swarmDeploymentView,
两处都带上。

文档 docs/integration/heicode-desktop-client-api.md §5.2 状态样例补 goal_summary 字段说明。
测试 TestSwarmGoalSummary 覆盖:空/坏 JSON/无 objective→空;多行多空格折叠;误入 sk- 被脱敏;
超长截断带省略号。go build ./... 与 controller 测试全绿。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-10 21:17:32 +08:00
chenchenandClaude Opus 4.8 56a9b02a25 feat(swarm): adopt frozen agent_swarm contract v1 (read-side) (#45/#46)
按 agent_swarm#14/#15 冻结契约做 HM 读侧适配(客户端 #28 消费):
- 注册 6 类新事件(event-schema v1):swarm.completed/failed/stopped、approval.approved/rejected、
  handoff.created(categories + requiredFields 两表;必填先最小集,待 agent_swarm PR #28 §4 精校)。
- AgentCallbackEvent 增 Sequence(per-swarm 严格递增序号),回调入库透传 envelope.sequence;
  事件视图暴露 sequence 供客户端去重/排序。游标仍用稳定 id(next_after)避免 sequence 未全量
  上线时回归。
- 脱敏键补 credential_ref/signing_secret_ref(envelope 按设计透传 azkv:// 引用,客户端视图剔除)。
- artifact.created → 扁平视图 {uri,checksum,task_id,size_bytes?,created_at}(无 secret_ref;
  size 未知省略不伪造)。
- 状态展示映射 §4.1:display_status(blocked→degraded;不臆造 preparing/verifying)。

测试:状态映射、artifact 视图(脱敏 + size 省略)、6 类事件注册;controller+model 全回归通过,
go build/vet 干净。文档 §5.2 更新。

未含(下一 PR):stop 真实运行时接入(写路径,复用 agentRuntimeClientConfigForMode("swarm"))。

Affects: Manager only(只读查询契约适配)。AgentCallbackEvent 加列(AutoMigrate);无计费改动。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 18:01:32 +08:00
FastheiandGitHub 3af911257f Merge pull request #56 from xmindlab-heicode/feat/agent-endpoint-security-scheme
feat(agent): return A2A endpoint security scheme/profile (#55)
2026-06-10 16:27:34 +08:00
chenchenandClaude Opus 4.8 2500f17189 feat(agent): return A2A endpoint security scheme/profile (#55)
客户端 #25/#55:A2A 直连方需 Manager 在 agent endpoint 元数据给出安全通道信息,才能在
生产强制 HTTPS。agent 对象(列表/详情/部署/状态返回)新增 security:
- scheme: http | https(从 subdomain 推断)
- security_profile: none | tls(显式 https→tls;http 或裸主机→none)
- secure: profile != none

保守口径:无法确证 TLS 即 none,宁可客户端在生产拒绝也不回传"看似安全"的明文端点。
客户端置 HEICODE_AGENT_REQUIRE_SECURE=1 即据此强制(secure=false→拒绝)。AM 上 HTTPS/mTLS
listener(azgy)后 profile 自动变 tls,客户端无需改包。元数据不含任何 secret_ref。

纯函数 agentEndpointSecurity + 单测;文档 §5/§6 更新。Manager only,无计费/审计改动。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 15:37:28 +08:00
FastheiandGitHub 33f60922cb Merge branch 'main' into feat/preflight-confirm-audit-version 2026-06-10 15:36:14 +08:00
chenchenandClaude Opus 4.8 19640b44f5 fix(preflight): address #41 review — persisted confirmation, deploy ready re-check, template-aware version
回应 Fasthei 复审(PR #51 CHANGES_REQUESTED):
1. 持久化确认记录(强一致):新增 model.PreflightConfirmation 表 + InsertPreflightConfirmation +
   PreflightConfirmationExists。confirm 时落库(默认 TTL=HEICODE_PREFLIGHT_CONFIRMATION_TTL_SECONDS
   =3600s,可设 0 不过期),写失败直接报错(非 best-effort)。部署侧要求该版本存在未过期确认记录
   → 杜绝直接拿 GET version 绕过 confirm/审计。
2. 部署重新校验 Ready:verifyDeployPreflight 增加 summary.Ready 检查 —— 预算/agent_slot 等
   易变项不进版本哈希,故部署时重查,防 confirm 后余额耗尽/槽位占满仍启动。
3. 版本哈希纳入模板安全面:computePreflightVersion 加 tplDigest(definition+model+name 摘要),
   管理员改同一 template_key 的 definition/model 后旧确认失效。补 TestComputePreflightVersion_ChangesOnTemplateEdit。
4. 审计降为附加流:强一致确认记录作为部署门禁;审计 preflight.confirmed 互补。

测试:PreflightConfirmationExists(命中/版本不符/跨用户/过期/不过期/空参)、PreflightBindingKey、
模板变更翻转版本。TestMain + 生产迁移注册 PreflightConfirmation。controller+model 全回归通过。
文档 §4.1.1 更新。

Affects: Manager only(新增 preflight_confirmations 表 + 部署门禁强化)。无计费改动。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 15:28:07 +08:00
chenchen 64ba58357f Merge remote-tracking branch 'origin/main' into feat/preflight-confirm-audit-version 2026-06-10 15:21:37 +08:00
chenchenandClaude Opus 4.8 b9d9eddf7b fix(swarm): address #45 review — payload redaction, user-scoped events, no fake stop
回应 Fasthei 复审(PR #53 CHANGES_REQUESTED):
1. 事件 payload 脱敏:swarmEventView 经 sanitizeSwarmPayload —— 递归剔除
   secret_ref/credentials/token/api_key/private_key/access_key/password 及 plan/payload/
   permission_manifest/env 大字段,再跑 RedactText 兜底。绝不下发 azkv:// secret_ref 或
   sk-/Bearer(approval.requested 等 envelope 携带的凭据引用)。加 TestSanitizeSwarmPayload_*。
2. user 作用域:model.ListSwarmCallbackEventsAfter 增加 userID 参数 + WHERE user_id,
   controller 传入当前用户;防 runtime_swarm_id/deployment_id 碰撞或误写导致跨用户事件泄漏。
   测试补 user 隔离用例。
3. stop 不伪造成功:移除「开关打开返回 accepted:true」路径;未启用→POLICY_REJECTED,
   启用也→NOT_IMPLEMENTED(未转发运行时),直到 agent_swarm#2 冻结接上真实 stop。

文档 §5.2 同步(脱敏 / user 作用域 / stop 语义)。go build/vet 干净,controller+model 全回归通过。

Affects: Manager only(只读查询脱敏 + 写端点安全语义)。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 14:23:58 +08:00
chenchenandClaude Opus 4.8 59b13ba824 feat(swarm): HM-side Swarm Run read-only query — Phase1 (#45)
#45 Phase1 的只读查询(list/status/events?after/artifacts),全部基于 HM 已持久化的
运行时回调数据(Swarm → HM 带签名回调,见 agent_callback.go),**无需实时调 Swarm**,
因此不被 agent_swarm#2 契约冻结阻塞、返工风险低:

- GET /api/heicode/swarms — 列出当前用户的 swarm 运行(AgentDeployment, sub_mode=swarm 或有 runtime_swarm_id)
- GET /api/heicode/swarms/:id — 状态(:id = deployment_id/swarm_id/correlation_id 任一)
- GET /api/heicode/swarms/:id/events?after=&limit= — 事件增量拉取(id 游标 next_after,oldest-first)
  新增 model.ListSwarmCallbackEventsAfter(按 deployment_id/swarm_id + id>after)
- GET /api/heicode/swarms/:id/artifacts — 从已存事件(event_type 含 artifact)派生
- POST /api/heicode/swarms/:id/stop — 唯一写操作;在 agent_swarm#2 冻结 + SWARM_RUNTIME_ENABLED=true
  前默认关闭并明确提示(不臆造未冻结写接口)

字段口径对齐 agent_swarm/docs/integration/runtime-contract.md(deployment_id↔swarm_id↔
manager_deployment_id;状态机 waiting_approval→running→…)。所有查询按 user 作用域,视图脱敏
(不含 plan/payload 大字段与凭据)。

测试:TestListSwarmCallbackEventsAfter(游标/过滤/空标识);TestMain 迁移 AgentDeployment +
AgentCallbackEvent。go build/vet 干净,controller+model 全套回归通过。文档 §5.2。

Affects: Manager only(新增只读查询端点 + 一个 gated 写端点)。无计费/审计 schema 改动;
不依赖未冻结契约。stop 真实接入随 agent_swarm#2 冻结落地。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 13:24:34 +08:00
zsbgnw12andGitHub 9ff0a7f9c5 Merge pull request #38 from xmindlab-heicode/docs/client-api-available-models-telemetry-usage
docs(client-api): available-models + config + telemetry + agent usage + #30 billing semantics (#35)
2026-06-10 13:11:19 +08:00
chenchenandClaude Opus 4.8 9a073e5b41 feat(preflight): confirm + audit + tamper-proof version check (#41)
完成 preflight EPIC(#29)的最后一子项 #41:

- POST /api/heicode/preflight/confirm:重算摘要 → 仅 ready 时可确认 → 派生防篡改
  版本哈希 → 写审计事件 preflight.confirmed(谁/何时/哪个 version)→ 返回 version。
- 防篡改版本 computePreflightVersion:在**稳定安全面**(template + 资源
  binding_id/type/provider/name/status/has_secret + 高危 enum + 必需缺失项)上做
  sha256,刻意排除易变预算数字/agent_slot,避免版本无意义抖动。
- 部署校验:POST /api/heicode/agents 新增可选 preflight_version。默认仅在带了它时
  校验(向后兼容);HEICODE_PREFLIGHT_REQUIRED=true 时强制。确认后资源/模板/高危面
  漂移或被篡改 → 版本不匹配 → 部署拒绝。
- 重构:抽出 buildPreflightSummary(GET/confirm/deploy 共用);GET 现也回 version。

测试:版本确定性/稳定性(不随预算变)、资源篡改翻转版本、normalizeBindingIDs。
go build/vet 干净,controller preflight 测试全过。文档 §4.1/§4.1.1 更新。

Affects: Manager only(新增 confirm 端点 + 部署可选校验,默认向后兼容)。
无计费/审计 schema 改动(复用既有 agent_audit_events)。

Closes #41

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 12:55:40 +08:00
chenchenandClaude Opus 4.8 df83588720 docs(client-api): add budget_remaining to agent usage §5.1 (#9)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 11:36:14 +08:00
chenchenandClaude Opus 4.8 4502d6b5bc feat(preflight): read-only preflight checklist + execution summary (#39, #40)
新增 GET /api/heicode/preflight?template_id=&binding_ids=1,2,3 —— agent 启动前的统一
确认层(#29 EPIC 的 #39 缺失项检测 + #40 可读执行摘要):

- #39 缺失项检测:必需资源类别(git/sk/project_document/cloud_account)未绑定、budget
  (余额≤0)、agent_slot(在跑数达 tier 上限)。ready = missing 为空。
- #40 可读执行摘要:agent 角色、脱敏资源视图、高危操作、预算(剩余额度/quota_per_unit/
  tier 上限/当前在跑数)、审批策略。
  - 红线:resources 只暴露 type/provider/name/status/has_secret(布尔),绝不含
    secret_ref/channelId/base_url/price。
  - 高危操作固定 enum:production_deploy/db_write/cloud_resource_delete/
    production_secret/large_budget,由已绑资源类型推导,均 requires_approval。

判定逻辑抽为纯函数 computePreflight,单测覆盖:全缺失、就绪、槽位满、高危 enum、
敏感字段不泄露(序列化断言)。复用既有 ResourceBinding/模板/GetUserMaxAgents/部署门禁
口径,不改部署/计费逻辑。文档补 §4.1。

#41(confirm + 审计 + 防篡改版本校验)作为后续 POST /preflight/confirm 实现。

Affects: Manager only(新增只读端点)。无 Client/Swarm 代码改动,无计费/审计 schema 改动。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 11:29:34 +08:00
chenchenandClaude Opus 4.8 d2d9a22ae4 docs(client-api): add available-models, config, telemetry, agent usage + hidden-token billing semantics (#35, #30)
Bring docs/integration/heicode-desktop-client-api.md in lock-step with merged
endpoints:

- §3.1 /api/heicode/available-models: logged-in user model list is the single
  source of truth (no local presets / no CodeGW channel backend); exposes only
  model_id/display_name/default; forbidden fields enumerated.
- §5.1 /api/heicode/agents/{id}/usage: token-name aggregation, time window,
  empty-data semantics, relation to billing logs. Includes the #30 hidden agent
  model token billing-collection semantics: UnlimitedQuota only waives the
  token's own remaining-quota cap, it does NOT bypass user.Quota — HM still
  checks user quota and settles to wallet/subscription via the billing
  expression; token revoked on stop/delete; hidden from user UI but auditable.
- §7.1 /api/heicode/config: telemetry enabled/endpoint/max_batch/flush/retention_days.
- §7.2 /api/heicode/telemetry/events: default-off 410 kill switch, V2 device
  signature, top-level array 1-20 / <=256KB, server redaction, context field
  whitelist (#32), 4xx-drop/5xx-retry, retention; production enable-gate note.
- Updated §10 endpoint inventory.

Docs-only; no code change. heicodeDocs org-level sync tracked in #34.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 00:45:29 +08:00
chenchenandClaude Opus 4.8 c171bb70ee docs(integration): record 2026-06-04 end-to-end re-test against AM's updated runtime
AM shipped its updated runtime + fixes; live re-test confirms deploy → running
→ direct /health & /message/send (task completed) → stop → delete all pass, and
HM's per-agent access_token is minted + returned (non-empty UUID). Two AM-side
gaps remain: (1) the running agent does NOT enforce X-Agent-Access-Token
(no-token request still 200, agent card auth_required=None) — token isolation
not actually active; (2) subdomain is http:// (token + api_key in cleartext).
Contract §0.1 and client doc status notes updated accordingly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 23:50:09 +08:00
chenchenandClaude Opus 4.8 f128f4d03f docs(integration): professional accuracy pass on client + AM contract
- AM contract: fix stale lifecycle path defaults in the env-override table
  (/agents/{agent_id}, /agents/{agent_id}/stop — matches code, not the old
  /api/agent/... values); correct the self-check create line to POST /agents;
  align the verify-endpoint example to the real production response shape
  (user_id is a string, agent_id included, miss returns {valid:false}).
- Client API: §0 overview now states HM mints the per-agent access_token
  (AM no longer "returns" it).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 22:42:55 +08:00
chenchenandClaude Opus 4.8 b01bba53f0 docs(agent): lock client↔agent auth to option ① (agent-local token compare)
Per the chosen design, the agent authorizes callers by comparing the request
header X-Agent-Access-Token against its env AGENT_ACCESS_TOKEN (constant-time),
no HM round-trip. AM contract §3.1 now states ① as the agreed integration with
Python pseudo-code; the /agent-access/verify endpoint is demoted to an optional
fallback. Client API §6 spells out the client's job: send X-Agent-Access-Token
on every direct-connect request.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 22:23:41 +08:00
chenchenandClaude Opus 4.8 e326964362 feat(agent): per-agent client↔agent access token for per-user authorization
HM now mints a random per-agent access token at deploy, injects it into the
agent env (AGENT_ACCESS_TOKEN + HEICODE_AGENT_ID) and returns it to the
deploying client (agent list access_token). Only the owning user receives it,
so only they can drive the agent — closing the gap where any valid sk- could
drive any agent and exfiltrate its mounted resources.

AM authorizes the caller either locally (compare to its env token) or via the
new public POST /api/heicode/agent-access/verify {agent_id, access_token} ->
{valid, user_id} (constant-time compare, no info leak on miss). AM may opt out.

Docs: AM contract §3.1 + client API §6 updated; access_token no longer empty.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 21:58:10 +08:00
chenchenandClaude Opus 4.8 0b2aeac51d docs(integration): update client API doc to production-verified reality
Ran the full desktop-client flow against production (real account) and updated
the doc to the verified responses:
- capabilities model = gpt-5.4; modes still returned but ignored.
- agent object: access_token is "" (AM issues none — connect via A2A api_key),
  subdomain is a host (dep-xxx.taijiagnet.com), status starts Pending; real
  binding_ids; shown as "生产实测" examples.
- §4: clarified the template `model` field is a role-tier hint (opus), not the
  runtime model (gpt-5.4 injected at deploy).
- §5: stop currently fails / delete returns runtime_cleanup:"failed" (AM stop
  missing + delete bug); HM removes the local record regardless.
- §6: must wait for status=running / health 200 before connecting; noted the
  agent currently stays Pending and the subdomain isn't reachable yet (AM side).
- top banner: per-endpoint production verification note.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 17:07:30 +08:00
chenchenandClaude Opus 4.8 b33bcf90bd feat(device): desktop client self-logout endpoint
POST /api/devices/logout (UserOrV2DeviceAuth): a device-signed client revokes its
OWN bound token via the signed X-Heicode-Device-Id (cannot touch other devices);
a session/JWT caller may pass {device_id}. Idempotent. The existing DELETE
/api/devices/:id revoke is session-only, so device clients had no self-logout —
this closes that gap. Documented in the client API doc §1.1.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 16:15:47 +08:00
chenchenandClaude Opus 4.8 074a3cc7e7 feat(agent): align HM to AM's coding_a2a_agent contract
Adapt HM's template-agent integration to AM's actual CODING_A2A API (per their
doc), keeping it isolated in agent_template_runtime.go:

- start payload -> AM's POST /agents { name, template:"coding_a2a_agent",
  framework:"A2A", config:{user_id,...}, env } with the template .md folded into
  env.AGENT_INSTRUCTION_TEXT, template_key -> AGENT_ROLE_NAME, model gateway via
  OPENAI_BASE_URL + MODEL_NAME (OPENAI_API_KEY left to the client per A2A request).
- response parse -> access_info.domain/external_ip -> subdomain, namespace/name
  -> runtime_id; AM issues no access_token (client uses A2A api_key).
- env names aligned to AM: GIT_DEFAULT_BRANCH, POSTGRES_* (was PG_*),
  AZURE_BLOB_ACCOUNT_NAME/CONTAINER/ACCOUNT_KEY (was BLOB_*); source keys aligned
  to the resource-binding form (db_name/username/database_password/access_key).
  Only AM-supported types (git/mysql/postgres/azure-blob); vm/redis/mongo/bucket
  now rejected as unsupported until AM adds them.
- frontend: resources page splits DB into MySQL/PostgreSQL (correct provider),
  drops vm; deploy page hides unsupported resource types.
- docs: AM contract + client doc updated to the real env names, payload, and the
  A2A direct-connect (message/send · message/stream) + api_key auth.
- tests updated for the new env names + AM payload/response shape. All green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 15:30:33 +08:00
chenchenandClaude Opus 4.8 479cd61a07 docs(integration): complete + correct the desktop client API doc
Review of the client doc against the real code found and fixed:
- §1 auth was not self-contained (deferred the canonical to the deprecated doc).
  Inlined the full signing contract verified against middleware/device_signature.go:
  the exact header set, the fixed-order canonical string (method/path/ts/nonce/
  fingerprint/eph_pubkey/sha256(body)), ed25519(sha256(canonical)), the heicode-aead-v1
  encrypted-body rules, and the X-Heicode-Auth-Error / X-Heicode-Server-Time failure
  headers.
- §2 auth mismatch (accuracy bug): /api/user/self is UserAuth (session/JWT), NOT
  device-signed — a device-only client cannot call it. Marked it optional and
  clarified the two different auth schemes (/api/user/self* vs /api/heicode/*).
- §8: documented that failures return HTTP 200 with success:false (client MUST
  read success), and that error.retryable is always false (decide retry by code).
- §10 inventory: corrected /api/user/self auth + added /self/models.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 10:57:43 +08:00
chenchenandClaude Opus 4.8 15b17f39b0 docs: remove obsolete 普通 sub (old model) integration docs
The 普通 sub task-orchestration model was replaced by the template-agent model
and its backend deleted. Removed the now-obsolete docs describing it:
- heicode-desktop-sub-agile-api.md, heicode-desktop-subagile-e2e-demo.md
- heicode-desktop-unified-api.md, heicode-sub-mode-flow-spec.md
- 普通sub敏捷模式-AgentManager对接任务清单.md
- AgentManager普通sub{产物回调缺失问题,剩余补充要求,联调整改要求}.md

Fixed dangling references in the new docs (client-api / template-agent-model).
Swarm (蜂群) docs kept — different mode, out of scope.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 09:56:17 +08:00
chenchenandClaude Opus 4.8 c4e84258b7 docs(integration): desktop client API doc for the template-agent model
New authoritative client doc (heicode-desktop-client-api.md): the desktop client
lists its agents from HM, gets each agent's subdomain + access_token, and
connects to the agent directly over SSE; models for both client and agent go
through HM /v1/*. Grounded in the production-verified responses (19 Chinese
templates, agent list/deploy/status shapes, error codes). Marks the old
unified-api doc (sub task-orchestration) as superseded.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 00:41:07 +08:00