Commit Graph
39 Commits
Author SHA1 Message Date
chenchenandClaude Opus 4.8 c19d04555c docs(integration): re-plan sub-mode flow now that the client is itself agentic
Re-examined the whole spec under the corrected model (client = Claude-Code-
like agentic program, not a shell):
- New §0.2: what sub mode IS and when to use it — local mode (client runs an
  agent on the user machine) vs sub mode (offload a multi-agent job to cloud
  AM). Client in sub mode = initiator + work viewer + local artifact/deploy.
- §2: added the model-call channel that was entirely missing — both client and
  AM call HM /v1/* for models (a parallel channel to the task control plane).
- §3.7: iteration now has two paths — (A) send back to cloud AM, or (B) git
  pull and fix locally with the client own agent (reuses local capability).
- Scope + client TODO updated to reflect the client agentic role.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 22:06:47 +08:00
chenchenandClaude Opus 4.8 5b0bf438e4 docs(integration): fix core architecture framing — client is Claude-Code-like; HM is the model gateway
Correct a fundamental mislabel: the desktop client is an agentic coding
program (like Claude Code) that runs agents and executes commands locally —
not a dumb shell. HM is the model-call gateway (new-api /v1/*) that BOTH the
desktop client and agent_management call to use models; HM does not run agents
itself. AI = the model, served by HM to both the local client and the cloud
AM runtime. sub mode = offloading a multi-agent job to the cloud AM (vs the
client running locally), with AM agents calling HM /v1/* for models.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 22:01:08 +08:00
chenchenandClaude Opus 4.8 0ee7623aec docs(integration): sub-mode spec — disambiguate HM vs AM, full display_status, explicit flow
Address review feedback for three-team clarity:
- Terminology nailed: HM = Heicode Manager (Go gateway, NO AI, never executes,
  never touches a VM); AM = agent_management (the "Agent Manager" runtime, the
  one with AI that runs agents). Removed all ambiguous bare "Manager".
- Capability boundary table: who has AI / who executes commands / who connects
  the VM. Spells out that HM cannot deploy or read VM logs — deploy is run by
  the client (user-confirmed, short-lived creds from HM); code execution is AM.
- §3.0 explicit step-by-step execution flow (17 steps, each naming HM/AM/client).
- §6 full display_status definition: enum, judging algorithm, real-vs-fake
  artifact rules, success criterion — so all three teams interpret it the same.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 21:56:15 +08:00
chenchenandClaude Opus 4.8 7c55b6d9f7 docs(integration): sub-mode spec — lock git/deploy decisions + add edge-case analysis
- git = user-bound own repo (github/gitea by URL); auth = fine-grained PAT
  (universal, paste a token) with SSH deploy key fallback.
- deploy MUST be client-executed with mandatory user confirmation; Manager
  only issues short-lived encrypted credentials + audits.
- git executed by agent_management with an injected short-lived PAT; Manager
  records refs only; agents push to delivery/PR branch, not main.
- New section 9: additional details to settle before v1 (repo state, secret
  hygiene, budget/cancel/crash handling, acceptance, concurrency, provider
  limits, deploy confirm/rollback, work-view UX).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 21:38:36 +08:00
chenchenandClaude Opus 4.8 c10f6d2f6b docs(integration): sub-mode end-to-end flow + three-end spec (v0.1 draft)
Authoritative flow/spec aligning desktop client <-> Heicode Manager <->
agent_management for the sub mode: encrypt/auth, dispatch, streamed agent
work view, git-per-agent + merge into one deliverable, review/redo, deploy
via Manager-held credentials, and the resource-binding spec (git/vm/db/blob
-> Key Vault). Marks each item 已实现/部分/待建/待决策 with recommendations,
and lists per-end TODOs. Open decisions in section 8 for sign-off.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 21:25:08 +08:00
chenchenandClaude Opus 4.8 78048858b9 docs(heicode): add sub-agile end-to-end demo walkthrough for client cross-check
Step-by-step walkthrough of a real client-simulated run (task dep_39e53ee4c692)
with actual request/response at each stage: create -> poll workflow -> artifacts
-> manifest -> files -> archive. Confirms agent_management delivers real code
files + nested folders (backend/main.py, backend/models.py) surfaced as a
project_folder. Includes a client self-check list.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 16:47:53 +08:00
chenchenandClaude Opus 4.8 b4c3104dda docs(heicode): document sub-mode workflow/list rich fields (gap A/B/D/F)
Workflow now documents top-level mode (sub_agile|swarm) + sub_mode, phases[],
per-agent tokens/tools/elapsed_seconds/artifact_ids, and metrics/aggregates,
with a note that per-agent metrics + artifact source role await
agent_management runtime support.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 16:25:28 +08:00
chenchenandClaude Opus 4.8 fd4ea0335b docs(heicode): finalize client integration doc for gap-analysis closure
- Add 2026-06-02 changelog summarizing P0/P1 closure at the top.
- New error codes: ARTIFACT_ARCHIVE_NOT_READY/_FAILED, FILE_PATH_REQUIRED,
  with retryable column and the unified error envelope note.
- §9 auth bullet now reflects encrypted-body writes + no-body signed GET.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 12:04:54 +08:00
chenchenandClaude Opus 4.8 2613c5763c fix(heicode): close client gap-analysis P0/P1 items for unified API
Address the desktop client team gap analysis on the unified /api/heicode/*
surface:

- P0-1 GET device auth: no-body V2 signed-GET path (fetch forbids GET body),
  same Ed25519 canonical with empty-body hash; UserOrV2DeviceAuth +
  OptionalV2DeviceAuth dispatch on signature headers. Unit test added.
- P0-2 approval inbox: GET .../tasks/{id}/approvals?status=pending.
- P0-3 project_folder: artifacts list normalizes the primary code deliverable
  to display_artifact_type=project_folder + is_project + manifest/files/
  archive/revisions subpaths.
- P0-4 archive contract: real application/zip + Content-Disposition +
  Content-Length; ARTIFACT_ARCHIVE_NOT_READY (retryable) when no files yet.
- P1-1 file path: GET .../files?path=<url-encoded> (no segment ambiguity).
- P1-2/P1-3 revision: local edits stored as accepted baseline; /messages and
  /execute consume the latest accepted revision (-> applied), return
  active_project_revision.
- P1-4 doc: Swarm same-shape routes stated explicitly.

Doc updated to match. Build + middleware/controller tests pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 11:48:03 +08:00
chenchenandClaude Opus 4.8 f903fd0c19 docs(integration): self-sufficient unified API doc for desktop client
以客户端开发视角通读后补齐缺口,使客户端可仅凭本文对接:
- §0.1 推荐完整流程(capabilities->create->poll workflow->artifacts->manifest/files/archive)
- §3.1 创建响应(deployment_id=task_id 来源)+ 列表响应
- §5 artifacts 列表响应
- §6 local-edit 单/批量请求 + 成功 + 冲突响应示例
- §7 云部署请求/响应示例

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 03:45:18 +08:00
chenchenandClaude Opus 4.8 0f1d3d2009 feat(agent): three-layer status on workflow, error retryable, V2/envelope doc alignment
按桌面客户端 spec 重审后补齐:
- workflow 端点补三层状态(cloud_deployment_status/runtime_execution_status/display_status/
  conversation_id/last_synced_at,§10.2),作为客户端右侧面板状态源。
- agentError 补 error.retryable(§14)。
- 文档:明确 V2 body 加密与模型调用一致(directive)、真实响应 envelope、轮询刷新(无 SSE,
  按 §17.3 兜底)、需求包创建 + messages/execute/delete。

V2 加密链核验:新 /api/heicode/* 全走 UserOrV2DeviceAuth(同模型调用),
heicode-aead-v1/ChaCha20/Ed25519 常量未被改名误伤,中间件测试通过——加密未丢失。

go build ./... + go test 全绿。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 03:37:05 +08:00
chenchenandClaude Opus 4.8 7f3806c510 feat(agent): client requirement-package create + messages/execute/delete (spec §5.1/§8)
补齐桌面客户端对接缺口:之前 POST /tasks 只收 orchestration_plan、且缺 messages/execute/delete,
客户端无法照 spec §8 需求包直接对接。本次:

- POST /api/heicode/{sub-agile,swarm}/tasks 改收需求包 {mode,conversation_id,requirement,model_selection,roles},
  Manager 翻译成 orchestration_plan(per_role/default/primary 模型),仍兼容直传 orchestration_plan。
- POST .../tasks/{id}/messages:持续对话,记录用户消息 + 回当前 display_status。
- POST .../tasks/{id}/execute:确保派发 Runtime + reconcile。
- DELETE .../tasks/{id}:停止任务。
- 重构 createAgentDeploymentFromPlan,供原始 plan 与需求包两条路径复用。
- 更新 docs/integration/heicode-desktop-unified-api.md(创建改需求包 + 新路由)。

go build ./... + go test(controller/router)全绿。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 03:26:57 +08:00
chenchenandClaude Opus 4.8 56eef58b3c feat(agent): project-folder artifacts, local-edit revisions, cloud-deploy control plane
完成统一方案 v0.1 剩余客户端要求(#10/#11/#12)+ 对接文档。

- #10 项目文件夹产物(§12):Manager 解析 runtime 的 markdown 多文件 artifact 成项目文件树,
  新增 .../artifacts/{id}/manifest、/files/{path}、/archive 三接口(按需解析,zip 打包)。
- #11 本地修改 revision 协议(§12.7):新模型 AgentArtifactRevision + 迁移;
  .../local-edits、/local-edits/batch、/revisions;base_revision 冲突检测返回
  ARTIFACT_REVISION_CONFLICT;Manager 持有 accepted 基线,回调 Runtime(审计事件)。
- #12 云部署控制面(§18):新模型 AgentCloudDeployment + 迁移;
  GET /api/heicode/deployment-targets;.../tasks/{id}/deployments(创建/列表);
  生产环境进 waiting_approval;客户端只传 resource_binding_id(禁 inline secret);
  真实云执行留 executor=pending_worker,等 Deploy Worker 接入。
- 文档:新增 docs/integration/heicode-desktop-unified-api.md(取代旧 sub-agile 文档,
  覆盖 capabilities/统一任务路由/display_status/项目文件夹/本地修改/云部署/客户端约束/错误码)。

验证:go build ./... + go test(controller/router/model/middleware)全绿。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 00:23:02 +08:00
chenchenandClaude Opus 4.8 0fe1d20d67 feat(agent): unify agnet→agent and implement client/runtime unification spec v0.1 core
按桌面客户端统一方案 v0.1 + agent_management Sub Mode Runtime 对接,强制全量统一,不留兼容。

命名统一(强制,无兼容):
- 全仓 agnet/Agnet/AGNET → agent/Agent/AGENT:后端 Go(路由 /api/agent/*、env AGENT_*、
  结构体/函数、19 个文件改名)、前端(agent-console/agent-hub、/api/agent 调用、i18n)、
  DB(表 agent_*、列 agent_id)、compose/.env、文档、脚本。
- DB 加幂等迁移 renameAgnetTablesToAgent():启动时 rename 老 agnet_* 表/列,保住生产数据。

统一方案核心(10 项):
- callback 统一 /api/agent/callbacks/runtime-events(路由/广播URL/函数名)。
- artifact 兜底判定改用 Runtime 权威信号 metadata.synthesized(§7.2)+ 结构化 artifact_type。
- Manager→Runtime 路径对齐 /api/agent/sub-agile/deployments(§2.2),{deployment_id} 回退 swarm_id。
- 状态裁决 display_status:Manager 唯一裁判,completed 无有效产物→needs_codegen/
  completed_without_deliverable(§10.6),接入 detail/timeline/workflow。
- GET /api/heicode/capabilities 能力发现(§6)。
- 模型策略 per_role(role_models)+ 收集 allowed_model_ids(§9)。
- resource_binding_id→secret_ref 服务端解析,客户端不再 inline secret_ref(§17.6)。
- 客户端统一路由层 /api/heicode/sub-agile|swarm/*(task≡deployment,复用控制面)+ workflow 投影。
- 日志分层 user_logs/debug_logs(§13)。

验证:go build ./... + go test(controller/router/model/middleware)全绿;前端 tsc -b + rsbuild build 通过。
待部署:VM .env 的 AGNET_*→AGENT_*;启动迁移自动 rename 表;其他三仓库需同步切到 /api/agent。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-01 23:45:10 +08:00
chenchenandClaude Opus 4.8 12602ebcd6 fix(agnet): structured deliverable judgment, secret_ref validation, single default model
代码评审(2026-06-01 全链路报告)中 Manager 侧自主可修项:

- P2 交付物判定: runtimeArtifactsAreSummaryOnly 改为优先读结构化字段
  (artifact_type + files_modified 信号),修复 Runtime 新 uri scheme 与
  artifact_type=document 被旧 /artifacts/summary 字符串启发式漏判的回归。
- P6a: Resource CRUD(normalizeResourcePayload)强制 secret_ref 必须 azkv://,
  与 agnet 部署/审批路径一致,堵住直写任意 secret_ref 的旁路。
- P6b: 明文密钥检测从仅按字段名升级为同时扫字符串值(sk-/ghp_/AKIA/JWT/PEM
  等高置信模式),containsPlaintextSecret 与 containsSensitiveGrantField 均覆盖。
- P5 默认模型收敛: 新增单一来源 defaultAgnetModelID()(env AGNET_DEFAULT_MODEL_ID,
  默认生产已验证的 gpt-5.4);移除 draft 构造器两处 agnet-model-<role> 占位回退
  (生产 NewAPI "No available channel" 根因)与角色模板硬编码 claude-* 默认。
- P3 文档: 对接文档状态枚举补 completed 终态、runtime_state 镜像说明与未知值兜底;
  role-templates 示例占位名改为 gpt-5.4。

新增 controller/agnet_deliverable_secret_test.go 覆盖以上行为。
go build ./... 与 go test ./controller/ 全绿。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-01 17:33:32 +08:00
gongzhiyong be5b9996d9 docs: clarify desktop sub artifact handling
Document how the desktop client should classify and display sub-mode artifacts, including summary-only outputs and markdown code documents.

Constraint: Keep interface paths stable; update display and validation rules only

Confidence: high

Scope-risk: narrow

Not-tested: Documentation-only change; git diff --check passed
2026-06-01 01:48:27 +08:00
gongzhiyong 1d5bc81b38 docs: refresh sub runtime verification
Record the 2026-05-31 production Manager smoke result for ordinary sub mode after the Agent Manager Runtime image update.

Constraint: Keep ordinary sub mode separate from swarm mode and document real production ids only

Confidence: high

Scope-risk: narrow

Not-tested: Documentation-only change; git diff --check passed
2026-05-31 22:50:24 +08:00
gongzhiyong 8a43018cf5 docs: update desktop sub agile integration guide 2026-05-30 14:39:26 +08:00
gongzhiyong 8c1d9461f4 fix: use valid default agnet runtime models 2026-05-30 14:15:01 +08:00
gongzhiyong edf7aeaf8a feat: add agnet artifact content proxy 2026-05-30 12:55:04 +08:00
gongzhiyong 70663f47ee fix: separate swarm runtime integration
Add separate Runtime mode selection for ordinary sub and swarm flows, including Swarm-specific create payload shaping and Azure VM env wiring. Document the ordinary sub artifact callback gap, swarm runtime findings, PayPal billing boundaries, deployment migration requirements, and desktop/API progress.

Constraint: Keep ordinary sub and HeiCode-Swarm Runtime deployments separate

Confidence: high

Scope-risk: moderate

Tests: go test ./...
2026-05-29 17:31:24 +08:00
gongzhiyong ed9136d29d docs: list remaining agent manager sub requirements 2026-05-28 21:56:17 +08:00
gongzhiyong 8e7bdc6388 fix: sync sub runtime callback state 2026-05-28 21:24:02 +08:00
gongzhiyong d2f7ab7333 fix: enable encrypted swarm requests 2026-05-28 16:58:27 +08:00
gongzhiyong 7f9f70b1dc docs: add agent manager sub integration requirements 2026-05-28 16:06:52 +08:00
gongzhiyong 8075891770 feat: document and expose swarm runtime contract 2026-05-28 11:57:58 +08:00
gongzhiyong ee5342c404 docs: rename agent manager action lists 2026-05-28 01:30:09 +08:00
gongzhiyong 6848f1a101 docs: add agent manager integration action lists 2026-05-28 01:28:05 +08:00
gongzhiyong 10fc64e172 feat: complete sub task flow callbacks 2026-05-27 23:31:57 +08:00
gongzhiyong 4ccf7b1062 feat: complete swarm manager callback loop 2026-05-27 21:17:32 +08:00
gongzhiyong 741cc0d254 docs: update desktop sub encrypted request flow 2026-05-27 18:46:32 +08:00
gongzhiyong 9f5b4ba777 feat: encrypt desktop sub requests 2026-05-27 18:15:29 +08:00
gongzhiyong f466c40545 docs: update desktop sub agile integration flow 2026-05-27 17:53:04 +08:00
gongzhiyong beaf1e6611 fix: align runtime create payload with agnet 2026-05-27 15:03:48 +08:00
gongzhiyong 6562acaa62 docs: add manager standalone execution plan 2026-05-26 18:02:40 +08:00
gongzhiyong 99776d18af docs: refine sub swarm progress checklist 2026-05-26 17:54:37 +08:00
gongzhiyong cc148b15c3 docs: add sub swarm progress checklist 2026-05-26 17:46:51 +08:00
gongzhiyong e1b9de2a49 feat: add azure key vault resource discovery 2026-05-25 17:41:43 +08:00
chenchen 2a1d8d8191 chore: initial import — heicode manager + website 2026-05-20 14:07:30 +08:00