Skip to content

feat(logs): add agentkit logs --harness <name>#75

Merged
cuericlee merged 1 commit into
feat/harness-codex-mirrorfrom
feat/agentkit-logs
Jun 17, 2026
Merged

feat(logs): add agentkit logs --harness <name>#75
cuericlee merged 1 commit into
feat/harness-codex-mirrorfrom
feat/agentkit-logs

Conversation

@yaozheng-fang

Copy link
Copy Markdown
Collaborator

What

Adds agentkit logs --harness <name> to query a deployed harness runtime's logs from APMPlus / TLS, authenticated with Volcengine signing (VE Sign).

How it works

  1. Resolve the runtime by name (or RuntimeId) via the AgentKit runtime API and verify the deploy-time harness tag agentkit:agenttype=harness. Non-harness apps are rejected with 非 Harness 应用,无法查询日志.
  2. GetLogModuleConfig (APMPlus OpenAPI, signed via agentkit.auth._sigv4.sign_headers) returns the TLS LogTopicId.
  3. SearchLogs (api-version 0.3.0) runs through the official volcengine.tls SDK, which handles TLS-specific signing (service TLS, Content-MD5 / x-tls-apiversion).

Default filter is service:<runtime_id>.<name>.

Flags

--query, --since (e.g. 1h/30m/2d/1h30m, mutually exclusive with --start), --start/--end (epoch ms), --limit (default 200), --sort, --tls-endpoint, --output/-o (write to file), --raw.

Tests

tests/toolkit/cli/test_cli_logs.py — 9 cases: non-harness rejection, runtime-not-found, default query build, --query override, --since parsing/window, --since+--start conflict, --output file write. All pass; ruff clean.

Based on feat/harness-codex-mirror (depends on the harness deploy tag). Verified end-to-end against a live harness runtime.

🤖 Generated with Claude Code

…logs

Query a deployed harness runtime's logs from APMPlus / TLS (VE Sign auth):

- Resolve the runtime by name (or RuntimeId) and verify the deploy-time harness
  tag (agentkit:agenttype=harness); reject non-harness apps with a clear message.
- GetLogModuleConfig (APMPlus, signed via _sigv4.sign_headers) yields the TLS
  LogTopicId; SearchLogs (api-version 0.3.0) runs via the official volcengine.tls
  SDK, which handles TLS-specific signing.
- Default filter service:<runtime_id>.<name>; flags: --query, --since (1h/30m/2d),
  --start/--end (epoch ms), --limit (default 200), --sort, --tls-endpoint,
  --output (write to file), --raw.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@cuericlee cuericlee left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@cuericlee cuericlee left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@cuericlee cuericlee merged commit 545d435 into feat/harness-codex-mirror Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants