Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
7f4c3ba
feat(agent-tracing): add @eggjs/agent-tracing package for AI agent tr…
jerryliang64 Feb 28, 2026
9818618
refactor(agent-tracing): rename test files to PascalCase and clean up…
jerryliang64 Mar 1, 2026
547bafe
fix(deps): bump @langchain/core to ^1.1.29 and dedupe lockfile
jerryliang64 Mar 2, 2026
91efaea
refactor(agent-tracing): replace ali-oss direct dependency with IOssC…
jerryliang64 Mar 5, 2026
04b0c9a
refactor(agent-tracing): replace logService config with ILogServiceCl…
jerryliang64 Mar 5, 2026
4a583e1
fix(deps): sync pnpm-lock.yaml with agent-tracing package.json
jerryliang64 Mar 5, 2026
d455b1c
refactor(agent-tracing): apply code review fixes
jerryliang64 Mar 6, 2026
054f009
test(agent-tracing): improve coverage for TracingService and LangGrap…
jerryliang64 Mar 6, 2026
551a1c4
fix(agent-tracing): use Date.now() for child run timestamps in TraceS…
jerryliang64 Mar 6, 2026
b7fb285
test(agent-tracing): improve coverage for ClaudeAgentTracer and Traci…
jerryliang64 Mar 10, 2026
81ddf29
style(agent-tracing): fix oxfmt formatting in test file
jerryliang64 Mar 10, 2026
3c535cd
refactor(agent-tracing): address PR review feedback
jerryliang64 Mar 10, 2026
0e8c85c
fix(agent-tracing): populate thread_id from session_id in ClaudeAgent…
jerryliang64 Mar 10, 2026
3c246f6
style(agent-tracing): fix oxfmt formatting in types.ts
jerryliang64 Mar 10, 2026
f2264f8
chore(deps): sync pnpm-lock.yaml after rebase on next
jerryliang64 Mar 11, 2026
4de046d
chore(agent-tracing): bump version to 4.0.2-beta.3 to align with othe…
jerryliang64 Mar 11, 2026
1e52c2a
refactor(agent-tracing): deduplicate mock Run factories and remove un…
jerryliang64 Mar 12, 2026
e51da49
refactor(agent-tracing): make sub-entries self-contained with re-exports
jerryliang64 Mar 13, 2026
e39953d
Merge branch 'next' into feat/agent-tracing
jerryliang64 Mar 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
645 changes: 472 additions & 173 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

85 changes: 85 additions & 0 deletions tegg/core/agent-tracing/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
{
"name": "@eggjs/agent-tracing",
"version": "4.0.2-beta.3",
"description": "Tracing support for AI agents (LangGraph, Claude Agent SDK)",
"keywords": [
"agent",
"claude",
"egg",
"langchain",
"langgraph",
"tegg",
"tracing",
"typescript"
],
"homepage": "https://github.com/eggjs/egg/tree/next/tegg/core/agent-tracing",
"bugs": {
"url": "https://github.com/eggjs/egg/issues"
},
"license": "MIT",
"author": "killagu <killa123@126.com>",
"repository": {
"type": "git",
"url": "git+https://github.com/eggjs/egg.git",
"directory": "tegg/core/agent-tracing"
},
"files": [
"dist"
],
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": "./src/index.ts",
"./claude": "./src/claude.ts",
"./langgraph": "./src/langgraph.ts",
"./package.json": "./package.json"
},
"publishConfig": {
"access": "public",
"exports": {
".": "./dist/index.js",
"./claude": "./dist/claude.js",
"./langgraph": "./dist/langgraph.js",
"./package.json": "./package.json"
}
},
"scripts": {
"typecheck": "tsgo --noEmit",
"test": "vitest run"
},
"dependencies": {
"@eggjs/background-task": "workspace:*",
"@eggjs/core-decorator": "workspace:*",
"@eggjs/tegg-types": "workspace:*",
"onelogger": "catalog:"
},
"devDependencies": {
"@anthropic-ai/claude-agent-sdk": "^0.2.52",
"@anthropic-ai/sdk": "^0.78.0",
"@eggjs/tegg-common-util": "workspace:*",
"@langchain/core": "^1.1.29",
"@langchain/langgraph": "^0.2.74",
"@types/node": "catalog:",
"typescript": "catalog:"
},
"peerDependencies": {
"@anthropic-ai/claude-agent-sdk": ">=0.2.52",
"@langchain/core": "^1.1.29"
},
"peerDependenciesMeta": {
"@anthropic-ai/claude-agent-sdk": {
"optional": true
},
"@langchain/core": {
"optional": true
}
},
"engines": {
"node": ">=22.18.0"
},
"eggModule": {
"name": "teggAgentTracing"
}
}
31 changes: 31 additions & 0 deletions tegg/core/agent-tracing/src/AbstractLogServiceClient.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/**
* Abstract log service client for dependency injection.
*
* To enable log service syncing in TracingService, implement this class in your application
* and register it with Tegg IoC. The implementation class MUST be named `LogServiceClient`
* (or use `@SingletonProto({ name: 'logServiceClient' })`) so the container can resolve it.
*
* @example
* ```typescript
* import { SingletonProto } from '@eggjs/core-decorator';
* import { AccessLevel } from '@eggjs/tegg-types';
* import { AbstractLogServiceClient } from '@eggjs/agent-tracing';
*
* // Class name must be LogServiceClient (registers as 'logServiceClient' in the IoC container)
* @SingletonProto({ accessLevel: AccessLevel.PUBLIC })
* export class LogServiceClient extends AbstractLogServiceClient {
* async send(log: string): Promise<void> {
* await fetch('https://log.example.com/api', {
* method: 'POST',
* headers: { 'content-type': 'application/json' },
* body: JSON.stringify({ log }),
* });
* }
* }
* ```
*
* If no implementation is registered, log service syncing is silently skipped.
*/
export abstract class AbstractLogServiceClient {
abstract send(log: string): Promise<void>;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ixxx 是否为当前项目的 interface 命名风格?

}
27 changes: 27 additions & 0 deletions tegg/core/agent-tracing/src/AbstractOssClient.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/**
* Abstract OSS client for dependency injection.
*
* To enable OSS uploads in TracingService, implement this class in your application
* and register it with Tegg IoC. The implementation class MUST be named `OssClient`
* (or use `@SingletonProto({ name: 'ossClient' })`) so the container can resolve it.
*
* @example
* ```typescript
* import { SingletonProto } from '@eggjs/core-decorator';
* import { AccessLevel } from '@eggjs/tegg-types';
* import { AbstractOssClient } from '@eggjs/agent-tracing';
*
* // Class name must be OssClient (registers as 'ossClient' in the IoC container)
* @SingletonProto({ accessLevel: AccessLevel.PUBLIC })
* export class OssClient extends AbstractOssClient {
* async put(key: string, content: string | Buffer): Promise<void> {
* // your OSS implementation here
* }
* }
* ```
*
* If no implementation is registered, OSS uploads are silently skipped.
*/
export abstract class AbstractOssClient {
abstract put(key: string, content: string | Buffer): Promise<void>;
}
Loading
Loading