Commit Graph

457 Commits

Author SHA1 Message Date
Codex Agent 775c986a72 fix: prioritize v02 workspace first screen 2026-06-05 15:55:18 +08:00
Codex Agent 569398953e fix: gzip cloud web static assets 2026-06-05 15:24:59 +08:00
Codex Agent 5c87936c7f docs: remove legacy auth residual gates 2026-06-05 14:59:11 +08:00
Codex Agent d6769bf1d3 fix: remove v02 authorization residue 2026-06-05 14:00:13 +08:00
Codex Agent c1df458c85 feat: wire hwpod target node-ops flow 2026-06-05 13:39:20 +08:00
Codex Agent ac2d3001fa fix: depollute v02 web performance telemetry 2026-06-05 13:03:09 +08:00
Codex Agent a7ee716dc2 fix: proxy hwpod node ops through cloud web 2026-06-05 12:06:30 +08:00
Lyon 41f537f46a Merge pull request #907 from pikasTech/feat/issue903-performance-panel
v0.2 增加 WebUI 性能监控可视化面板
2026-06-05 12:04:33 +08:00
Lyon fc411b00f8 fix: remove legacy device pod grants authority (#906)
Co-authored-by: Codex Agent <codex@hwlab.local>
2026-06-05 12:02:51 +08:00
Codex Agent f5be1c0361 feat: add v02 web performance dashboard 2026-06-05 12:00:23 +08:00
Codex Agent c8a8aa505e feat: add hwpod harness node-ops loop 2026-06-05 11:52:47 +08:00
Lyon 45bd95e9d1 fix: proxy admin access writes through cloud web (#902)
Co-authored-by: Codex Agent <codex@hwlab.local>
2026-06-05 11:34:28 +08:00
Codex Agent 3dc36f6674 fix: proxy web performance telemetry route 2026-06-05 11:27:54 +08:00
Codex Agent ab7d79c69a feat: expose v02 webui performance metrics 2026-06-05 11:14:27 +08:00
Lyon 48e3d24ad6 fix: converge v02 authorization on OpenFGA (#899)
Co-authored-by: Codex Agent <codex@hwlab.local>
2026-06-05 11:11:15 +08:00
Codex Agent 9840dcc269 fix: add cloud web access route alias 2026-06-05 09:54:11 +08:00
Codex Agent cf722efd06 feat: add v02 OpenFGA access management 2026-06-05 09:39:49 +08:00
Codex Agent 25e533e434 fix: use HTTP request for v02 metrics health probes 2026-06-05 09:12:42 +08:00
Codex Agent 06a2041210 fix: keep v02 metrics sidecar running 2026-06-05 08:50:30 +08:00
Codex Agent 57277da24c feat: add v02 observability metrics sidecars 2026-06-05 08:27:36 +08:00
Codex Agent 1162c0e5bd fix(v02): report AgentRun result contract 2026-06-05 02:26:51 +08:00
Codex Agent aeefb7660b fix(v02): report AgentRun code agent health 2026-06-05 02:06:09 +08:00
Codex Agent fd1b8c0e5a fix(v02): remove legacy code agent control plane 2026-06-05 01:35:35 +08:00
Lyon 6422487444 fix(v02): preserve owner conversation messages (#880)
Co-authored-by: Codex Agent <codex@hwlab.local>
2026-06-05 01:07:49 +08:00
Lyon 0c10056c22 fix(v02): rebuild terminal user messages (#878)
Co-authored-by: Codex Agent <codex@hwlab.local>
2026-06-05 00:41:06 +08:00
Lyon df69e48115 fix(v02): persist chat owner messages (#875)
Co-authored-by: Codex Agent <codex@hwlab.local>
2026-06-05 00:21:47 +08:00
Lyon b6615c2abf fix(v02): preserve terminal workspace trace state (#874)
Co-authored-by: Codex Agent <codex@hwlab.local>
2026-06-05 00:00:04 +08:00
Lyon 1e085691e6 fix: repair persisted conversation snapshots (#855)
Co-authored-by: Codex Agent <codex@hwlab.local>
2026-06-04 20:59:10 +08:00
Lyon eca9dbaa9c fix: persist expired code agent trace summaries (#851)
Co-authored-by: Codex Agent <codex@hwlab.local>
2026-06-04 20:40:36 +08:00
Lyon 6a79bc8f15 fix(v02): repair persisted final response fallback (#840)
Co-authored-by: Codex Agent <codex@hwlab.local>
2026-06-04 18:18:00 +08:00
Lyon be557c09bc fix(v02): repair final response status (#837)
Co-authored-by: Codex Agent <codex@hwlab.local>
2026-06-04 17:45:25 +08:00
Lyon 6c6a64b414 fix(v02): honor HTTP session cookie security (#831)
Co-authored-by: Codex Agent <codex@hwlab.local>
2026-06-04 16:59:15 +08:00
Lyon 7b2f4fa45f fix: wait for device-pod build verify output (#830)
Co-authored-by: Codex Agent <codex@hwlab.local>
2026-06-04 16:23:35 +08:00
Codex Agent baa7289ca0 fix(v02): widen device-pod job output visibility 2026-06-04 16:16:56 +08:00
Lyon 9928954ea6 feat: add device-pod build verify (#827)
Co-authored-by: Codex Agent <codex@hwlab.local>
2026-06-04 16:11:00 +08:00
Codex Agent 37f1b6af22 fix: support device-pod filename rg 2026-06-04 15:56:08 +08:00
Codex Agent c0879ef764 fix(v02): forward API key auth through cloud web 2026-06-04 15:54:00 +08:00
Codex Agent a312cc7f99 fix(v02): proxy API key writes through cloud web 2026-06-04 15:44:07 +08:00
Codex Agent e64ee92fb1 fix(v0.2): align Keycloak auth to HTTPS session API key 2026-06-04 15:01:30 +08:00
Codex 0370135a35 feat(k8s+tests): keycloak bootstrap Job + AgentRun actor trace tests
- new deploy/k8s/keycloak/keycloak-bootstrap-job.yaml: one-shot Job that waits for Keycloak, authenticates as admin, creates hwlab realm + hwlab-cloud-web OIDC client via REST API
- secret hwlab-cloud-web-client holds the OIDC client_secret used by cloud-api
- kustomization.yaml picks up the new Job and Secret
- access-control.test.ts: cloud api AgentRun trace records real actor.userId from OIDC-upserted user (issue 788 spec)
- access-control.test.ts: cloud api /v1/users/me returns actor with authMethod=api-key for HWLAB_API_KEY Bearer token
- 31 pass / 4 pre-existing fail
2026-06-04 15:01:30 +08:00
Codex 84cca71bef feat(cloud-api): v0.2 OIDC login/callback (state, nonce, user upsert) 2026-06-04 15:01:30 +08:00
Codex 6a8e9b3d79 feat(agentrun): inject owner HWLAB_API_KEY into runner transient env
- submitAgentRunChatTurn resolves owner user API key via accessController.store.findActiveDefaultApiKeyForUser
- buildAgentRunRunnerJobInput accepts ownerApiKey; when present, removes HWLAB_DEVICE_POD_API_KEY and adds HWLAB_API_KEY as sensitive
- buildAgentRunTransientEnv no longer emits HWLAB_DEVICE_POD_API_KEY
- codex-stdio child env now reads HWLAB_API_KEY (not HWLAB_DEVICE_POD_API_KEY)
- server-code-agent-http codeAgentAuthEnv looks up user default API key; URL env vars still set unconditionally
- tests: code-agent-session-registry Codex child env carries only device-pod API key now checks HWLAB_API_KEY
- tests: server-agent-chat delegates v0.2 turns removes HWLAB_DEVICE_POD_API_KEY assertion
- 58 pass / 4 pre-existing fail
2026-06-04 15:01:30 +08:00
Codex 49dc7cc6e1 feat(cloud-api): v0.2 24h Web session + Secure cookie
- SESSION_MAX_AGE_SECONDS 7d -> 24h
- Cookie now sets Secure + SameSite=Lax (preserves HttpOnly)
- /v1/auth/session exposes authMethod, sessionExpiresAt, sessionTtlSeconds
- setSessionCookie/clearSessionCookie use new builders
- New test covers first-admin, /auth/login and /auth/logout cookie shape + expiresAt
2026-06-04 15:01:30 +08:00
Codex 13c779ed11 feat(cloud-api): v0.2 user API key auth (api_keys table + Bearer hwl_live_)
Adds the user API key foundation called out in #788:

- New api_keys table with idx_api_keys_user and idx_api_keys_prefix
- users extended with auth_provider/keycloak_issuer/keycloak_sub/email/last_login_at
- Authorization: Bearer hwl_live_... resolves to the same AuthPrincipal
- /v1/api-keys, /v1/api-keys/default, /v1/api-keys/{id}/regenerate, DELETE /v1/api-keys/{id}
- First-admin and /auth/login bootstrap a Default API key
- Short-test mode keeps display_secret; production化 will switch to hash-only later
- Legacy HWLAB_DEVICE_POD_API_KEY and Bearer <session-token> paths preserved
- 4 new access-control.test.ts cases

Refs pikasTech/HWLAB#788
2026-06-04 15:01:30 +08:00
Codex Agent 3a55a4b99e fix(cloud): expose persistent thread resume metadata 2026-06-04 13:05:03 +08:00
Lyon f7e4c372ce fix(cloud): restore running session active trace (#811)
Co-authored-by: Codex Agent <codex@hwlab.local>
2026-06-04 12:18:08 +08:00
Lyon d5690ce2a5 fix(cloud): preserve selected conversation during terminal sync (#809)
Co-authored-by: Codex Agent <codex@hwlab.local>
2026-06-04 12:00:21 +08:00
Codex 19438d6aa4 fix(v0.2): freeze HWLAB-AgentRun concept boundary for #792
P0 freezes the concept boundary between HWLAB (business session/workspace) and
AgentRun (tenant/policy/execution):

- HWLAB adapter now always uses DEFAULT_HWLAB_AGENTRUN_PROJECT_ID /
  DEFAULT_HWLAB_AGENTRUN_PROVIDER_ID / DEFAULT_HWLAB_AGENTRUN_BACKEND_PROFILE on
  AgentRun runPayload, regardless of caller options. Business projectId belongs
  in workspaceRef only, not in AgentRun projectId.

- commandPayload.projectId is now always set to the HWLAB-fixed
  DEFAULT_HWLAB_AGENTRUN_PROJECT_ID, never undefined and never derived from
  caller options.

- client agent send --session-id <SES> --conversation-id <CONV> without
  --provider-profile now looks up the explicit session record to inherit
  providerProfile / threadId / conversationId. Mismatched --conversation-id
  against the session record aborts with session_conversation_mismatch
  before dispatching to AgentRun (prevents stale session state from being
  used as a new conversation).

Contract tests added (all 4 passing):
- internal/agent/agentrun-dispatch.test.mjs: HWLAB AgentRun assembly fixes
  tenantId/projectId/providerId/backendProfile regardless of options; command
  payload does not leak business projectId into AgentRun command projectId.
- tools/hwlab-cli/client.test.ts: send --session-id + --conversation-id
  inherits explicit session providerProfile; fails with
  session_conversation_mismatch when the session points at a different
  conversation.

P2 (CLI/trace result segregation) and P3 (state machine convergence) remain
for follow-up. Tracked via #792 comment chain.

Tracked-by: pikasTech/HWLAB#792
2026-06-04 02:18:34 +08:00
Codex 32b29bc1dc fix: reensure AgentRun runner for reused sessions 2026-06-03 23:21:05 +08:00
Codex 8f0a2cd213 fix: align v0.2 explicit agent session dispatch
Fixes HWLAB #782.
2026-06-03 22:50:58 +08:00