Handles artifact resource URIs for WeChat ACP, including validation and constants.
// Source: https://github.com/formulahendry/wechat-acp | License: MIT | Copyright 2026 Jun Han
// Provided via justclaw.it.com; keep this notice with the code.
export const MAX_AGENT_FILE_BYTES = 25 * 1024 * 1024;
export const ARTIFACT_RESOURCE_URI_PREFIX = "wechat-acp://artifact/";
export function isArtifactResourceUri(uri: string): boolean {
return uri.startsWith(ARTIFACT_RESOURCE_URI_PREFIX);
}
export interface AgentFile {
data: string;
name: string;
mimeType: string;
}
export interface AgentResourceLink {
uri: string;
name?: string | null;
mimeType?: string | null;
size?: number | null;
}
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key