feat(tegg): add AgentController for building AI agent HTTP APIs #1765
Annotations
4 errors and 1 warning
|
Run tests
Process completed with exit code 1.
|
|
Run tests:
tegg/core/controller-decorator/test/index.test.ts#L6
Error: Snapshot `should export stable 1` mismatched
- Expected
+ Received
@@ -1,9 +1,35 @@
{
- "Acl": [Function],
+ "AGENT_CONTROLLER_PROTO_IMPL_TYPE": "AGENT_CONTROLLER_PROTO",
+ "Acl": [Function],
+ "AgentController": [Function],
+ "AgentErrorCode": {
+ "ExecError": "EXEC_ERROR",
+ },
+ "AgentInfoUtil": [Function],
+ "AgentObjectType": {
+ "Thread": "thread",
+ "ThreadMessage": "thread.message",
+ "ThreadMessageDelta": "thread.message.delta",
+ "ThreadRun": "thread.run",
+ },
+ "AgentSSEEvent": {
+ "Done": "done",
+ "ThreadMessageCompleted": "thread.message.completed",
+ "ThreadMessageCreated": "thread.message.created",
+ "ThreadMessageDelta": "thread.message.delta",
+ "ThreadRunCancelled": "thread.run.cancelled",
+ "ThreadRunCompleted": "thread.run.completed",
+ "ThreadRunCreated": "thread.run.created",
- "BodyParamMeta": [Function],
- "CONTROLLER_ACL": Symbol(EggPrototype#controller#acl),
+ "ThreadRunFailed": "thread.run.failed",
+ "ThreadRunInProgress": "thread.run.in_progress",
+ },
+ "BodyParamMeta": [Function],
+ "CONTROLLER_ACL": Symbol(EggPrototype#controller#acl),
+ "CONTROLLER_AGENT_CONTROLLER": Symbol(EggPrototype#controller#agent#isAgent),
+ "CONTROLLER_AGENT_ENHANCED": Symbol(EggPrototype#controller#agent#enhanced),
+ "CONTROLLER_AGENT_NOT_IMPLEMENTED": Symbol(EggPrototype#controller#agent#notImplemented),
"CONTROLLER_AOP_MIDDLEWARES": Symbol(EggPrototype#controller#aopMiddlewares),
"CONTROLLER_HOST": Symbol(EggPrototype#controllerHost),
"CONTROLLER_HTTP_PATH": Symbol(EggPrototype#controller#http#path),
"CONTROLLER_MCP_CONTROLLER_PARAMS_MAP": Symbol(EggPrototype#controller#mcp#params),
"CONTROLLER_MCP_EXTRA_INDEX": Symbol(EggPrototype#controller#mcp#extra),
@@ -25,10 +51,13 @@
"CONTROLLER_METHOD_PRIORITY": Symbol(EggPrototype#controller#method#http#priority),
"CONTROLLER_MIDDLEWARES": Symbol(EggPrototype#controller#middlewares),
"CONTROLLER_NAME": Symbol(EggPrototype#controllerName),
"CONTROLLER_TIMEOUT_METADATA": Symbol(EggPrototype#controller#timeout),
"CONTROLLER_TYPE": Symbol(EggPrototype#controllerType),
+ "ContentBlockType": {
+ "Text": "text",
+ },
"ControllerInfoUtil": [Function],
"ControllerMetaBuilderFactory": [Function],
"ControllerMetadataUtil": [Function],
"ControllerType": {
"HEADERS": "HEADERS",
@@ -107,10 +136,20 @@
"METHOD_CONTEXT_INDEX": Symbol(EggPrototype#controller#method#context),
"METHOD_CONTROLLER_HOST": Symbol(EggPrototype#controller#mthods#host),
"METHOD_CONTROLLER_TYPE_MAP": Symbol(EggPrototype#controller#mthods),
"METHOD_MIDDLEWARES": Symbol(EggPrototype#method#middlewares),
"METHOD_TIMEOUT_METADATA": Symbol(EggPrototype#method#timeout),
+ "MessageRole": {
+ "Assistant": "assistant",
+ "System": "system",
+ "User": "user",
+ },
+ "MessageStatus": {
+ "Completed": "completed",
+ "InProgress": "in_progress",
+ "Incomplete": "incomplete",
+ },
"MethodInfoUtil": [Function],
"MethodType": {
"HTTP": "HTTP",
"MESSAGE": "MESSAGE",
"MGW_RPC": "MGW_RPC",
@@ -126,7 +165,16 @@
"PathParamMeta": [Function],
"PromptArgsSchema": [Function],
"QueriesParamMeta": [Function],
"QueryParamMeta": [Function],
"RequestParamMeta": [Function],
+ "RunStatus": {
+ "Cancelled": "cancelled",
+ "Cancelling": "cancelling",
+ "Completed": "completed",
+ "Expired": "expired",
+ "Failed": "failed",
+ "InProgress": "in_progress",
+ "Queued": "queued",
+ },
"ToolArgsSchema": [Function],
}
❯ test/index.test.ts:6:17
|
|
Run tests:
tegg/core/controller-decorator/test/index.test.ts#L6
Error: Snapshot `should export stable 1` mismatched
- Expected
+ Received
@@ -1,9 +1,35 @@
{
- "Acl": [Function],
+ "AGENT_CONTROLLER_PROTO_IMPL_TYPE": "AGENT_CONTROLLER_PROTO",
+ "Acl": [Function],
+ "AgentController": [Function],
+ "AgentErrorCode": {
+ "ExecError": "EXEC_ERROR",
+ },
+ "AgentInfoUtil": [Function],
+ "AgentObjectType": {
+ "Thread": "thread",
+ "ThreadMessage": "thread.message",
+ "ThreadMessageDelta": "thread.message.delta",
+ "ThreadRun": "thread.run",
+ },
+ "AgentSSEEvent": {
+ "Done": "done",
+ "ThreadMessageCompleted": "thread.message.completed",
+ "ThreadMessageCreated": "thread.message.created",
+ "ThreadMessageDelta": "thread.message.delta",
+ "ThreadRunCancelled": "thread.run.cancelled",
+ "ThreadRunCompleted": "thread.run.completed",
+ "ThreadRunCreated": "thread.run.created",
- "BodyParamMeta": [Function],
- "CONTROLLER_ACL": Symbol(EggPrototype#controller#acl),
+ "ThreadRunFailed": "thread.run.failed",
+ "ThreadRunInProgress": "thread.run.in_progress",
+ },
+ "BodyParamMeta": [Function],
+ "CONTROLLER_ACL": Symbol(EggPrototype#controller#acl),
+ "CONTROLLER_AGENT_CONTROLLER": Symbol(EggPrototype#controller#agent#isAgent),
+ "CONTROLLER_AGENT_ENHANCED": Symbol(EggPrototype#controller#agent#enhanced),
+ "CONTROLLER_AGENT_NOT_IMPLEMENTED": Symbol(EggPrototype#controller#agent#notImplemented),
"CONTROLLER_AOP_MIDDLEWARES": Symbol(EggPrototype#controller#aopMiddlewares),
"CONTROLLER_HOST": Symbol(EggPrototype#controllerHost),
"CONTROLLER_HTTP_PATH": Symbol(EggPrototype#controller#http#path),
"CONTROLLER_MCP_CONTROLLER_PARAMS_MAP": Symbol(EggPrototype#controller#mcp#params),
"CONTROLLER_MCP_EXTRA_INDEX": Symbol(EggPrototype#controller#mcp#extra),
@@ -25,10 +51,13 @@
"CONTROLLER_METHOD_PRIORITY": Symbol(EggPrototype#controller#method#http#priority),
"CONTROLLER_MIDDLEWARES": Symbol(EggPrototype#controller#middlewares),
"CONTROLLER_NAME": Symbol(EggPrototype#controllerName),
"CONTROLLER_TIMEOUT_METADATA": Symbol(EggPrototype#controller#timeout),
"CONTROLLER_TYPE": Symbol(EggPrototype#controllerType),
+ "ContentBlockType": {
+ "Text": "text",
+ },
"ControllerInfoUtil": [Function],
"ControllerMetaBuilderFactory": [Function],
"ControllerMetadataUtil": [Function],
"ControllerType": {
"HEADERS": "HEADERS",
@@ -107,10 +136,20 @@
"METHOD_CONTEXT_INDEX": Symbol(EggPrototype#controller#method#context),
"METHOD_CONTROLLER_HOST": Symbol(EggPrototype#controller#mthods#host),
"METHOD_CONTROLLER_TYPE_MAP": Symbol(EggPrototype#controller#mthods),
"METHOD_MIDDLEWARES": Symbol(EggPrototype#method#middlewares),
"METHOD_TIMEOUT_METADATA": Symbol(EggPrototype#method#timeout),
+ "MessageRole": {
+ "Assistant": "assistant",
+ "System": "system",
+ "User": "user",
+ },
+ "MessageStatus": {
+ "Completed": "completed",
+ "InProgress": "in_progress",
+ "Incomplete": "incomplete",
+ },
"MethodInfoUtil": [Function],
"MethodType": {
"HTTP": "HTTP",
"MESSAGE": "MESSAGE",
"MGW_RPC": "MGW_RPC",
@@ -126,7 +165,16 @@
"PathParamMeta": [Function],
"PromptArgsSchema": [Function],
"QueriesParamMeta": [Function],
"QueryParamMeta": [Function],
"RequestParamMeta": [Function],
+ "RunStatus": {
+ "Cancelled": "cancelled",
+ "Cancelling": "cancelling",
+ "Completed": "completed",
+ "Expired": "expired",
+ "Failed": "failed",
+ "InProgress": "in_progress",
+ "Queued": "queued",
+ },
"ToolArgsSchema": [Function],
}
❯ test/index.test.ts:6:17
|
|
Run tests:
tegg/core/controller-decorator/test/index.test.ts#L6
Error: Snapshot `should export stable 1` mismatched
- Expected
+ Received
@@ -1,9 +1,35 @@
{
- "Acl": [Function],
+ "AGENT_CONTROLLER_PROTO_IMPL_TYPE": "AGENT_CONTROLLER_PROTO",
+ "Acl": [Function],
+ "AgentController": [Function],
+ "AgentErrorCode": {
+ "ExecError": "EXEC_ERROR",
+ },
+ "AgentInfoUtil": [Function],
+ "AgentObjectType": {
+ "Thread": "thread",
+ "ThreadMessage": "thread.message",
+ "ThreadMessageDelta": "thread.message.delta",
+ "ThreadRun": "thread.run",
+ },
+ "AgentSSEEvent": {
+ "Done": "done",
+ "ThreadMessageCompleted": "thread.message.completed",
+ "ThreadMessageCreated": "thread.message.created",
+ "ThreadMessageDelta": "thread.message.delta",
+ "ThreadRunCancelled": "thread.run.cancelled",
+ "ThreadRunCompleted": "thread.run.completed",
+ "ThreadRunCreated": "thread.run.created",
- "BodyParamMeta": [Function],
- "CONTROLLER_ACL": Symbol(EggPrototype#controller#acl),
+ "ThreadRunFailed": "thread.run.failed",
+ "ThreadRunInProgress": "thread.run.in_progress",
+ },
+ "BodyParamMeta": [Function],
+ "CONTROLLER_ACL": Symbol(EggPrototype#controller#acl),
+ "CONTROLLER_AGENT_CONTROLLER": Symbol(EggPrototype#controller#agent#isAgent),
+ "CONTROLLER_AGENT_ENHANCED": Symbol(EggPrototype#controller#agent#enhanced),
+ "CONTROLLER_AGENT_NOT_IMPLEMENTED": Symbol(EggPrototype#controller#agent#notImplemented),
"CONTROLLER_AOP_MIDDLEWARES": Symbol(EggPrototype#controller#aopMiddlewares),
"CONTROLLER_HOST": Symbol(EggPrototype#controllerHost),
"CONTROLLER_HTTP_PATH": Symbol(EggPrototype#controller#http#path),
"CONTROLLER_MCP_CONTROLLER_PARAMS_MAP": Symbol(EggPrototype#controller#mcp#params),
"CONTROLLER_MCP_EXTRA_INDEX": Symbol(EggPrototype#controller#mcp#extra),
@@ -25,10 +51,13 @@
"CONTROLLER_METHOD_PRIORITY": Symbol(EggPrototype#controller#method#http#priority),
"CONTROLLER_MIDDLEWARES": Symbol(EggPrototype#controller#middlewares),
"CONTROLLER_NAME": Symbol(EggPrototype#controllerName),
"CONTROLLER_TIMEOUT_METADATA": Symbol(EggPrototype#controller#timeout),
"CONTROLLER_TYPE": Symbol(EggPrototype#controllerType),
+ "ContentBlockType": {
+ "Text": "text",
+ },
"ControllerInfoUtil": [Function],
"ControllerMetaBuilderFactory": [Function],
"ControllerMetadataUtil": [Function],
"ControllerType": {
"HEADERS": "HEADERS",
@@ -107,10 +136,20 @@
"METHOD_CONTEXT_INDEX": Symbol(EggPrototype#controller#method#context),
"METHOD_CONTROLLER_HOST": Symbol(EggPrototype#controller#mthods#host),
"METHOD_CONTROLLER_TYPE_MAP": Symbol(EggPrototype#controller#mthods),
"METHOD_MIDDLEWARES": Symbol(EggPrototype#method#middlewares),
"METHOD_TIMEOUT_METADATA": Symbol(EggPrototype#method#timeout),
+ "MessageRole": {
+ "Assistant": "assistant",
+ "System": "system",
+ "User": "user",
+ },
+ "MessageStatus": {
+ "Completed": "completed",
+ "InProgress": "in_progress",
+ "Incomplete": "incomplete",
+ },
"MethodInfoUtil": [Function],
"MethodType": {
"HTTP": "HTTP",
"MESSAGE": "MESSAGE",
"MGW_RPC": "MGW_RPC",
@@ -126,7 +165,16 @@
"PathParamMeta": [Function],
"PromptArgsSchema": [Function],
"QueriesParamMeta": [Function],
"QueryParamMeta": [Function],
"RequestParamMeta": [Function],
+ "RunStatus": {
+ "Cancelled": "cancelled",
+ "Cancelling": "cancelling",
+ "Completed": "completed",
+ "Expired": "expired",
+ "Failed": "failed",
+ "InProgress": "in_progress",
+ "Queued": "queued",
+ },
"ToolArgsSchema": [Function],
}
❯ test/index.test.ts:6:17
|
|
Start Redis (MacOS or Linux)
failed to verify attestation: VerificationError: timestamp could not be verified, continue to next attestation
|
Loading