@elizaos/cli 1.6.2-alpha.13 → 1.6.2-alpha.14
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/commands/deploy/actions/deploy-bootstrapper.d.ts +10 -0
- package/dist/commands/deploy/actions/deploy-bootstrapper.d.ts.map +1 -0
- package/dist/commands/deploy/actions/deploy.d.ts +9 -0
- package/dist/commands/deploy/actions/deploy.d.ts.map +1 -0
- package/dist/commands/deploy/index.d.ts +7 -0
- package/dist/commands/deploy/index.d.ts.map +1 -0
- package/dist/commands/deploy/types.d.ts +191 -0
- package/dist/commands/deploy/types.d.ts.map +1 -0
- package/dist/commands/deploy/utils/api-client.d.ts +69 -0
- package/dist/commands/deploy/utils/api-client.d.ts.map +1 -0
- package/dist/commands/deploy/utils/artifact.d.ts +48 -0
- package/dist/commands/deploy/utils/artifact.d.ts.map +1 -0
- package/dist/index.js +19103 -10304
- package/dist/index.js.map +58 -14
- package/dist/templates/plugin-quick-starter/package.json +2 -2
- package/dist/templates/plugin-starter/package.json +2 -2
- package/dist/templates/project-starter/package.json +6 -6
- package/dist/templates/project-tee-starter/package.json +4 -4
- package/dist/version.d.ts +2 -2
- package/dist/version.js +2 -2
- package/package.json +12 -7
- package/templates/plugin-quick-starter/package.json +2 -2
- package/templates/plugin-starter/package.json +2 -2
- package/templates/project-starter/package.json +6 -6
- package/templates/project-tee-starter/package.json +4 -4
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deploy Action with Bootstrapper Architecture
|
|
3
|
+
* Deploys ElizaOS projects using artifact-based deployment
|
|
4
|
+
*/
|
|
5
|
+
import type { DeployOptions, DeploymentResult } from "../types";
|
|
6
|
+
/**
|
|
7
|
+
* Deploy project using bootstrapper architecture
|
|
8
|
+
*/
|
|
9
|
+
export declare function deployWithBootstrapper(options: DeployOptions): Promise<DeploymentResult>;
|
|
10
|
+
//# sourceMappingURL=deploy-bootstrapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deploy-bootstrapper.d.ts","sourceRoot":"","sources":["../../../../src/commands/deploy/actions/deploy-bootstrapper.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAIjB,MAAM,UAAU,CAAC;AAQlB;;GAEG;AACH,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,gBAAgB,CAAC,CAkU3B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deploy Action - Main deployment logic
|
|
3
|
+
*/
|
|
4
|
+
import type { DeployOptions, DeploymentResult } from "../types";
|
|
5
|
+
/**
|
|
6
|
+
* Main deployment handler - uses bootstrapper architecture
|
|
7
|
+
*/
|
|
8
|
+
export declare function deployProject(options: DeployOptions): Promise<DeploymentResult>;
|
|
9
|
+
//# sourceMappingURL=deploy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../../src/commands/deploy/actions/deploy.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAGhE;;GAEG;AACH,wBAAsB,aAAa,CACjC,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,gBAAgB,CAAC,CAY3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/deploy/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC,eAAO,MAAM,MAAM,SA6Ef,CAAC;AAEL,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deploy Command Types
|
|
3
|
+
* Types for deploying ElizaOS projects to Cloudflare Containers
|
|
4
|
+
*/
|
|
5
|
+
export interface DeployOptions {
|
|
6
|
+
name?: string;
|
|
7
|
+
port?: number;
|
|
8
|
+
maxInstances?: number;
|
|
9
|
+
apiKey?: string;
|
|
10
|
+
apiUrl?: string;
|
|
11
|
+
env?: string[];
|
|
12
|
+
skipArtifact?: boolean;
|
|
13
|
+
artifactPath?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface DeploymentResult {
|
|
16
|
+
success: boolean;
|
|
17
|
+
containerId?: string;
|
|
18
|
+
workerId?: string;
|
|
19
|
+
url?: string;
|
|
20
|
+
error?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface ContainerConfig {
|
|
23
|
+
name: string;
|
|
24
|
+
description?: string;
|
|
25
|
+
port: number;
|
|
26
|
+
max_instances: number;
|
|
27
|
+
environment_vars?: Record<string, string>;
|
|
28
|
+
health_check_path: string;
|
|
29
|
+
use_bootstrapper?: boolean;
|
|
30
|
+
artifact_url?: string;
|
|
31
|
+
artifact_id?: string;
|
|
32
|
+
artifact_checksum?: string;
|
|
33
|
+
image_tag?: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Base API response structure
|
|
37
|
+
*/
|
|
38
|
+
export interface CloudApiResponseBase {
|
|
39
|
+
success: boolean;
|
|
40
|
+
error?: string;
|
|
41
|
+
message?: string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* API response for successful operations with data
|
|
45
|
+
*/
|
|
46
|
+
export interface CloudApiSuccessResponse<T> extends CloudApiResponseBase {
|
|
47
|
+
success: true;
|
|
48
|
+
data: T;
|
|
49
|
+
error?: never;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* API response for failed operations
|
|
53
|
+
*/
|
|
54
|
+
export interface CloudApiErrorResponse extends CloudApiResponseBase {
|
|
55
|
+
success: false;
|
|
56
|
+
data?: never;
|
|
57
|
+
error: string;
|
|
58
|
+
details?: Record<string, unknown>;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* API response with credit information
|
|
62
|
+
*/
|
|
63
|
+
export interface CloudApiResponseWithCredits<T> extends CloudApiSuccessResponse<T> {
|
|
64
|
+
creditsDeducted: number;
|
|
65
|
+
creditsRemaining: number;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* API response for quota checks
|
|
69
|
+
*/
|
|
70
|
+
export interface CloudApiQuotaResponse extends CloudApiSuccessResponse<QuotaInfo> {
|
|
71
|
+
data: QuotaInfo;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Generic API response type (union of success and error)
|
|
75
|
+
*/
|
|
76
|
+
export type CloudApiResponse<T = unknown> = CloudApiSuccessResponse<T> | CloudApiErrorResponse | CloudApiResponseWithCredits<T>;
|
|
77
|
+
/**
|
|
78
|
+
* Quota information for container deployments
|
|
79
|
+
*/
|
|
80
|
+
export interface QuotaInfo {
|
|
81
|
+
quota: {
|
|
82
|
+
max: number;
|
|
83
|
+
current: number;
|
|
84
|
+
remaining: number;
|
|
85
|
+
};
|
|
86
|
+
credits: {
|
|
87
|
+
balance: number;
|
|
88
|
+
};
|
|
89
|
+
pricing: {
|
|
90
|
+
totalForNewContainer: number;
|
|
91
|
+
imageUpload?: number;
|
|
92
|
+
containerDeployment?: number;
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Image upload response data
|
|
97
|
+
*/
|
|
98
|
+
export interface ImageUploadData {
|
|
99
|
+
imageId: string;
|
|
100
|
+
digest: string;
|
|
101
|
+
size: number;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Container data from API
|
|
105
|
+
*/
|
|
106
|
+
export interface ContainerData {
|
|
107
|
+
id: string;
|
|
108
|
+
name: string;
|
|
109
|
+
status: string;
|
|
110
|
+
cloudflare_worker_id?: string;
|
|
111
|
+
deployment_url?: string;
|
|
112
|
+
cloudflare_url?: string;
|
|
113
|
+
error_message?: string;
|
|
114
|
+
created_at?: string;
|
|
115
|
+
updated_at?: string;
|
|
116
|
+
port?: number;
|
|
117
|
+
max_instances?: number;
|
|
118
|
+
environment_vars?: Record<string, string>;
|
|
119
|
+
health_check_path?: string;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Artifact upload request
|
|
123
|
+
*/
|
|
124
|
+
export interface ArtifactUploadRequest {
|
|
125
|
+
projectId: string;
|
|
126
|
+
version: string;
|
|
127
|
+
checksum: string;
|
|
128
|
+
size: number;
|
|
129
|
+
metadata?: Record<string, string>;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Artifact upload response from Cloud API
|
|
133
|
+
* Updated to match Cloud API v1 response format
|
|
134
|
+
*
|
|
135
|
+
* SECURITY: Raw credentials have been removed from this interface.
|
|
136
|
+
* The API no longer returns temporary AWS credentials to reduce attack surface.
|
|
137
|
+
* Use the presigned URLs (upload.url and download.url) which contain all
|
|
138
|
+
* necessary authentication embedded in the URL itself.
|
|
139
|
+
*/
|
|
140
|
+
export interface ArtifactUploadResponse {
|
|
141
|
+
artifactId: string;
|
|
142
|
+
upload: {
|
|
143
|
+
url: string;
|
|
144
|
+
method: "PUT";
|
|
145
|
+
expiresAt: string;
|
|
146
|
+
};
|
|
147
|
+
download: {
|
|
148
|
+
url: string;
|
|
149
|
+
method: "GET";
|
|
150
|
+
expiresAt: string;
|
|
151
|
+
};
|
|
152
|
+
artifact: {
|
|
153
|
+
id: string;
|
|
154
|
+
version: string;
|
|
155
|
+
checksum: string;
|
|
156
|
+
size: number;
|
|
157
|
+
r2Key?: string;
|
|
158
|
+
r2Url?: string;
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Artifact metadata stored in database
|
|
163
|
+
*/
|
|
164
|
+
export interface ArtifactMetadata {
|
|
165
|
+
id: string;
|
|
166
|
+
organizationId: string;
|
|
167
|
+
projectId: string;
|
|
168
|
+
version: string;
|
|
169
|
+
checksum: string;
|
|
170
|
+
size: number;
|
|
171
|
+
r2Key: string;
|
|
172
|
+
r2Url: string;
|
|
173
|
+
metadata?: Record<string, string>;
|
|
174
|
+
createdAt: Date;
|
|
175
|
+
createdBy: string;
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Deployment mode
|
|
179
|
+
*/
|
|
180
|
+
export type DeploymentMode = "docker" | "bootstrapper";
|
|
181
|
+
/**
|
|
182
|
+
* Bootstrapper deployment config
|
|
183
|
+
*/
|
|
184
|
+
export interface BootstrapperConfig {
|
|
185
|
+
artifactUrl: string;
|
|
186
|
+
artifactChecksum: string;
|
|
187
|
+
startCommand?: string;
|
|
188
|
+
skipBuild?: boolean;
|
|
189
|
+
envVars?: Record<string, string>;
|
|
190
|
+
}
|
|
191
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/commands/deploy/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;IACf,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,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S,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ElizaOS Cloud API Client
|
|
3
|
+
* Handles communication with the ElizaOS Cloud backend for deployments
|
|
4
|
+
*/
|
|
5
|
+
import type { ContainerConfig, CloudApiResponse, QuotaInfo, ContainerData, ArtifactUploadRequest, ArtifactUploadResponse } from "../types";
|
|
6
|
+
export interface ApiClientOptions {
|
|
7
|
+
apiKey: string;
|
|
8
|
+
apiUrl: string;
|
|
9
|
+
}
|
|
10
|
+
export declare class CloudApiClient {
|
|
11
|
+
private apiKey;
|
|
12
|
+
private apiUrl;
|
|
13
|
+
private readonly DEFAULT_TIMEOUT_MS;
|
|
14
|
+
constructor(options: ApiClientOptions);
|
|
15
|
+
/**
|
|
16
|
+
* Fetch with timeout helper
|
|
17
|
+
*/
|
|
18
|
+
private fetchWithTimeout;
|
|
19
|
+
/**
|
|
20
|
+
* Parse API error response with support for multiple formats
|
|
21
|
+
*/
|
|
22
|
+
private parseErrorResponse;
|
|
23
|
+
/**
|
|
24
|
+
* Handle API errors consistently
|
|
25
|
+
*/
|
|
26
|
+
private handleApiError;
|
|
27
|
+
/**
|
|
28
|
+
* Get container quota and pricing information
|
|
29
|
+
*/
|
|
30
|
+
getQuota(): Promise<CloudApiResponse<QuotaInfo>>;
|
|
31
|
+
/**
|
|
32
|
+
* Create a new container deployment
|
|
33
|
+
*/
|
|
34
|
+
createContainer(config: ContainerConfig): Promise<CloudApiResponse<ContainerData>>;
|
|
35
|
+
/**
|
|
36
|
+
* Get container status
|
|
37
|
+
*/
|
|
38
|
+
getContainer(containerId: string): Promise<CloudApiResponse<ContainerData>>;
|
|
39
|
+
/**
|
|
40
|
+
* List all containers
|
|
41
|
+
*/
|
|
42
|
+
listContainers(): Promise<CloudApiResponse<ContainerData[]>>;
|
|
43
|
+
/**
|
|
44
|
+
* Delete a container
|
|
45
|
+
*/
|
|
46
|
+
deleteContainer(containerId: string): Promise<CloudApiResponse>;
|
|
47
|
+
/**
|
|
48
|
+
* Poll container status until it reaches a terminal state
|
|
49
|
+
* Matches Cloud API deployment timeout of 10 minutes
|
|
50
|
+
*/
|
|
51
|
+
waitForDeployment(containerId: string, options?: {
|
|
52
|
+
maxAttempts?: number;
|
|
53
|
+
intervalMs?: number;
|
|
54
|
+
}): Promise<CloudApiResponse<ContainerData>>;
|
|
55
|
+
/**
|
|
56
|
+
* Upload artifact to R2 storage via Cloud API
|
|
57
|
+
*/
|
|
58
|
+
uploadArtifact(request: ArtifactUploadRequest & {
|
|
59
|
+
artifactPath: string;
|
|
60
|
+
}): Promise<CloudApiResponse<ArtifactUploadResponse>>;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Get API credentials from environment or config
|
|
64
|
+
*/
|
|
65
|
+
export declare function getApiCredentials(): {
|
|
66
|
+
apiKey: string;
|
|
67
|
+
apiUrl: string;
|
|
68
|
+
} | null;
|
|
69
|
+
//# sourceMappingURL=api-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-client.d.ts","sourceRoot":"","sources":["../../../../src/commands/deploy/utils/api-client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EAEhB,SAAS,EACT,aAAa,EACb,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,UAAU,CAAC;AAElB,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,qBAAa,cAAc;IACzB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAS;gBAEhC,OAAO,EAAE,gBAAgB;IAKrC;;OAEG;YACW,gBAAgB;IAwB9B;;OAEG;YACW,kBAAkB;IAehC;;OAEG;IACH,OAAO,CAAC,cAAc;IAWtB;;OAEG;IACG,QAAQ,IAAI,OAAO,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC;IA+BtD;;OAEG;IACG,eAAe,CACnB,MAAM,EAAE,eAAe,GACtB,OAAO,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC;IAoC3C;;OAEG;IACG,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC;IAuBjF;;OAEG;IACG,cAAc,IAAI,OAAO,CAAC,gBAAgB,CAAC,aAAa,EAAE,CAAC,CAAC;IA4BlE;;OAEG;IACG,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IA4BrE;;;OAGG;IACG,iBAAiB,CACrB,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE;QACP,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,UAAU,CAAC,EAAE,MAAM,CAAC;KAChB,GACL,OAAO,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC;IAsD3C;;OAEG;IACG,cAAc,CAClB,OAAO,EAAE,qBAAqB,GAAG;QAAE,YAAY,EAAE,MAAM,CAAA;KAAE,GACxD,OAAO,CAAC,gBAAgB,CAAC,sBAAsB,CAAC,CAAC;CAoFrD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,GAAG,IAAI,CAaP"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Artifact utilities for ElizaOS deployment
|
|
3
|
+
* Handles creating, compressing, and managing project artifacts
|
|
4
|
+
*/
|
|
5
|
+
export interface ArtifactOptions {
|
|
6
|
+
projectPath: string;
|
|
7
|
+
outputPath?: string;
|
|
8
|
+
excludePatterns?: string[];
|
|
9
|
+
includeEnv?: boolean;
|
|
10
|
+
deterministic?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface ArtifactResult {
|
|
13
|
+
success: boolean;
|
|
14
|
+
artifactPath?: string;
|
|
15
|
+
checksum?: string;
|
|
16
|
+
size?: number;
|
|
17
|
+
fileCount?: number;
|
|
18
|
+
error?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface ArtifactMetadata {
|
|
21
|
+
version: string;
|
|
22
|
+
createdAt: string;
|
|
23
|
+
checksum: string;
|
|
24
|
+
files: string[];
|
|
25
|
+
dependencies?: Record<string, string>;
|
|
26
|
+
elizaVersion?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Create a deployment artifact from a project directory
|
|
30
|
+
*/
|
|
31
|
+
export declare function createArtifact(options: ArtifactOptions): Promise<ArtifactResult>;
|
|
32
|
+
/**
|
|
33
|
+
* Calculate SHA256 checksum of a file
|
|
34
|
+
*/
|
|
35
|
+
export declare function calculateChecksum(filePath: string): Promise<string>;
|
|
36
|
+
/**
|
|
37
|
+
* Extract an artifact to a directory
|
|
38
|
+
*/
|
|
39
|
+
export declare function extractArtifact(artifactPath: string, outputDir: string): Promise<void>;
|
|
40
|
+
/**
|
|
41
|
+
* Validate an artifact's integrity
|
|
42
|
+
*/
|
|
43
|
+
export declare function validateArtifact(artifactPath: string, expectedChecksum?: string): Promise<boolean>;
|
|
44
|
+
/**
|
|
45
|
+
* Clean up old artifacts
|
|
46
|
+
*/
|
|
47
|
+
export declare function cleanupArtifacts(artifactDir: string, keepCount?: number): Promise<void>;
|
|
48
|
+
//# sourceMappingURL=artifact.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"artifact.d.ts","sourceRoot":"","sources":["../../../../src/commands/deploy/utils/artifact.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EA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