@agent-os-sdk/client 0.1.1 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/AgentOsClient.d.ts +57 -38
- package/dist/client/AgentOsClient.d.ts.map +1 -1
- package/dist/client/AgentOsClient.js +192 -37
- package/dist/client/auth.d.ts +102 -0
- package/dist/client/auth.d.ts.map +1 -0
- package/dist/client/auth.js +44 -0
- package/dist/generated/openapi.d.ts +1009 -204
- package/dist/generated/openapi.d.ts.map +1 -1
- package/dist/index.d.ts +12 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -0
- package/dist/modules/approvals.d.ts +64 -0
- package/dist/modules/approvals.d.ts.map +1 -0
- package/dist/modules/approvals.js +54 -0
- package/dist/modules/artifacts.d.ts +49 -0
- package/dist/modules/artifacts.d.ts.map +1 -0
- package/dist/modules/artifacts.js +50 -0
- package/dist/modules/budgets.d.ts +81 -0
- package/dist/modules/budgets.d.ts.map +1 -0
- package/dist/modules/budgets.js +50 -0
- package/dist/modules/builder.d.ts +23 -3
- package/dist/modules/builder.d.ts.map +1 -1
- package/dist/modules/builder.js +28 -6
- package/dist/modules/capabilities.d.ts +57 -0
- package/dist/modules/capabilities.d.ts.map +1 -0
- package/dist/modules/capabilities.js +50 -0
- package/dist/modules/deployments.d.ts +67 -0
- package/dist/modules/deployments.d.ts.map +1 -0
- package/dist/modules/deployments.js +58 -0
- package/dist/modules/flows.d.ts +84 -0
- package/dist/modules/flows.d.ts.map +1 -0
- package/dist/modules/flows.js +66 -0
- package/dist/modules/handoff.d.ts +91 -0
- package/dist/modules/handoff.d.ts.map +1 -0
- package/dist/modules/handoff.js +65 -0
- package/dist/modules/incidents.d.ts +72 -0
- package/dist/modules/incidents.d.ts.map +1 -0
- package/dist/modules/incidents.js +54 -0
- package/dist/modules/members.d.ts +5 -0
- package/dist/modules/members.d.ts.map +1 -1
- package/dist/modules/members.js +10 -0
- package/dist/modules/policies.d.ts +76 -0
- package/dist/modules/policies.d.ts.map +1 -0
- package/dist/modules/policies.js +46 -0
- package/dist/modules/runs.d.ts +89 -3
- package/dist/modules/runs.d.ts.map +1 -1
- package/dist/modules/runs.js +75 -4
- package/dist/modules/tenants.d.ts +4 -0
- package/dist/modules/tenants.d.ts.map +1 -1
- package/dist/modules/tenants.js +8 -0
- package/package.json +49 -48
- package/src/client/AgentOsClient.ts +217 -61
- package/src/client/auth.ts +148 -0
- package/src/generated/openapi.ts +1009 -204
- package/src/generated/swagger.json +947 -700
- package/src/index.ts +25 -2
- package/src/modules/approvals.ts +109 -0
- package/src/modules/artifacts.ts +83 -0
- package/src/modules/budgets.ts +120 -0
- package/src/modules/builder.ts +26 -4
- package/src/modules/capabilities.ts +95 -0
- package/src/modules/deployments.ts +111 -0
- package/src/modules/flows.ts +133 -0
- package/src/modules/handoff.ts +140 -0
- package/src/modules/incidents.ts +113 -0
- package/src/modules/members.ts +11 -0
- package/src/modules/policies.ts +112 -0
- package/src/modules/runs.ts +123 -5
- package/src/modules/tenants.ts +9 -0
package/dist/index.d.ts
CHANGED
|
@@ -34,12 +34,13 @@
|
|
|
34
34
|
* }
|
|
35
35
|
* ```
|
|
36
36
|
*/
|
|
37
|
-
export { AgentOsClient, type AgentOsClientOptions } from "./client/AgentOsClient.js";
|
|
37
|
+
export { AgentOsClient, type AgentOsClientOptions, type AgentOsClientOptionsLegacy, type AuthProvider } from "./client/AgentOsClient.js";
|
|
38
|
+
export { type ApiTokenAuth, type JwtAuth, isApiTokenAuth, isJwtAuth, isNewAuthOptions, isBrowser, isApiToken, isJwtToken, } from "./client/auth.js";
|
|
38
39
|
export { unwrap, toResult, SDKError, type PaginationParams, type PaginatedResponse, type Result, type Unwrapped, } from "./client/helpers.js";
|
|
39
40
|
export { createRawClient, createTypedClient, type RawClient, type TypedClient, type ClientOptions, type APIResponse, } from "./client/raw.js";
|
|
40
41
|
export type { paths, components } from "./client/raw.js";
|
|
41
42
|
export { AgentsModule, type Agent, type AgentVersion, type AgentListResponse, type AgentGraphResponse } from "./modules/agents.js";
|
|
42
|
-
export { RunsModule, type Run, type RunEvent, type RunListResponse, type RunEventsResponse, type CreateRunResponse } from "./modules/runs.js";
|
|
43
|
+
export { RunsModule, type Run, type RunStatus, type RunEvent, type RunListResponse, type RunEventsResponse, type CreateRunResponse, type RunEventsPollResponse, type RunEventDto } from "./modules/runs.js";
|
|
43
44
|
export { ThreadsModule, type Thread, type ThreadState, type ThreadMessage, type ThreadRun, type ThreadListResponse, type ThreadMessagesResponse } from "./modules/threads.js";
|
|
44
45
|
export { ToolsModule, type Tool, type ToolListResponse } from "./modules/tools.js";
|
|
45
46
|
export { KnowledgeModule, type KnowledgeDataset, type KnowledgeSearchResponse } from "./modules/knowledge.js";
|
|
@@ -67,6 +68,15 @@ export { MeModule, type MeResponse } from "./modules/me.js";
|
|
|
67
68
|
export { InfoModule, type ServerInfo } from "./modules/info.js";
|
|
68
69
|
export { MetricsModule, type MetricsResponse } from "./modules/metrics.js";
|
|
69
70
|
export { GraphsModule, type GraphValidationResult, type GraphIntrospectionResult } from "./modules/graphs.js";
|
|
71
|
+
export { HandoffModule, type HandoffOptions, type HandoffResult, type ForkOptions, type ForkResult, type RunChain, type RunChainNode, type HandoffMode, type HandoffConstraints } from "./modules/handoff.js";
|
|
72
|
+
export { FlowsModule, type Flow, type FlowStep, type FlowRun, type FlowVisualization, type FlowSimulationResult, type FlowStatus, type FlowListResponse } from "./modules/flows.js";
|
|
73
|
+
export { CapabilitiesModule, type Capability, type CapabilityType, type CapabilityTest, type CapabilityMatrix } from "./modules/capabilities.js";
|
|
74
|
+
export { PoliciesModule, type Policy, type PolicyScope, type PolicyEnforcement, type PolicyRule, type PolicyEvaluation, type PolicyEvaluationResult } from "./modules/policies.js";
|
|
75
|
+
export { ApprovalsModule, type Approval, type ApprovalStatus, type ApprovalRequest, type ApprovalDecision, type ApprovalListResponse } from "./modules/approvals.js";
|
|
76
|
+
export { BudgetsModule, type Budget, type BudgetPeriod, type BudgetScope, type BudgetResourceType, type BudgetUsage, type BudgetAlert, type BudgetBreakdownItem } from "./modules/budgets.js";
|
|
77
|
+
export { DeploymentsModule, type Environment, type Deployment, type DeploymentStatus, type DeploymentConfig, type DeploymentHealth } from "./modules/deployments.js";
|
|
78
|
+
export { IncidentsModule, type Incident, type IncidentSeverity, type IncidentStatus, type IncidentUpdate, type IncidentMetrics } from "./modules/incidents.js";
|
|
79
|
+
export { ArtifactsModule, type Artifact, type ArtifactType, type ArtifactUploadUrl } from "./modules/artifacts.js";
|
|
70
80
|
export { streamSSE, type SSEEvent, type SSEOptions, type RunStreamEvent } from "./sse/client.js";
|
|
71
81
|
export type { Agent as AgentSchema, CreateAgentRequest, UpdateAgentRequest, AgentBundle, CreateAgentVersionRequest, RunResponse, RunDetailResponse, WaitRunResponse, BatchRunResponse, CancelRunResponse, ReplayRequest, ThreadRequest, ThreadSearchRequest, AddMessageRequest, CheckpointDetail, CheckpointListResponse, CreateCredentialRequest, UpdateCredentialRequest, CreateCronJobRequest, UpdateCronJobRequest, InviteMemberRequest, UpdateMemberRequest, CreatePromptRequest, CreatePromptVersionRequest, CreatePresignedUploadRequest, PresignedUploadResponse, VectorStoreResponse, VectorQueryRequest, VectorQueryResponse, CreateDatasetRequest, CreateExperimentRequest, ProblemDetails, } from "./client/raw.js";
|
|
72
82
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAKH,OAAO,EAAE,aAAa,EAAE,KAAK,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;A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OAAO,EAAE,SAAS,EAAE,KAAK,QAAQ,EAAE,KAAK,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAKjG,YAAY,EAER,KAAK,IAAI,WAAW,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,WAAW,EACX,yBAAyB,EAEzB,WAAW,EACX,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EAEb,aAAa,EACb,mBAAmB,EACnB,iBAAiB,EAEjB,gBAAgB,EAChB,sBAAsB,EAEtB,uBAAuB,EACvB,uBAAuB,EAEvB,oBAAoB,EACpB,oBAAoB,EAEpB,mBAAmB,EACnB,mBAAmB,EAEnB,mBAAmB,EACnB,0BAA0B,EAE1B,4BAA4B,EAC5B,uBAAuB,EAEvB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EAEnB,oBAAoB,EACpB,uBAAuB,EAEvB,cAAc,GACjB,MAAM,iBAAiB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -38,6 +38,8 @@
|
|
|
38
38
|
// Main Client
|
|
39
39
|
// ============================================================================
|
|
40
40
|
export { AgentOsClient } from "./client/AgentOsClient.js";
|
|
41
|
+
// Auth Provider Types
|
|
42
|
+
export { isApiTokenAuth, isJwtAuth, isNewAuthOptions, isBrowser, isApiToken, isJwtToken, } from "./client/auth.js";
|
|
41
43
|
// ============================================================================
|
|
42
44
|
// Helpers & Utilities
|
|
43
45
|
// ============================================================================
|
|
@@ -80,6 +82,16 @@ export { MeModule } from "./modules/me.js";
|
|
|
80
82
|
export { InfoModule } from "./modules/info.js";
|
|
81
83
|
export { MetricsModule } from "./modules/metrics.js";
|
|
82
84
|
export { GraphsModule } from "./modules/graphs.js";
|
|
85
|
+
// FUTURE modules - All return 501 Not Implemented. When backend is ready, implement real calls.
|
|
86
|
+
export { HandoffModule } from "./modules/handoff.js";
|
|
87
|
+
export { FlowsModule } from "./modules/flows.js";
|
|
88
|
+
export { CapabilitiesModule } from "./modules/capabilities.js";
|
|
89
|
+
export { PoliciesModule } from "./modules/policies.js";
|
|
90
|
+
export { ApprovalsModule } from "./modules/approvals.js";
|
|
91
|
+
export { BudgetsModule } from "./modules/budgets.js";
|
|
92
|
+
export { DeploymentsModule } from "./modules/deployments.js";
|
|
93
|
+
export { IncidentsModule } from "./modules/incidents.js";
|
|
94
|
+
export { ArtifactsModule } from "./modules/artifacts.js";
|
|
83
95
|
// ============================================================================
|
|
84
96
|
// SSE Streaming
|
|
85
97
|
// ============================================================================
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Approvals Module - Human-in-the-Loop Native
|
|
3
|
+
*
|
|
4
|
+
* NOT IMPLEMENTED - Backend endpoint not available.
|
|
5
|
+
* All methods return 501 NotImplemented.
|
|
6
|
+
*/
|
|
7
|
+
import type { RawClient, APIResponse } from "../client/raw.js";
|
|
8
|
+
export type ApprovalStatus = "pending" | "approved" | "rejected" | "expired" | "auto_approved";
|
|
9
|
+
export interface Approval {
|
|
10
|
+
id: string;
|
|
11
|
+
run_id: string;
|
|
12
|
+
thread_id?: string;
|
|
13
|
+
action: string;
|
|
14
|
+
payload: Record<string, unknown>;
|
|
15
|
+
status: ApprovalStatus;
|
|
16
|
+
reason?: string;
|
|
17
|
+
requested_at: string;
|
|
18
|
+
responded_at?: string;
|
|
19
|
+
responded_by?: string;
|
|
20
|
+
expires_at?: string;
|
|
21
|
+
auto_approve_after?: number;
|
|
22
|
+
}
|
|
23
|
+
export interface ApprovalRequest {
|
|
24
|
+
run_id: string;
|
|
25
|
+
action: string;
|
|
26
|
+
payload: Record<string, unknown>;
|
|
27
|
+
expires_in_seconds?: number;
|
|
28
|
+
auto_approve_after_seconds?: number;
|
|
29
|
+
notify_channels?: string[];
|
|
30
|
+
}
|
|
31
|
+
export interface ApprovalListResponse {
|
|
32
|
+
items: Approval[];
|
|
33
|
+
total: number;
|
|
34
|
+
pending_count: number;
|
|
35
|
+
}
|
|
36
|
+
export interface ApprovalDecision {
|
|
37
|
+
approval_id: string;
|
|
38
|
+
decision: "approve" | "reject";
|
|
39
|
+
reason?: string;
|
|
40
|
+
modified_payload?: Record<string, unknown>;
|
|
41
|
+
}
|
|
42
|
+
export declare class ApprovalsModule {
|
|
43
|
+
private client;
|
|
44
|
+
private headers;
|
|
45
|
+
constructor(client: RawClient, headers: () => Record<string, string>);
|
|
46
|
+
/** @returns 501 Not Implemented */
|
|
47
|
+
list(params?: {
|
|
48
|
+
status?: ApprovalStatus;
|
|
49
|
+
run_id?: string;
|
|
50
|
+
limit?: number;
|
|
51
|
+
offset?: number;
|
|
52
|
+
}): Promise<APIResponse<ApprovalListResponse>>;
|
|
53
|
+
/** @returns 501 Not Implemented */
|
|
54
|
+
get(approvalId: string): Promise<APIResponse<Approval>>;
|
|
55
|
+
/** @returns 501 Not Implemented */
|
|
56
|
+
create(request: ApprovalRequest): Promise<APIResponse<Approval>>;
|
|
57
|
+
/** @returns 501 Not Implemented */
|
|
58
|
+
approve(approvalId: string, reason?: string): Promise<APIResponse<Approval>>;
|
|
59
|
+
/** @returns 501 Not Implemented */
|
|
60
|
+
reject(approvalId: string, reason?: string): Promise<APIResponse<Approval>>;
|
|
61
|
+
/** @returns 501 Not Implemented */
|
|
62
|
+
awaitApproval(runId: string, timeoutSeconds?: number): Promise<APIResponse<Approval>>;
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=approvals.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"approvals.d.ts","sourceRoot":"","sources":["../../src/modules/approvals.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAM/D,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,GAAG,eAAe,CAAC;AAE/F,MAAM,WAAW,QAAQ;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM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AAE,cAAc,CAAC;QACxB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;KACnB,GAAG,OAAO,CAAC,WAAW,CAAC,oBAAoB,CAAC,CAAC;IAI9C,mCAAmC;IAC7B,GAAG,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;IAI7D,mCAAmC;IAC7B,MAAM,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;IAItE,mCAAmC;IAC7B,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;IAIlF,mCAAmC;IAC7B,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;IAIjF,mCAAmC;IAC7B,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;CAG9F"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Approvals Module - Human-in-the-Loop Native
|
|
3
|
+
*
|
|
4
|
+
* NOT IMPLEMENTED - Backend endpoint not available.
|
|
5
|
+
* All methods return 501 NotImplemented.
|
|
6
|
+
*/
|
|
7
|
+
// ============================================================================
|
|
8
|
+
// Helper for 501 responses
|
|
9
|
+
// ============================================================================
|
|
10
|
+
function notImplemented(method) {
|
|
11
|
+
return {
|
|
12
|
+
data: undefined,
|
|
13
|
+
error: {
|
|
14
|
+
code: "NOT_IMPLEMENTED",
|
|
15
|
+
message: `ApprovalsModule.${method}() is not implemented. Backend endpoint not available.`,
|
|
16
|
+
},
|
|
17
|
+
response: new Response(null, { status: 501, statusText: "Not Implemented" }),
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
// ============================================================================
|
|
21
|
+
// Module
|
|
22
|
+
// ============================================================================
|
|
23
|
+
export class ApprovalsModule {
|
|
24
|
+
client;
|
|
25
|
+
headers;
|
|
26
|
+
constructor(client, headers) {
|
|
27
|
+
this.client = client;
|
|
28
|
+
this.headers = headers;
|
|
29
|
+
}
|
|
30
|
+
/** @returns 501 Not Implemented */
|
|
31
|
+
async list(params) {
|
|
32
|
+
return notImplemented("list");
|
|
33
|
+
}
|
|
34
|
+
/** @returns 501 Not Implemented */
|
|
35
|
+
async get(approvalId) {
|
|
36
|
+
return notImplemented("get");
|
|
37
|
+
}
|
|
38
|
+
/** @returns 501 Not Implemented */
|
|
39
|
+
async create(request) {
|
|
40
|
+
return notImplemented("create");
|
|
41
|
+
}
|
|
42
|
+
/** @returns 501 Not Implemented */
|
|
43
|
+
async approve(approvalId, reason) {
|
|
44
|
+
return notImplemented("approve");
|
|
45
|
+
}
|
|
46
|
+
/** @returns 501 Not Implemented */
|
|
47
|
+
async reject(approvalId, reason) {
|
|
48
|
+
return notImplemented("reject");
|
|
49
|
+
}
|
|
50
|
+
/** @returns 501 Not Implemented */
|
|
51
|
+
async awaitApproval(runId, timeoutSeconds) {
|
|
52
|
+
return notImplemented("awaitApproval");
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Artifacts Module - Run Output Management
|
|
3
|
+
*
|
|
4
|
+
* NOT IMPLEMENTED - Backend endpoint not available.
|
|
5
|
+
* All methods return 501 NotImplemented.
|
|
6
|
+
*/
|
|
7
|
+
import type { RawClient, APIResponse } from "../client/raw.js";
|
|
8
|
+
export type ArtifactType = "file" | "image" | "json" | "text" | "log" | "report";
|
|
9
|
+
export interface Artifact {
|
|
10
|
+
id: string;
|
|
11
|
+
run_id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
type: ArtifactType;
|
|
14
|
+
mime_type?: string;
|
|
15
|
+
size_bytes: number;
|
|
16
|
+
checksum?: string;
|
|
17
|
+
download_url?: string;
|
|
18
|
+
preview_url?: string;
|
|
19
|
+
metadata?: Record<string, unknown>;
|
|
20
|
+
created_at: string;
|
|
21
|
+
expires_at?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface ArtifactUploadUrl {
|
|
24
|
+
upload_url: string;
|
|
25
|
+
artifact_id: string;
|
|
26
|
+
expires_at: string;
|
|
27
|
+
}
|
|
28
|
+
export declare class ArtifactsModule {
|
|
29
|
+
private client;
|
|
30
|
+
private headers;
|
|
31
|
+
constructor(client: RawClient, headers: () => Record<string, string>);
|
|
32
|
+
/** @returns 501 Not Implemented */
|
|
33
|
+
list(runId: string): Promise<APIResponse<{
|
|
34
|
+
items: Artifact[];
|
|
35
|
+
total: number;
|
|
36
|
+
}>>;
|
|
37
|
+
/** @returns 501 Not Implemented */
|
|
38
|
+
get(artifactId: string): Promise<APIResponse<Artifact>>;
|
|
39
|
+
/** @returns 501 Not Implemented */
|
|
40
|
+
getDownloadUrl(artifactId: string): Promise<APIResponse<{
|
|
41
|
+
url: string;
|
|
42
|
+
expires_at: string;
|
|
43
|
+
}>>;
|
|
44
|
+
/** @returns 501 Not Implemented */
|
|
45
|
+
createUploadUrl(runId: string, name: string, type: ArtifactType): Promise<APIResponse<ArtifactUploadUrl>>;
|
|
46
|
+
/** @returns 501 Not Implemented */
|
|
47
|
+
delete(artifactId: string): Promise<APIResponse<void>>;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=artifacts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"artifacts.d.ts","sourceRoot":"","sources":["../../src/modules/artifacts.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAM/D,MAAM,MAAM,YAAY,GAAG,MAAM,G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C;IAInG,mCAAmC;IAC7B,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC;IAI/G,mCAAmC;IAC7B,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;CAG/D"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Artifacts Module - Run Output Management
|
|
3
|
+
*
|
|
4
|
+
* NOT IMPLEMENTED - Backend endpoint not available.
|
|
5
|
+
* All methods return 501 NotImplemented.
|
|
6
|
+
*/
|
|
7
|
+
// ============================================================================
|
|
8
|
+
// Helper for 501 responses
|
|
9
|
+
// ============================================================================
|
|
10
|
+
function notImplemented(method) {
|
|
11
|
+
return {
|
|
12
|
+
data: undefined,
|
|
13
|
+
error: {
|
|
14
|
+
code: "NOT_IMPLEMENTED",
|
|
15
|
+
message: `ArtifactsModule.${method}() is not implemented. Backend endpoint not available.`,
|
|
16
|
+
},
|
|
17
|
+
response: new Response(null, { status: 501, statusText: "Not Implemented" }),
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
// ============================================================================
|
|
21
|
+
// Module
|
|
22
|
+
// ============================================================================
|
|
23
|
+
export class ArtifactsModule {
|
|
24
|
+
client;
|
|
25
|
+
headers;
|
|
26
|
+
constructor(client, headers) {
|
|
27
|
+
this.client = client;
|
|
28
|
+
this.headers = headers;
|
|
29
|
+
}
|
|
30
|
+
/** @returns 501 Not Implemented */
|
|
31
|
+
async list(runId) {
|
|
32
|
+
return notImplemented("list");
|
|
33
|
+
}
|
|
34
|
+
/** @returns 501 Not Implemented */
|
|
35
|
+
async get(artifactId) {
|
|
36
|
+
return notImplemented("get");
|
|
37
|
+
}
|
|
38
|
+
/** @returns 501 Not Implemented */
|
|
39
|
+
async getDownloadUrl(artifactId) {
|
|
40
|
+
return notImplemented("getDownloadUrl");
|
|
41
|
+
}
|
|
42
|
+
/** @returns 501 Not Implemented */
|
|
43
|
+
async createUploadUrl(runId, name, type) {
|
|
44
|
+
return notImplemented("createUploadUrl");
|
|
45
|
+
}
|
|
46
|
+
/** @returns 501 Not Implemented */
|
|
47
|
+
async delete(artifactId) {
|
|
48
|
+
return notImplemented("delete");
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Budgets Module - Cost & Token Management
|
|
3
|
+
*
|
|
4
|
+
* NOT IMPLEMENTED - Backend endpoint not available.
|
|
5
|
+
* All methods return 501 NotImplemented.
|
|
6
|
+
*/
|
|
7
|
+
import type { RawClient, APIResponse } from "../client/raw.js";
|
|
8
|
+
export type BudgetScope = "agent" | "workspace" | "tenant" | "user";
|
|
9
|
+
export type BudgetPeriod = "daily" | "weekly" | "monthly" | "total";
|
|
10
|
+
export type BudgetResourceType = "tokens" | "cost" | "api_calls";
|
|
11
|
+
export interface Budget {
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
scope: BudgetScope;
|
|
15
|
+
scope_id: string;
|
|
16
|
+
resource_type: BudgetResourceType;
|
|
17
|
+
limit_value: number;
|
|
18
|
+
current_value: number;
|
|
19
|
+
period: BudgetPeriod;
|
|
20
|
+
period_start: string;
|
|
21
|
+
period_end: string;
|
|
22
|
+
alert_threshold_percent?: number;
|
|
23
|
+
created_at: string;
|
|
24
|
+
}
|
|
25
|
+
export interface BudgetUsage {
|
|
26
|
+
budget_id: string;
|
|
27
|
+
current_value: number;
|
|
28
|
+
limit_value: number;
|
|
29
|
+
percent_used: number;
|
|
30
|
+
remaining: number;
|
|
31
|
+
period_start: string;
|
|
32
|
+
period_end: string;
|
|
33
|
+
breakdown: BudgetBreakdownItem[];
|
|
34
|
+
}
|
|
35
|
+
export interface BudgetBreakdownItem {
|
|
36
|
+
agent_id?: string;
|
|
37
|
+
agent_name?: string;
|
|
38
|
+
model?: string;
|
|
39
|
+
value: number;
|
|
40
|
+
percent_of_total: number;
|
|
41
|
+
}
|
|
42
|
+
export interface BudgetAlert {
|
|
43
|
+
id: string;
|
|
44
|
+
budget_id: string;
|
|
45
|
+
type: "threshold_warning" | "limit_reached" | "limit_exceeded";
|
|
46
|
+
message: string;
|
|
47
|
+
triggered_at: string;
|
|
48
|
+
acknowledged: boolean;
|
|
49
|
+
}
|
|
50
|
+
export declare class BudgetsModule {
|
|
51
|
+
private client;
|
|
52
|
+
private headers;
|
|
53
|
+
constructor(client: RawClient, headers: () => Record<string, string>);
|
|
54
|
+
/** @returns 501 Not Implemented */
|
|
55
|
+
list(params?: {
|
|
56
|
+
scope?: BudgetScope;
|
|
57
|
+
scope_id?: string;
|
|
58
|
+
limit?: number;
|
|
59
|
+
offset?: number;
|
|
60
|
+
}): Promise<APIResponse<{
|
|
61
|
+
items: Budget[];
|
|
62
|
+
total: number;
|
|
63
|
+
}>>;
|
|
64
|
+
/** @returns 501 Not Implemented */
|
|
65
|
+
get(budgetId: string): Promise<APIResponse<Budget>>;
|
|
66
|
+
/** @returns 501 Not Implemented */
|
|
67
|
+
create(body: {
|
|
68
|
+
name: string;
|
|
69
|
+
scope: BudgetScope;
|
|
70
|
+
scope_id: string;
|
|
71
|
+
resource_type: BudgetResourceType;
|
|
72
|
+
limit_value: number;
|
|
73
|
+
period: BudgetPeriod;
|
|
74
|
+
alert_threshold_percent?: number;
|
|
75
|
+
}): Promise<APIResponse<Budget>>;
|
|
76
|
+
/** @returns 501 Not Implemented */
|
|
77
|
+
getUsage(budgetId: string): Promise<APIResponse<BudgetUsage>>;
|
|
78
|
+
/** @returns 501 Not Implemented */
|
|
79
|
+
getAlerts(budgetId: string): Promise<APIResponse<BudgetAlert[]>>;
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=budgets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"budgets.d.ts","sourceRoot":"","sources":["../../src/mod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,mCAAmC;IAC7B,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC,CAAC;CAGzE"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Budgets Module - Cost & Token Management
|
|
3
|
+
*
|
|
4
|
+
* NOT IMPLEMENTED - Backend endpoint not available.
|
|
5
|
+
* All methods return 501 NotImplemented.
|
|
6
|
+
*/
|
|
7
|
+
// ============================================================================
|
|
8
|
+
// Helper for 501 responses
|
|
9
|
+
// ============================================================================
|
|
10
|
+
function notImplemented(method) {
|
|
11
|
+
return {
|
|
12
|
+
data: undefined,
|
|
13
|
+
error: {
|
|
14
|
+
code: "NOT_IMPLEMENTED",
|
|
15
|
+
message: `BudgetsModule.${method}() is not implemented. Backend endpoint not available.`,
|
|
16
|
+
},
|
|
17
|
+
response: new Response(null, { status: 501, statusText: "Not Implemented" }),
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
// ============================================================================
|
|
21
|
+
// Module
|
|
22
|
+
// ============================================================================
|
|
23
|
+
export class BudgetsModule {
|
|
24
|
+
client;
|
|
25
|
+
headers;
|
|
26
|
+
constructor(client, headers) {
|
|
27
|
+
this.client = client;
|
|
28
|
+
this.headers = headers;
|
|
29
|
+
}
|
|
30
|
+
/** @returns 501 Not Implemented */
|
|
31
|
+
async list(params) {
|
|
32
|
+
return notImplemented("list");
|
|
33
|
+
}
|
|
34
|
+
/** @returns 501 Not Implemented */
|
|
35
|
+
async get(budgetId) {
|
|
36
|
+
return notImplemented("get");
|
|
37
|
+
}
|
|
38
|
+
/** @returns 501 Not Implemented */
|
|
39
|
+
async create(body) {
|
|
40
|
+
return notImplemented("create");
|
|
41
|
+
}
|
|
42
|
+
/** @returns 501 Not Implemented */
|
|
43
|
+
async getUsage(budgetId) {
|
|
44
|
+
return notImplemented("getUsage");
|
|
45
|
+
}
|
|
46
|
+
/** @returns 501 Not Implemented */
|
|
47
|
+
async getAlerts(budgetId) {
|
|
48
|
+
return notImplemented("getAlerts");
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -1,8 +1,28 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Builder Module - Meta-Agent for Agent Building
|
|
3
3
|
*
|
|
4
|
-
* Connects to the
|
|
4
|
+
* Connects to the Control Plane's builder endpoint which proxies to the
|
|
5
|
+
* Data Plane's meta-agent for AI-assisted agent creation.
|
|
5
6
|
* Uses SSE streaming for real-time responses and graph updates.
|
|
7
|
+
*
|
|
8
|
+
* Flow: Frontend → CP:5000/v1/api/builder/{agentId}/chat → DP:8001/v1/internal/builder/{agentId}/chat
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const client = new AgentOsClient({ ... })
|
|
13
|
+
*
|
|
14
|
+
* // SSE streaming chat
|
|
15
|
+
* for await (const event of client.builder.chat(agentId, {
|
|
16
|
+
* message: "Adicione um nó de pesquisa web",
|
|
17
|
+
* current_graph_spec: { nodes: [...], edges: [...] }
|
|
18
|
+
* })) {
|
|
19
|
+
* if (event.type === 'message') console.log(event.data.text)
|
|
20
|
+
* if (event.type === 'graph_update') applyAction(event.data)
|
|
21
|
+
* }
|
|
22
|
+
*
|
|
23
|
+
* // Sync chat (no streaming)
|
|
24
|
+
* const result = await client.builder.chatSync(agentId, { message: "Mude as instruções" })
|
|
25
|
+
* ```
|
|
6
26
|
*/
|
|
7
27
|
import { type SSEOptions } from "../sse/client.js";
|
|
8
28
|
export type BuilderChatRequest = {
|
|
@@ -45,9 +65,9 @@ export type BuilderChatResponse = {
|
|
|
45
65
|
thread_id: string;
|
|
46
66
|
};
|
|
47
67
|
export declare class BuilderModule {
|
|
48
|
-
private
|
|
68
|
+
private baseUrl;
|
|
49
69
|
private headers;
|
|
50
|
-
constructor(
|
|
70
|
+
constructor(baseUrl: string, headers: () => Record<string, string>);
|
|
51
71
|
/**
|
|
52
72
|
* Stream chat with meta-agent (SSE).
|
|
53
73
|
* Returns async generator of events.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../../src/modules/builder.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../../src/modules/builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAA4B,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE7E,MAAM,MAAM,kBAAkB,GAAG;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GACxB;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,GAC3C;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,IAAI,EAAE,iBAAiB,CAAA;CAAE,GACjD;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,iBAAiB,EAAE,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,GAC7F;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,CAAC;AAEjD,MAAM,MAAM,mBAAmB,GAAG;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,qBAAa,aAAa;IAElB,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,OAAO;gBADP,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAGjD;;;OAGG;IACI,IAAI,CACP,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,kBAAkB,EAC3B,OAAO,CAAC,EAAE,UAAU,GACrB,cAAc,CAAC,kBAAkB,CAAC;IA+DrC;;OAEG;IACG,QAAQ,CACV,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,kBAAkB,GAC5B,OAAO,CAAC,mBAAmB,CAAC;IAqB/B;;OAEG;IACG,WAAW,CACb,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,kBAAkB,GAC5B,OAAO,CAAC,mBAAmB,CAAC;CAqBlC"}
|
package/dist/modules/builder.js
CHANGED
|
@@ -1,15 +1,35 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Builder Module - Meta-Agent for Agent Building
|
|
3
3
|
*
|
|
4
|
-
* Connects to the
|
|
4
|
+
* Connects to the Control Plane's builder endpoint which proxies to the
|
|
5
|
+
* Data Plane's meta-agent for AI-assisted agent creation.
|
|
5
6
|
* Uses SSE streaming for real-time responses and graph updates.
|
|
7
|
+
*
|
|
8
|
+
* Flow: Frontend → CP:5000/v1/api/builder/{agentId}/chat → DP:8001/v1/internal/builder/{agentId}/chat
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const client = new AgentOsClient({ ... })
|
|
13
|
+
*
|
|
14
|
+
* // SSE streaming chat
|
|
15
|
+
* for await (const event of client.builder.chat(agentId, {
|
|
16
|
+
* message: "Adicione um nó de pesquisa web",
|
|
17
|
+
* current_graph_spec: { nodes: [...], edges: [...] }
|
|
18
|
+
* })) {
|
|
19
|
+
* if (event.type === 'message') console.log(event.data.text)
|
|
20
|
+
* if (event.type === 'graph_update') applyAction(event.data)
|
|
21
|
+
* }
|
|
22
|
+
*
|
|
23
|
+
* // Sync chat (no streaming)
|
|
24
|
+
* const result = await client.builder.chatSync(agentId, { message: "Mude as instruções" })
|
|
25
|
+
* ```
|
|
6
26
|
*/
|
|
7
27
|
import { streamSSE } from "../sse/client.js";
|
|
8
28
|
export class BuilderModule {
|
|
9
|
-
|
|
29
|
+
baseUrl;
|
|
10
30
|
headers;
|
|
11
|
-
constructor(
|
|
12
|
-
this.
|
|
31
|
+
constructor(baseUrl, headers) {
|
|
32
|
+
this.baseUrl = baseUrl;
|
|
13
33
|
this.headers = headers;
|
|
14
34
|
}
|
|
15
35
|
/**
|
|
@@ -17,7 +37,8 @@ export class BuilderModule {
|
|
|
17
37
|
* Returns async generator of events.
|
|
18
38
|
*/
|
|
19
39
|
async *chat(agentId, request, options) {
|
|
20
|
-
|
|
40
|
+
// Use public API route (CP proxies to DP)
|
|
41
|
+
const url = `${this.baseUrl}/v1/api/builder/${agentId}/chat`;
|
|
21
42
|
const response = await fetch(url, {
|
|
22
43
|
method: "POST",
|
|
23
44
|
headers: {
|
|
@@ -77,7 +98,8 @@ export class BuilderModule {
|
|
|
77
98
|
* Sync chat with meta-agent (no streaming).
|
|
78
99
|
*/
|
|
79
100
|
async chatSync(agentId, request) {
|
|
80
|
-
|
|
101
|
+
// Use public API route (CP proxies to DP)
|
|
102
|
+
const url = `${this.baseUrl}/v1/api/builder/${agentId}/chat/sync`;
|
|
81
103
|
const response = await fetch(url, {
|
|
82
104
|
method: "POST",
|
|
83
105
|
headers: {
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Capabilities Module - Agent Capability Discovery
|
|
3
|
+
*
|
|
4
|
+
* NOT IMPLEMENTED - Backend endpoint not available.
|
|
5
|
+
* All methods return 501 NotImplemented.
|
|
6
|
+
*/
|
|
7
|
+
import type { RawClient, APIResponse } from "../client/raw.js";
|
|
8
|
+
export type CapabilityType = "tool" | "skill" | "knowledge" | "integration" | "model_feature";
|
|
9
|
+
export interface Capability {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
type: CapabilityType;
|
|
13
|
+
description?: string;
|
|
14
|
+
agent_id?: string;
|
|
15
|
+
is_available: boolean;
|
|
16
|
+
required_credentials?: string[];
|
|
17
|
+
required_permissions?: string[];
|
|
18
|
+
metadata?: Record<string, unknown>;
|
|
19
|
+
}
|
|
20
|
+
export interface CapabilityTest {
|
|
21
|
+
capability_id: string;
|
|
22
|
+
test_name: string;
|
|
23
|
+
passed: boolean;
|
|
24
|
+
message?: string;
|
|
25
|
+
duration_ms: number;
|
|
26
|
+
}
|
|
27
|
+
export interface CapabilityMatrix {
|
|
28
|
+
agent_id: string;
|
|
29
|
+
capabilities: Capability[];
|
|
30
|
+
total: number;
|
|
31
|
+
available: number;
|
|
32
|
+
unavailable: number;
|
|
33
|
+
}
|
|
34
|
+
export declare class CapabilitiesModule {
|
|
35
|
+
private client;
|
|
36
|
+
private headers;
|
|
37
|
+
constructor(client: RawClient, headers: () => Record<string, string>);
|
|
38
|
+
/** @returns 501 Not Implemented */
|
|
39
|
+
list(params?: {
|
|
40
|
+
agent_id?: string;
|
|
41
|
+
type?: CapabilityType;
|
|
42
|
+
limit?: number;
|
|
43
|
+
offset?: number;
|
|
44
|
+
}): Promise<APIResponse<{
|
|
45
|
+
items: Capability[];
|
|
46
|
+
total: number;
|
|
47
|
+
}>>;
|
|
48
|
+
/** @returns 501 Not Implemented */
|
|
49
|
+
get(capabilityId: string): Promise<APIResponse<Capability>>;
|
|
50
|
+
/** @returns 501 Not Implemented */
|
|
51
|
+
getMatrix(agentId: string): Promise<APIResponse<CapabilityMatrix>>;
|
|
52
|
+
/** @returns 501 Not Implemented */
|
|
53
|
+
test(agentId: string, capabilityId: string): Promise<APIResponse<CapabilityTest>>;
|
|
54
|
+
/** @returns 501 Not Implemented */
|
|
55
|
+
testAll(agentId: string): Promise<APIResponse<CapabilityTest[]>>;
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=capabilities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../src/modules/capabilities.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAM/D,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,OAAO,GAAG,WAAW,GAAG,aAAa,GAAG,eAAe,CAAC;AAE9F,MAAM,WAAW,UAAU;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,cAAc,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,OAAO,CAAC;IACtB,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAChC,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC;AAED,MAAM,WAAW,cAAc;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,gBAAgB;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,UAAU,EAAE,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACvB;AAqBD,qBA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