@iqai/adk-cli
Version:
CLI tool for creating, running, and testing ADK-TS agents
407 lines • 14 kB
JavaScript
;
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ArtifactVersionsResponseDto = exports.ArtifactVersionDto = exports.ArtifactsListResponseDto = exports.ArtifactKeyDto = exports.ArtifactResponseDto = exports.GraphResponseDto = exports.GraphEdgeDto = exports.GraphNodeDto = exports.HealthResponseDto = exports.StateResponseDto = exports.StateMetadataDto = exports.EventsResponseDto = exports.EventItemDto = exports.SessionsResponseDto = exports.SessionResponseDto = exports.MessageResponseDto = exports.MessagesResponseDto = exports.MessageItemDto = exports.AgentsListResponseDto = exports.AgentListItemDto = exports.ErrorResponseDto = exports.SuccessResponseDto = void 0;
const swagger_1 = require("@nestjs/swagger");
// Generic success / error
class SuccessResponseDto {
success;
}
exports.SuccessResponseDto = SuccessResponseDto;
__decorate([
(0, swagger_1.ApiProperty)({ example: true }),
__metadata("design:type", Boolean)
], SuccessResponseDto.prototype, "success", void 0);
class ErrorResponseDto {
error;
}
exports.ErrorResponseDto = ErrorResponseDto;
__decorate([
(0, swagger_1.ApiProperty)({ example: "Failed to load agent" }),
__metadata("design:type", String)
], ErrorResponseDto.prototype, "error", void 0);
// Agents
class AgentListItemDto {
path;
name;
directory;
relativePath;
}
exports.AgentListItemDto = AgentListItemDto;
__decorate([
(0, swagger_1.ApiProperty)(),
__metadata("design:type", String)
], AgentListItemDto.prototype, "path", void 0);
__decorate([
(0, swagger_1.ApiProperty)(),
__metadata("design:type", String)
], AgentListItemDto.prototype, "name", void 0);
__decorate([
(0, swagger_1.ApiProperty)(),
__metadata("design:type", String)
], AgentListItemDto.prototype, "directory", void 0);
__decorate([
(0, swagger_1.ApiProperty)(),
__metadata("design:type", String)
], AgentListItemDto.prototype, "relativePath", void 0);
class AgentsListResponseDto {
agents;
}
exports.AgentsListResponseDto = AgentsListResponseDto;
__decorate([
(0, swagger_1.ApiProperty)({ type: [AgentListItemDto] }),
__metadata("design:type", Array)
], AgentsListResponseDto.prototype, "agents", void 0);
// Messages
class MessageItemDto {
id;
type;
content;
timestamp;
}
exports.MessageItemDto = MessageItemDto;
__decorate([
(0, swagger_1.ApiProperty)({ example: 1 }),
__metadata("design:type", Number)
], MessageItemDto.prototype, "id", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ enum: ["user", "assistant"], example: "user" }),
__metadata("design:type", String)
], MessageItemDto.prototype, "type", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ example: "Hello" }),
__metadata("design:type", String)
], MessageItemDto.prototype, "content", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ example: new Date().toISOString() }),
__metadata("design:type", String)
], MessageItemDto.prototype, "timestamp", void 0);
class MessagesResponseDto {
messages;
}
exports.MessagesResponseDto = MessagesResponseDto;
__decorate([
(0, swagger_1.ApiProperty)({ type: [MessageItemDto] }),
__metadata("design:type", Array)
], MessagesResponseDto.prototype, "messages", void 0);
class MessageResponseDto {
response;
agentName;
}
exports.MessageResponseDto = MessageResponseDto;
__decorate([
(0, swagger_1.ApiProperty)({ example: "Hi there!" }),
__metadata("design:type", String)
], MessageResponseDto.prototype, "response", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ example: "ResearchAgent" }),
__metadata("design:type", String)
], MessageResponseDto.prototype, "agentName", void 0);
// Sessions
class SessionResponseDto {
id;
appName;
userId;
state;
eventCount;
lastUpdateTime;
createdAt;
}
exports.SessionResponseDto = SessionResponseDto;
__decorate([
(0, swagger_1.ApiProperty)(),
__metadata("design:type", String)
], SessionResponseDto.prototype, "id", void 0);
__decorate([
(0, swagger_1.ApiProperty)(),
__metadata("design:type", String)
], SessionResponseDto.prototype, "appName", void 0);
__decorate([
(0, swagger_1.ApiProperty)(),
__metadata("design:type", String)
], SessionResponseDto.prototype, "userId", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ type: Object }),
__metadata("design:type", Object)
], SessionResponseDto.prototype, "state", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ example: 3 }),
__metadata("design:type", Number)
], SessionResponseDto.prototype, "eventCount", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ example: Date.now() }),
__metadata("design:type", Number)
], SessionResponseDto.prototype, "lastUpdateTime", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ example: Date.now() }),
__metadata("design:type", Number)
], SessionResponseDto.prototype, "createdAt", void 0);
class SessionsResponseDto {
sessions;
}
exports.SessionsResponseDto = SessionsResponseDto;
__decorate([
(0, swagger_1.ApiProperty)({ type: [SessionResponseDto] }),
__metadata("design:type", Array)
], SessionsResponseDto.prototype, "sessions", void 0);
// Events
class EventItemDto {
id;
author;
timestamp;
content;
actions;
functionCalls;
functionResponses;
branch;
isFinalResponse;
}
exports.EventItemDto = EventItemDto;
__decorate([
(0, swagger_1.ApiProperty)(),
__metadata("design:type", String)
], EventItemDto.prototype, "id", void 0);
__decorate([
(0, swagger_1.ApiProperty)(),
__metadata("design:type", String)
], EventItemDto.prototype, "author", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ example: Date.now() }),
__metadata("design:type", Number)
], EventItemDto.prototype, "timestamp", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ description: "Raw event content", type: Object }),
__metadata("design:type", Object)
], EventItemDto.prototype, "content", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ type: Object, nullable: true }),
__metadata("design:type", Object)
], EventItemDto.prototype, "actions", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ type: [Object] }),
__metadata("design:type", Array)
], EventItemDto.prototype, "functionCalls", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ type: [Object] }),
__metadata("design:type", Array)
], EventItemDto.prototype, "functionResponses", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ required: false, nullable: true }),
__metadata("design:type", String)
], EventItemDto.prototype, "branch", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ example: false }),
__metadata("design:type", Boolean)
], EventItemDto.prototype, "isFinalResponse", void 0);
class EventsResponseDto {
events;
totalCount;
}
exports.EventsResponseDto = EventsResponseDto;
__decorate([
(0, swagger_1.ApiProperty)({ type: [EventItemDto] }),
__metadata("design:type", Array)
], EventsResponseDto.prototype, "events", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ example: 1 }),
__metadata("design:type", Number)
], EventsResponseDto.prototype, "totalCount", void 0);
// State
class StateMetadataDto {
lastUpdated;
changeCount;
totalKeys;
sizeBytes;
}
exports.StateMetadataDto = StateMetadataDto;
__decorate([
(0, swagger_1.ApiProperty)({ example: Date.now() }),
__metadata("design:type", Number)
], StateMetadataDto.prototype, "lastUpdated", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ example: 0 }),
__metadata("design:type", Number)
], StateMetadataDto.prototype, "changeCount", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ example: 5 }),
__metadata("design:type", Number)
], StateMetadataDto.prototype, "totalKeys", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ example: 120 }),
__metadata("design:type", Number)
], StateMetadataDto.prototype, "sizeBytes", void 0);
class StateResponseDto {
agentState;
userState;
sessionState;
metadata;
}
exports.StateResponseDto = StateResponseDto;
__decorate([
(0, swagger_1.ApiProperty)({ type: Object }),
__metadata("design:type", Object)
], StateResponseDto.prototype, "agentState", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ type: Object }),
__metadata("design:type", Object)
], StateResponseDto.prototype, "userState", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ type: Object }),
__metadata("design:type", Object)
], StateResponseDto.prototype, "sessionState", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ type: StateMetadataDto }),
__metadata("design:type", StateMetadataDto)
], StateResponseDto.prototype, "metadata", void 0);
// Health
class HealthResponseDto {
status;
version;
}
exports.HealthResponseDto = HealthResponseDto;
__decorate([
(0, swagger_1.ApiProperty)({ example: "ok" }),
__metadata("design:type", String)
], HealthResponseDto.prototype, "status", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ example: "0.3.13" }),
__metadata("design:type", String)
], HealthResponseDto.prototype, "version", void 0);
// Graph
class GraphNodeDto {
id;
label;
kind;
type;
shape;
group;
}
exports.GraphNodeDto = GraphNodeDto;
__decorate([
(0, swagger_1.ApiProperty)(),
__metadata("design:type", String)
], GraphNodeDto.prototype, "id", void 0);
__decorate([
(0, swagger_1.ApiProperty)(),
__metadata("design:type", String)
], GraphNodeDto.prototype, "label", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ enum: ["agent", "tool"] }),
__metadata("design:type", String)
], GraphNodeDto.prototype, "kind", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ required: false }),
__metadata("design:type", String)
], GraphNodeDto.prototype, "type", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ required: false }),
__metadata("design:type", String)
], GraphNodeDto.prototype, "shape", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ required: false }),
__metadata("design:type", String)
], GraphNodeDto.prototype, "group", void 0);
class GraphEdgeDto {
from;
to;
}
exports.GraphEdgeDto = GraphEdgeDto;
__decorate([
(0, swagger_1.ApiProperty)(),
__metadata("design:type", String)
], GraphEdgeDto.prototype, "from", void 0);
__decorate([
(0, swagger_1.ApiProperty)(),
__metadata("design:type", String)
], GraphEdgeDto.prototype, "to", void 0);
class GraphResponseDto {
nodes;
edges;
}
exports.GraphResponseDto = GraphResponseDto;
__decorate([
(0, swagger_1.ApiProperty)({ type: [GraphNodeDto] }),
__metadata("design:type", Array)
], GraphResponseDto.prototype, "nodes", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ type: [GraphEdgeDto] }),
__metadata("design:type", Array)
], GraphResponseDto.prototype, "edges", void 0);
// Artifacts
class ArtifactResponseDto {
filename;
mimeType;
contents;
version;
timestamp;
}
exports.ArtifactResponseDto = ArtifactResponseDto;
__decorate([
(0, swagger_1.ApiProperty)({ example: "output.txt" }),
__metadata("design:type", String)
], ArtifactResponseDto.prototype, "filename", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ example: "text/plain" }),
__metadata("design:type", String)
], ArtifactResponseDto.prototype, "mimeType", void 0);
__decorate([
(0, swagger_1.ApiProperty)({
type: String,
description: "Base64 encoded content or text content",
}),
__metadata("design:type", Object)
], ArtifactResponseDto.prototype, "contents", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ example: 1 }),
__metadata("design:type", Number)
], ArtifactResponseDto.prototype, "version", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ example: Date.now() }),
__metadata("design:type", Number)
], ArtifactResponseDto.prototype, "timestamp", void 0);
class ArtifactKeyDto {
filename;
}
exports.ArtifactKeyDto = ArtifactKeyDto;
__decorate([
(0, swagger_1.ApiProperty)({ example: "output.txt" }),
__metadata("design:type", String)
], ArtifactKeyDto.prototype, "filename", void 0);
class ArtifactsListResponseDto {
artifacts;
}
exports.ArtifactsListResponseDto = ArtifactsListResponseDto;
__decorate([
(0, swagger_1.ApiProperty)({ type: [ArtifactKeyDto] }),
__metadata("design:type", Array)
], ArtifactsListResponseDto.prototype, "artifacts", void 0);
class ArtifactVersionDto {
version;
timestamp;
}
exports.ArtifactVersionDto = ArtifactVersionDto;
__decorate([
(0, swagger_1.ApiProperty)({ example: 1 }),
__metadata("design:type", Number)
], ArtifactVersionDto.prototype, "version", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ example: Date.now() }),
__metadata("design:type", Number)
], ArtifactVersionDto.prototype, "timestamp", void 0);
class ArtifactVersionsResponseDto {
versions;
}
exports.ArtifactVersionsResponseDto = ArtifactVersionsResponseDto;
__decorate([
(0, swagger_1.ApiProperty)({ type: [ArtifactVersionDto] }),
__metadata("design:type", Array)
], ArtifactVersionsResponseDto.prototype, "versions", void 0);
//# sourceMappingURL=api.dto.js.map