Skip to content

Commit ee3c309

Browse files
jerryliang64claude
andauthored
feat(tegg): [1/3] add agent-runtime package with OSS-backed store (#5823)
sync from: #5818 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes * **New Features** * Introduced a new agent runtime module for managing agent threads and runs with persistent storage capabilities. * Added thread creation and run lifecycle operations with metadata and conversation history management. * Implemented error handling for missing resources and conflicting operations. * **Tests** * Added comprehensive test suites for agent runtime components and storage functionality. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent f64b818 commit ee3c309

22 files changed

Lines changed: 1165 additions & 3 deletions

ecosystem-ci/repo.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"cnpmcore": {
33
"repository": "https://github.com/cnpm/cnpmcore.git",
44
"branch": "master",
5-
"hash": "2f5942f3a0d421f0faa50ea8a7eec68c2dd9b4d2"
5+
"hash": "6d6db575c476aa9deaf078117f9b121e1bd7ebdf"
66
},
77
"examples": {
88
"repository": "https://github.com/eggjs/examples.git",

pnpm-lock.yaml

Lines changed: 64 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ catalog:
174174
nunjucks-markdown: ^2.0.1
175175
on-finished: ^2.4.1
176176
onelogger: ^1.0.1
177+
oss-client: ^2.5.1
177178
oxc-minify: ^0.105.0
178179
oxfmt: ^0.20.0
179180
oxlint: ^1.32.0
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"name": "@eggjs/agent-runtime",
3+
"version": "4.0.2-beta.1",
4+
"description": "Agent runtime with store abstraction for Egg.js tegg",
5+
"keywords": [
6+
"agent",
7+
"egg",
8+
"runtime",
9+
"store",
10+
"tegg"
11+
],
12+
"homepage": "https://github.com/eggjs/egg/tree/next/tegg/core/agent-runtime",
13+
"bugs": {
14+
"url": "https://github.com/eggjs/egg/issues"
15+
},
16+
"license": "MIT",
17+
"repository": {
18+
"type": "git",
19+
"url": "git+https://github.com/eggjs/egg.git",
20+
"directory": "tegg/core/agent-runtime"
21+
},
22+
"files": [
23+
"dist"
24+
],
25+
"type": "module",
26+
"main": "./dist/index.js",
27+
"module": "./dist/index.js",
28+
"types": "./dist/index.d.ts",
29+
"exports": {
30+
".": "./src/index.ts",
31+
"./package.json": "./package.json"
32+
},
33+
"publishConfig": {
34+
"access": "public",
35+
"exports": {
36+
".": "./dist/index.js",
37+
"./package.json": "./package.json"
38+
}
39+
},
40+
"scripts": {
41+
"typecheck": "tsgo --noEmit",
42+
"test": "vitest run"
43+
},
44+
"dependencies": {
45+
"@eggjs/tegg-types": "workspace:*",
46+
"oss-client": "catalog:"
47+
},
48+
"devDependencies": {
49+
"@types/node": "catalog:",
50+
"typescript": "catalog:"
51+
},
52+
"engines": {
53+
"node": ">=22.18.0"
54+
}
55+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import crypto from 'node:crypto';
2+
3+
export function nowUnix(): number {
4+
return Math.floor(Date.now() / 1000);
5+
}
6+
7+
// TODO(PR2): used by AgentRuntime and MessageConverter — remove this comment after PR2 lands
8+
export function newMsgId(): string {
9+
return `msg_${crypto.randomUUID()}`;
10+
}

0 commit comments

Comments
 (0)